Skip to content

Potential fix for code scanning alert no. 2: Workflow does not contain permissions - #286

Merged
luolingchun merged 1 commit into
mainfrom
alert-autofix-2
Oct 10, 2026
Merged

luolingchun merged 1 commit into
mainfrom
alert-autofix-2

Conversation

@luolingchun

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/luolingchun/flask-openapi/security/code-scanning/2

Add an explicit permissions block to .github/workflows/docs.yml so the workflow does not inherit potentially overbroad defaults.
Best fix here is at the workflow root (applies to all jobs unless overridden), with least privileges required by current behavior:

  • contents: write is required because the job pushes to gh-pages.
  • No additional scopes are needed based on shown steps.

Edit region: immediately after the on: trigger block and before jobs:.
No imports, methods, or dependencies are needed (YAML-only change).

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@luolingchun
luolingchun marked this pull request as ready for review October 10, 2026 08:01
@luolingchun
luolingchun merged commit 8bea9ad into main Oct 10, 2026
4 checks passed
@luolingchun
luolingchun deleted the alert-autofix-2 branch October 10, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant