AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 32 Bitcoin

ci: use GITHUB_TOKEN instead of PAT for PR severity workflow

Public commit record

What the developer wrote

Authored by ziggie

97/100 · Strong
ci: use GITHUB_TOKEN instead of PAT for PR severity workflow

The PR severity classifier only needs to run `gh pr view`, `gh pr edit`
(labels), and `gh pr comment`. All three operations are fully covered by
the built-in GITHUB_TOKEN given the existing permissions block:

permissions:
contents: read
pull-requests: write
issues: write

The workflow uses `pull_request_target`, which runs in the base repo
context, so GITHUB_TOKEN has write access even for fork PRs.

Inspection of the claude-code-action@v1 source confirmed that the only
internal call that would require `contents: write` is branch deletion,
which is never exercised here because Claude's tools are locked down to
`gh pr view/edit/comment` via --allowedTools.

This removes the dependency on the PR_SEVERITY_BOT_TOKEN PAT secret.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit changes a GitHub Actions workflow so it uses the automatically provided GITHUB_TOKEN instead of a long-lived personal access token (PAT) named PR_SEVERITY_BOT_TOKEN. The workflow labels and comments on pull requests. The change reduces the risk that a leaked or overly powerful PAT could be misused, and it is a security-hardening improvement rather than a fix for an active vulnerability.

Recommended action

Review the permissions block to confirm it is minimal (contents: read may not be needed if only PR metadata is read), verify that claude-code-action@v1 cannot bypass --allowedTools, and consider rotating or deleting the now-unused PR_SEVERITY_BOT_TOKEN secret. No urgent patch is required.

Security signals we found

01

Removal of a long-lived personal access token (PAT) from CI/CD

02

Use of built-in GITHUB_TOKEN with scoped permissions

03

Workflow runs on pull_request_target, which has elevated context implications

04

Third-party action (anthropics/claude-code-action@v1) receives repository token

05

Claimed tool lockdown via --allowedTools to limit gh operations

Risk score

Why this scored 32/100

Our methodology →
Potential impact 5/30
Exploitability 5/25
Stealth signal 5/15
Affected reach 5/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.