Skip to content

ci: add least-privilege permissions to test and lint jobs#7

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

ci: add least-privilege permissions to test and lint jobs#7
adityathebe merged 1 commit into
mainfrom
claude/fix-and-create-pr-hkki1v

Conversation

@adityathebe

Copy link
Copy Markdown
Member

Summary

Addresses the two open CodeQL code-scanning alerts (#29, #30): "Workflow does not contain permissions" (Medium) in .github/workflows/ci.yml.

The test and lint jobs did not declare an explicit permissions block, so they inherited the default (potentially write-broad) GITHUB_TOKEN scope. Neither job needs more than read access to repository contents.

Changes

  • Added permissions: contents: read to the test job.
  • Added permissions: contents: read to the lint job.

The security job already declares its own (contents: read + security-events: write) and is left unchanged.

Notes

Applying least privilege at the job level keeps each job scoped to only what it needs, resolving both CodeQL alerts.

🤖 Generated with Claude Code


Generated by Claude Code

Address CodeQL findings (#29, #30) for workflows missing an explicit
permissions block. The test and lint jobs only need read access to
repository contents, so scope them to contents: read.

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