Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#74

Merged
marcieltorres merged 1 commit intomainfrom
alert-autofix-1
Oct 28, 2025
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#74
marcieltorres merged 1 commit intomainfrom
alert-autofix-1

Conversation

@marcieltorres
Copy link
Owner

Potential fix for https://github.com/marcieltorres/fast-api-boilerplate-project/security/code-scanning/1

To fix the problem, explicitly add a permissions: block to the job definition in .github/workflows/pull_request.yml (inside the run_tests_and_lint job). Since the only actions used are actions/checkout (which can operate with contents: read), and no steps involve modifying issues, PRs, or repository contents, you may safely restrict permissions to the minimum: contents: read. Add the following block under run_tests_and_lint::

permissions:
  contents: read

This change should be made directly after line 5, before runs-on: ubuntu-latest. No imports or definitions 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>
@marcieltorres marcieltorres marked this pull request as ready for review October 28, 2025 14:20
@marcieltorres marcieltorres self-assigned this Oct 28, 2025
@marcieltorres marcieltorres merged commit d0703bb into main Oct 28, 2025
4 checks passed
@marcieltorres marcieltorres deleted the alert-autofix-1 branch October 28, 2025 17:19
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