Skip to content

Conversation

@mmcinnestaylor
Copy link
Member

Potential fix for https://github.com/FSU-ACM/Programming-Contest-Suite/security/code-scanning/1

The recommended fix is to add a permissions block at the root level (top of the workflow YAML), directly after the name:, setting contents: read. This will limit the GITHUB_TOKEN to only allow reading the repository contents, which is sufficient for the steps shown (checkout, setup Python, install dependencies, run Pylint). This change is minimal, non-breaking, and adoptable on almost any workflow like this.

File/lines to change:

  • Edit .github/workflows/pylint.yml
  • Add, after the name: Pylint header and before the on: key, the following lines:
    permissions:
      contents: read

No other imports, method changes, or modifications are required.


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

mmcinnestaylor and others added 2 commits October 3, 2025 20:12
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@mmcinnestaylor mmcinnestaylor marked this pull request as ready for review October 4, 2025 01:15
@mmcinnestaylor mmcinnestaylor changed the base branch from main to dev October 4, 2025 01:15
@mmcinnestaylor mmcinnestaylor merged commit b471d01 into dev Oct 4, 2025
5 checks passed
@mmcinnestaylor mmcinnestaylor deleted the gh-sec-fixes branch October 4, 2025 01:16
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.

2 participants