Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Potential fix for code scanning alert no. 32: Workflow does not contain permissions#250

Merged
chohner merged 1 commit intomainfrom
alert-autofix-32
Sep 2, 2025
Merged

Potential fix for code scanning alert no. 32: Workflow does not contain permissions#250
chohner merged 1 commit intomainfrom
alert-autofix-32

Conversation

@chohner
Copy link
Member

@chohner chohner commented Sep 2, 2025

Potential fix for https://github.com/digitalservicebund/achill/security/code-scanning/32

To fix the problem, an explicit permissions block should be added to the job definition in the .github/workflows/secrets-check.yml workflow file. The minimal starting point is contents: read, which restricts the GITHUB_TOKEN's access to the repository contents to read-only. This should be sufficient for the actions used in the workflow: checkout, linting, and sending Slack notifications (none of which require write permissions). The change should be made immediately after the job name and before the runs-on key (inside the check job). No additional dependencies or imports are required.

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

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@chohner chohner marked this pull request as ready for review September 2, 2025 09:56
@chohner chohner merged commit 879a881 into main Sep 2, 2025
9 checks passed
@chohner chohner deleted the alert-autofix-32 branch September 2, 2025 10:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant