Skip to content

ci: restrict gitignore-in.yml permissions to job level#61

Open
kitsuyui wants to merge 1 commit into
mainfrom
fix/audit-supply-chain-attestation-and-runtime-fetch-controls-missing-001
Open

ci: restrict gitignore-in.yml permissions to job level#61
kitsuyui wants to merge 1 commit into
mainfrom
fix/audit-supply-chain-attestation-and-runtime-fetch-controls-missing-001

Conversation

@kitsuyui

Copy link
Copy Markdown
Member

Summary

  • Move permissions: contents: write / pull-requests: write from workflow level to the update-gitignore job level.
  • Add permissions: {} at workflow level to deny all permissions by default.

Why

With permissions at workflow level, any future job added to this workflow would inherit contents: write and pull-requests: write silently. Scoping permissions to the job that actually needs them (update-gitignore) follows the principle of least privilege and matches the pattern already used in main.yml and spellcheck.yml.

Verification

  • actionlint .github/workflows/gitignore-in.yml: clean
  • Collateral check: clean

Move permissions from workflow level to the update-gitignore job level to prevent future jobs from inheriting write access by default.
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