Skip to content

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

Merged
pythonhubdev merged 1 commit intomainfrom
alert-autofix-1
Sep 27, 2025
Merged

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

Conversation

@pythonhubdev
Copy link
Owner

Potential fix for https://github.com/pythonhubdev/faag_cli/security/code-scanning/1

To fix the problem, explicitly set the permissions in the workflow or at the job level. Since the workflow only checks out code, installs Python dependencies, and runs linting, formatting, type-checking, and so forth—all operations that only require reading the repository—it's sufficient and safest to add a permissions: contents: read block at the workflow level. This will ensure the minimal required permissions are used for all jobs in the workflow.

The change should be made by inserting the following block near the top of .github/workflows/ci.yml, after the name key and before the on: key:

permissions:
  contents: read

No new imports or other file-level changes are needed.

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>
@pythonhubdev pythonhubdev marked this pull request as ready for review September 27, 2025 00:02
@pythonhubdev pythonhubdev merged commit 13b801b into main Sep 27, 2025
1 check 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