Skip to content

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

Draft
josvazg wants to merge 1 commit into
mainfrom
alert-autofix-1
Draft

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#196
josvazg wants to merge 1 commit into
mainfrom
alert-autofix-1

Conversation

@josvazg
Copy link
Copy Markdown
Collaborator

@josvazg josvazg commented May 19, 2026

Potential fix for https://github.com/mongodb/atlas-cli-plugin-kubernetes/security/code-scanning/1

Add an explicit permissions block to the workflow so GITHUB_TOKEN is scoped to only what is needed.
Best fix here: define workflow-level permissions with contents: read, which is sufficient for actions/checkout and keeps behavior least-privileged without changing functional behavior.

Where to change

  • File: .github/workflows/snyk_monitor.yml
  • Add permissions: after the on: block (before jobs:), with:
    • 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>
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