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/2

To fix the problem, explicitly specify minimal permissions for the workflow or job. The best method is to add a permissions block at the workflow level (top-level, near the top of .github/workflows/pre-commit.yml) to keep the workflow configuration clear and secure by default. Since the workflow as shown only checks code out and runs pre-commit checks with no indication of needing repository modifications, contents: read is the minimal and most appropriate permission. This should be added after the workflow name and before the on: block—for consistency and clarity.

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 self-assigned this Sep 22, 2025
@devalv devalv marked this pull request as ready for review September 22, 2025 14:04
@devalv devalv merged commit eef79a5 into main Sep 22, 2025
5 checks passed
@devalv devalv deleted the alert-autofix-2 branch September 22, 2025 14:04
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