Skip to content

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

Merged
wesbiggs merged 1 commit intomainfrom
alert-autofix-1
Sep 30, 2025
Merged

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

Conversation

@wesbiggs
Copy link
Member

Potential fix for https://github.com/LibertyDSNP/spec/security/code-scanning/1

To fix the problem, explicitly set permissions for the job or workflow and grant only the minimal required access. Since this workflow only checks out code, installs dependencies, runs linter and spellchecker, and builds documentation (without performing any write operations to the repository), it likely only needs contents: read for the token. The safest, most minimal correct fix is to add a permissions: block with contents: read at the workflow ROOT (applies to all jobs, the recommended pattern). To implement, insert the permissions: block after the name: key, before on:. No other changes are necessary.


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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@wesbiggs wesbiggs marked this pull request as ready for review September 30, 2025 19:33
@wesbiggs wesbiggs merged commit da1ce9c into main Sep 30, 2025
4 checks passed
@wesbiggs wesbiggs deleted the alert-autofix-1 branch September 30, 2025 19:33
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