Skip to content

Potential fix for code scanning alert no. 6: Workflow does not contain permissions#35

Merged
tdabasinskas merged 2 commits intomainfrom
alert-autofix-6
Aug 15, 2025
Merged

Potential fix for code scanning alert no. 6: Workflow does not contain permissions#35
tdabasinskas merged 2 commits intomainfrom
alert-autofix-6

Conversation

@tdabasinskas
Copy link
Member

Potential fix for https://github.com/datolabs-io/opsy/security/code-scanning/6

To fix the problem, add a permissions block to the workflow file .github/workflows/ci.yaml. The block should be placed at the top level (before jobs:) to apply to all jobs, unless a job requires more specific permissions. For build, lint, and test jobs, the minimal required permission is typically contents: read, which allows the workflow to read repository contents but not write to them. No additional permissions are needed for these jobs. The change should be made by inserting the following block after the workflow name and before the on: block:

permissions:
  contents: read

No imports or additional 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>
@tdabasinskas tdabasinskas marked this pull request as ready for review August 15, 2025 08:44
@tdabasinskas tdabasinskas requested a review from a team as a code owner August 15, 2025 08:44
@tdabasinskas tdabasinskas merged commit 1defe32 into main Aug 15, 2025
7 checks passed
@tdabasinskas tdabasinskas deleted the alert-autofix-6 branch August 15, 2025 08:46
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