Skip to content

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#2

Merged
elkins merged 1 commit into
mainfrom
alert-autofix-2
Jun 4, 2026
Merged

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#2
elkins merged 1 commit into
mainfrom
alert-autofix-2

Conversation

@elkins

@elkins elkins commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/elkins/open-bcif/security/code-scanning/2

Add an explicit permissions block to the workflow so token scope is constrained by default.
Best fix here (without changing functionality): set workflow-level permissions to read-only for repository contents.

  • File to change: .github/workflows/publish.yml
  • Where: after the on: trigger block and before jobs:
  • What to add:
    permissions:
      contents: read

This is sufficient for actions/checkout@v4 and does not grant unnecessary write access.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@elkins elkins marked this pull request as ready for review June 4, 2026 17:26
@elkins elkins merged commit c5728d4 into main Jun 4, 2026
4 checks passed
@elkins elkins deleted the alert-autofix-2 branch June 4, 2026 17:26
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.

1 participant