Skip to content

Potential fix for code scanning alert no. 465: Workflow does not contain permissions#794

Closed
tammy-baylis-swi wants to merge 1 commit into
mainfrom
alert-autofix-465
Closed

Potential fix for code scanning alert no. 465: Workflow does not contain permissions#794
tammy-baylis-swi wants to merge 1 commit into
mainfrom
alert-autofix-465

Conversation

@tammy-baylis-swi

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/solarwinds/apm-python/security/code-scanning/465

Add an explicit top-level permissions block in .github/workflows/run_tox_tests.yaml so all jobs in this workflow get least-privilege token access by default.

Best minimal fix (no functionality change):

  • Insert at workflow root (after name is a good location):
    • permissions:
    • contents: read

Why this works:

  • actions/checkout needs contents: read.
  • No shown step requires write permissions.
  • Applying it at root covers current and future jobs unless overridden.

No imports, methods, or additional definitions are needed (YAML workflow edit only).

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

…ain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@tammy-baylis-swi

Copy link
Copy Markdown
Contributor Author

Going to try a different approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant