Skip to content

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

Merged
jprendes merged 1 commit into
mainfrom
alert-autofix-2
Apr 15, 2026
Merged

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

Conversation

@simongdavies
Copy link
Copy Markdown
Member

Potential fix for https://github.com/hyperlight-dev/hyperlight-wasm/security/code-scanning/2

Add an explicit permissions block at the workflow root in .github/workflows/Benchmarks.yml so all jobs inherit restricted token scopes unless overridden.
Best minimal fix (without changing behavior) is:

  • contents: read (needed for checkout/fetch operations)
  • packages: read (safe/common for dependency/package reads if needed by tools)

Place it near the top-level keys (after on: is a clear location). This addresses the CodeQL finding while preserving existing functionality.

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>
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
@simongdavies simongdavies marked this pull request as ready for review April 14, 2026 21:15
@jprendes jprendes merged commit 3537140 into main Apr 15, 2026
27 of 28 checks passed
@jprendes jprendes deleted the alert-autofix-2 branch April 15, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants