Skip to content
This repository was archived by the owner on Nov 9, 2025. It is now read-only.

Conversation

@devalv
Copy link
Owner

@devalv devalv commented Sep 22, 2025

Potential fix for https://github.com/devalv/mockapi/security/code-scanning/1

To resolve the issue, we need to add a permissions block to the workflow to limit the GITHUB_TOKEN's access appropriately. Since the workflow only checks out code and runs CI (no writes to the repository or external interactions like posting PR comments), the least privilege required is contents: read. This should be scoped at the top level of the workflow (before jobs:), so it applies to all jobs unless overridden. The edit involves inserting:

permissions:
  contents: read

as a new block after the workflow name and before on:. This change does not affect functionality; it only tightens security. No new imports, definitions, or methods 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>
@devalv devalv marked this pull request as ready for review September 22, 2025 14:16
@devalv devalv self-assigned this Sep 22, 2025
@devalv devalv merged commit e8bcba0 into main Sep 22, 2025
5 checks passed
@devalv devalv deleted the alert-autofix-1 branch September 22, 2025 14:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants