Skip to content

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

Merged
HosseinNejatiJavaremi merged 1 commit intomasterfrom
alert-autofix-1063
Aug 28, 2025
Merged

Potential fix for code scanning alert no. 1063: Workflow does not contain permissions#77
HosseinNejatiJavaremi merged 1 commit intomasterfrom
alert-autofix-1063

Conversation

@HosseinNejatiJavaremi
Copy link
Copy Markdown
Member

Potential fix for https://github.com/SyntaxArc/ArchiPy/security/code-scanning/1063

The best way to remediate this problem is to add an explicit permissions block to either the root of the workflow or specifically to the publish job. Since the workflow appears to only require reading repository contents (to check out code) and does not appear to require write actions against the repo via the GITHUB_TOKEN, the minimum recommended block would be permissions: contents: read. You should add this either as a workflow-level (at the top, beneath name: and before or after on:) or job-level (directly under publish:). To apply least privilege everywhere, it is best to set it at the workflow level, but setting it at the job level is also acceptable.

Edit .github/workflows/publish.yml and add:

permissions:
  contents: read

just after line 1 or 2.


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

…tain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@HosseinNejatiJavaremi HosseinNejatiJavaremi marked this pull request as ready for review August 28, 2025 08:53
@HosseinNejatiJavaremi HosseinNejatiJavaremi merged commit cda0e0f into master Aug 28, 2025
7 checks passed
@HosseinNejatiJavaremi HosseinNejatiJavaremi deleted the alert-autofix-1063 branch August 28, 2025 08:53
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