Skip to content

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

Merged
Dhie-boop merged 1 commit into
masterfrom
alert-autofix-2
Mar 1, 2026
Merged

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#5
Dhie-boop merged 1 commit into
masterfrom
alert-autofix-2

Conversation

@Dhie-boop

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/Bintraq-Inc/bintraq-website/security/code-scanning/2

In general, the fix is to explicitly declare minimal GITHUB_TOKEN permissions in the workflow, either at the top level (applying to all jobs) or per-job. Since neither job needs to write to the repo or to GitHub resources, we can safely restrict the token to read-only access to repository contents.

The best single change with no functional impact is to add a workflow-level permissions block right after the on: section. This will apply to both quality-check and deploy jobs, and set the token permissions to contents: read, which is sufficient for actions/checkout and avoids granting write access. No additional methods, imports, or definitions are needed; this is a pure YAML configuration change inside .github/workflows/deploy.yml.

Concretely: in .github/workflows/deploy.yml, insert:

permissions:
  contents: read

between the on: block (lines 3–7) and the jobs: key (line 9). No other edits are required.

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>
@Dhie-boop
Dhie-boop marked this pull request as ready for review March 1, 2026 16:23
@Dhie-boop
Dhie-boop merged commit bf76f86 into master Mar 1, 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.

1 participant