Skip to content

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

Merged
ccleberg merged 1 commit into
mainfrom
alert-autofix-1
Aug 19, 2026
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#4
ccleberg merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@ccleberg

Copy link
Copy Markdown
Member

Potential fix for https://github.com/audit-labs/tutorials/security/code-scanning/1

Add an explicit permissions block to the workflow so token scope is intentionally constrained.
Best fix here: define it at the workflow root (applies to all jobs unless overridden) with the minimal required scope:

  • contents: read

This workflow only needs to read repository contents for checkout and execute notebooks; artifact upload does not require repository write permission.
Edit .github/workflows/run-notebooks.yml by inserting the permissions block between the trigger section (on: ...) and jobs:.

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>
@ccleberg
ccleberg marked this pull request as ready for review August 19, 2026 16:39
@ccleberg
ccleberg merged commit c1c3100 into main Aug 19, 2026
3 checks passed
@ccleberg
ccleberg deleted the alert-autofix-1 branch August 19, 2026 16:40
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