Skip to content

ci: add minimal permissions to test workflow - #8

Merged
adityathebe merged 1 commit into
mainfrom
claude/fix-and-create-pr-gysdd1
Jul 17, 2026
Merged

ci: add minimal permissions to test workflow#8
adityathebe merged 1 commit into
mainfrom
claude/fix-and-create-pr-gysdd1

Conversation

@adityathebe

Copy link
Copy Markdown
Member

Summary

Resolves the CodeQL code-scanning alert "Workflow does not contain permissions" (Medium) detected in .github/workflows/test.yml.

By default, workflows without an explicit permissions block inherit the repository's default GITHUB_TOKEN permissions, which can be broader than necessary. This change adds an explicit top-level permissions block scoping the token to the minimum required.

Changes

  • Added a top-level permissions block to .github/workflows/test.yml:
    permissions:
      contents: read

The test workflow only checks out the repository and runs tests, so contents: read is the minimal required scope.

🤖 Generated with Claude Code


Generated by Claude Code

Resolve CodeQL alert 'Workflow does not contain permissions' by adding an
explicit top-level permissions block. The test workflow only checks out
code and runs tests, so contents: read is the minimal required scope.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PWW6yijvTcoosQkKo9qsJ5
@adityathebe
adityathebe merged commit 451a355 into main Jul 17, 2026
7 checks passed
@adityathebe
adityathebe deleted the claude/fix-and-create-pr-gysdd1 branch July 17, 2026 06:31
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