Skip to content

Potential fix for code scanning alert no. 10: Workflow does not contain permissions#57

Merged
EdGeraghty merged 1 commit intodevelopfrom
alert-autofix-10
Aug 23, 2025
Merged

Potential fix for code scanning alert no. 10: Workflow does not contain permissions#57
EdGeraghty merged 1 commit intodevelopfrom
alert-autofix-10

Conversation

@EdGeraghty
Copy link
Member

Potential fix for https://github.com/privacyint/docker-headscale/security/code-scanning/10

To fix the problem, you should add a permissions: key to restrict the GITHUB_TOKEN permissions for this workflow. The least privilege required for the workflow should be specified. Given the current usage (checking out code, running tests, caching), the only necessary permission is typically read access to repository contents. You should add permissions: at the root level (before jobs:), setting contents: read. This ensures that any job not needing additional permissions is restricted to read-only access. No additional imports, definitions, or other changes are required—just the addition of the permissions YAML block. The edit should be made near the start of the file, after the name: and before on: or directly before jobs:.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@privacyint privacyint deleted a comment from github-actions bot Aug 23, 2025
@EdGeraghty EdGeraghty marked this pull request as ready for review August 23, 2025 17:31
@EdGeraghty EdGeraghty merged commit 1e6425c into develop Aug 23, 2025
7 checks passed
@EdGeraghty EdGeraghty deleted the alert-autofix-10 branch August 23, 2025 17:31
@EdGeraghty
Copy link
Member Author

Fixed #44

@EdGeraghty EdGeraghty added bug Something isn't working refactoring #yolo labels Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working refactoring #yolo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant