Skip to content

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

Closed
mellowdrifter wants to merge 1 commit into
masterfrom
alert-autofix-1
Closed

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#3
mellowdrifter wants to merge 1 commit into
masterfrom
alert-autofix-1

Conversation

@mellowdrifter
Copy link
Copy Markdown
Owner

Potential fix for https://github.com/mellowdrifter/bgpwatch/security/code-scanning/1

Add an explicit permissions block at the workflow root so all jobs inherit least-privilege token access unless overridden.
For this workflow, the minimal safe baseline is:

  • contents: read

This preserves current functionality (actions/checkout and scanning) while preventing unnecessary write scopes if repository defaults are broader.

Edit .github/workflows/security.yml near the top-level keys (name, on, jobs) and insert permissions between on and jobs (or anywhere at root level).

No new 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>
@mellowdrifter mellowdrifter marked this pull request as ready for review April 26, 2026 12:42
@mellowdrifter
Copy link
Copy Markdown
Owner Author

lgtm

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