Skip to content

Potential fix for code scanning alert no. 14: Workflow does not contain permissions - #5565

Open
nsextonTT wants to merge 1 commit into
mainfrom
alert-autofix-14
Open

nsextonTT wants to merge 1 commit into
mainfrom
alert-autofix-14

Conversation

@nsextonTT

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/tenstorrent/tt-inference-server/security/code-scanning/14

Add an explicit permissions block at the workflow root so all jobs in this workflow inherit least-privilege defaults.
Best minimal safe change (without assuming write needs) is:

  • permissions: {}

This sets all token permissions to none unless explicitly granted later. In this workflow, there are no checkout/upload/comment steps shown, and the step primarily uses secrets and inputs, so this is the strictest compliant fix for the current snippet. If later a job needs specific scopes, add only those scopes at job level.

Edit .github/workflows/produce_data.yml by inserting permissions: {} between the on: trigger block and jobs:.

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

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
types:
- completed

permissions: {}

@fivanovicTT fivanovicTT Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This workflow passes github.token through GH_TOKEN to the external collect_data action. Its download script uses that token to fetch workflow data and download report artifacts with gh run download.

permissions: {} removes the token’s Actions permission, but artifact downloads require Actions read access. Runs containing report artifacts will therefore encounter authorization failures and lose the inputs needed to generate benchmark reports. The SFTP secrets authorize uploading the finished reports; they do not authorize downloading data from GitHub.

Could we grant actions: read here, or keep the empty root permissions block and grant it on produce-cicd-data? The minimal replacement is:

Suggested change
permissions: {}
permissions:
actions: read

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.

2 participants