Skip to content

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

Draft
Pradyothsp wants to merge 1 commit into
mainfrom
alert-autofix-3
Draft

Pradyothsp wants to merge 1 commit into
mainfrom
alert-autofix-3

Conversation

@Pradyothsp

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/Pradyothsp/govec-python/security/code-scanning/3

To fix this, add an explicit permissions block to the build job so its GITHUB_TOKEN is restricted to only what the job needs. For this job, the CodeQL-recommended minimum contents: read is appropriate and does not change behavior (checkout needs read access; artifact upload does not require elevated repo write scope).

Best single change: in .github/workflows/release.yml, under jobs.build (right after runs-on), add:

permissions:
  contents: read

No imports, methods, or dependencies are needed.

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>

This branch has not been deployed

No deployments
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