Skip to content

Limit CI workflow token to read-only contents - #18

Merged
Allankw-dev merged 1 commit into
mainfrom
ci/least-privilege
Dec 2, 2026
Merged

Allankw-dev merged 1 commit into
mainfrom
ci/least-privilege

Conversation

@Allankw-dev

Copy link
Copy Markdown
Owner

Why

The audit noted ci.yml had no explicit permissions: block, so jobs run with the repository's default token permissions.

What changed

  • permissions: contents: read at the top of .github/workflows/ci.yml. The jobs only check out code and run checks.

Testing

  • The workflow parses as valid YAML. It was not run here; this PR's own checks will confirm it.

Not changed

  • Security scanning in CI (pip-audit / npm audit) and a Dockerfile for the API, which I couldn't validate without the project's dependencies installed.
  • The audit also checked the README claim that DevPilot is read-only: the only POSTs to GitHub are the installation-token and OAuth code exchanges, with no repository writes.

Generated by Claude Code

The CI jobs only check out code and run checks, so the default token permissions are not needed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A2y4b87iFhsrE3GaZwLMbs
@Allankw-dev
Allankw-dev merged commit 5442678 into main Dec 2, 2026
1 of 3 checks passed
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