Skip to content

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

Merged
acdha merged 1 commit intomasterfrom
restrict-permissions-for-test-actions
May 1, 2025
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#13
acdha merged 1 commit intomasterfrom
restrict-permissions-for-test-actions

Conversation

@acdha
Copy link
Copy Markdown
Member

@acdha acdha commented May 1, 2025

Potential fix for https://github.com/LibraryOfCongress/django-tabular-export/security/code-scanning/1

To fix the issue, we will add a permissions block at the workflow level (root) to explicitly define the minimum required permissions. Since this workflow only checks out the repository and runs tests, it does not require any write permissions. The contents: read permission is sufficient for these operations. This change will ensure the workflow adheres to the principle of least privilege.


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>
@acdha acdha marked this pull request as ready for review May 1, 2025 14:11
@acdha acdha merged commit 7c957ad into master May 1, 2025
39 checks 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