Skip to content

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

Merged
simongdavies merged 1 commit into
mainfrom
alert-autofix-6
Jun 9, 2026
Merged

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

Conversation

@simongdavies

Copy link
Copy Markdown
Member

Potential fix for https://github.com/hyperlight-dev/cargo-hyperlight/security/code-scanning/6

Add an explicit root-level permissions block in .github/workflows/publish.yml so all jobs (including ci and validate) are constrained by default. Keep existing job-level overrides (publish with id-token: write, release with contents: write) unchanged; those will continue to apply where needed.

Best single fix without changing functionality:

  • In .github/workflows/publish.yml, insert a top-level block after the on: trigger:
    • permissions: {}
      This is the minimal explicit restriction and satisfies the CodeQL recommendation shown in the alert ({{}}). It ensures unspecified jobs do not inherit potentially broad defaults while preserving current behavior of jobs that already declare explicit permissions.

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>
@simongdavies simongdavies marked this pull request as ready for review June 9, 2026 09:24
@simongdavies simongdavies merged commit e4c3576 into main Jun 9, 2026
9 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.

1 participant