Skip to content

fix: restrict GITHUB_TOKEN permissions (Scorecard alerts #26, #27) - #17

Merged
VrilLabs merged 3 commits into
masterfrom
copilot/fix-code-scanning-alerts-again
Aug 15, 2026
Merged

fix: restrict GITHUB_TOKEN permissions (Scorecard alerts #26, #27)#17
VrilLabs merged 3 commits into
masterfrom
copilot/fix-code-scanning-alerts-again

Conversation

Copilot AI commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Two Scorecard Token-Permissions alerts flagged overly broad GITHUB_TOKEN scopes violating least-privilege.

Changes

.github/workflows/ci.yml

  • Removed security-events: write from the security job — TruffleHog in this workflow does not upload SARIF, so the write permission served no purpose.

.github/workflows/scorecard.yml

  • Added permissions: read-all at the workflow top-level. Job-level write permissions (security-events: write, id-token: write) remain, scoped only to the job that requires them.
# scorecard.yml — before: no top-level permissions block
permissions: read-all   # added

jobs:
  analysis:
    permissions:
      security-events: write
      id-token: write

Co-authored-by: VrilLabs <271641621+VrilLabs@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code scanning alerts #26 and #27 fix: restrict GITHUB_TOKEN permissions (Scorecard alerts #26, #27) Aug 15, 2026
Copilot AI requested a review from VrilLabs August 15, 2026 04:55
@VrilLabs
VrilLabs marked this pull request as ready for review August 15, 2026 05:02
Copilot AI lite review requested due to automatic review settings August 15, 2026 05:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens GitHub Actions GITHUB_TOKEN permissions to address OpenSSF Scorecard Token-Permissions alerts by reducing unnecessary write scopes and making defaults explicit.

Changes:

  • Add a workflow-level permissions: read-all default to the Scorecard workflow.
  • Remove unused security-events: write from the CI workflow’s security job.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/scorecard.yml Adds workflow-level default token permissions (read-all) for least-privilege alignment.
.github/workflows/ci.yml Removes unnecessary security-events: write from the security job permissions.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +10 to 14
permissions: read-all

jobs:
analysis:
name: Scorecard analysis

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added contents: read to the analysis job-level permissions block in commit Add contents: read to scorecard analysis job permissions.

Co-authored-by: VrilLabs <271641621+VrilLabs@users.noreply.github.com>
@VrilLabs
VrilLabs merged commit 80336d1 into master Aug 15, 2026
5 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.

3 participants