Skip to content

Conversation

@houseme
Copy link
Owner

@houseme houseme commented Aug 13, 2025

Potential fix for https://github.com/houseme/snowflake-rs/security/code-scanning/6

To fix the problem, explicitly set the permissions block to restrict the GITHUB_TOKEN to the minimum required privileges. Since this workflow only checks out code and builds documentation, it does not need any write permissions. The minimal required permission is contents: read, which allows the workflow to read repository contents (needed for actions/checkout). This block can be added at the workflow level (applies to all jobs) or at the job level (applies only to the docs job). The best practice is to add it at the workflow level, just after the name field and before jobs:.

What to change:

  • In .github/workflows/docs.yml, add the following block after the name: Docs line and before jobs::
    permissions:
      contents: read
  • No additional imports, methods, or definitions are needed.

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>
Signed-off-by: houseme <[email protected]>
@houseme houseme marked this pull request as ready for review August 13, 2025 10:52
@houseme houseme merged commit 099df3f into main Aug 13, 2025
8 checks passed
@houseme houseme deleted the alert-autofix-6 branch August 13, 2025 10:53
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.

2 participants