Skip to content

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

Merged
ryanparsa merged 1 commit into
mainfrom
alert-autofix-2
Sep 19, 2026
Merged

ryanparsa merged 1 commit into
mainfrom
alert-autofix-2

Conversation

@ryanparsa

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/ryanparsa/profiles/security/code-scanning/2

Add an explicit top-level permissions block in .github/workflows/ci.yml so all jobs inherit least-privilege token access. For this workflow, contents: read is the best minimal permission and does not change functionality, since the job only needs to read repository code (checkout + build/test).

Where to change: in .github/workflows/ci.yml, insert the block after the on: trigger section and before jobs:.

What to add:

permissions:
  contents: read

No imports, methods, or external definitions are needed (YAML workflow config only).

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>
@ryanparsa
ryanparsa marked this pull request as ready for review September 19, 2026 01:20
@ryanparsa
ryanparsa merged commit 98b510f into main Sep 19, 2026
5 checks passed
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