Skip to content

Conversation

@ismailtsdln
Copy link
Member

Potential fix for https://github.com/malware-insight/sandsight/security/code-scanning/1

In general, to fix this issue you should explicitly declare a permissions: block either at the top level of the workflow (to apply to all jobs) or within the specific job that needs restricted permissions. Set the minimal scopes required, typically starting with contents: read when the workflow only needs to read the repository contents and does not need to write to anything.

For this workflow, the simplest and safest fix without altering existing functionality is to add a permissions: block under the name: key at the root of the file, so it applies to all jobs. The job build only checks out code, sets up Python, installs dependencies, lints, and runs tests; these actions require only read access to repository contents. Therefore, we should add:

permissions:
  contents: read

right after the name: SandSight CI line. No other code changes or imports are necessary, and no job steps need to be modified. The rest of the workflow remains the same.

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>
@ismailtsdln ismailtsdln marked this pull request as ready for review January 24, 2026 12:04
@ismailtsdln ismailtsdln merged commit 7506164 into main Jan 24, 2026
3 of 5 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