Skip to content

Conversation

@mackowski
Copy link
Collaborator

@mackowski mackowski commented Nov 9, 2025

Fix for https://github.com/OWASP/CheatSheetSeries/security/code-scanning/2

To fix the issue, I explicitly added a permissions block to the job definition.
Here, since there is only one job, adding it at the job level is sufficient. The linter job only needs to read the contents of the repository (no need to write to contents, pull-requests, etc.), so contents: read is the minimal permissions set required. Added the following block under lint: and above runs-on: in .github/workflows/md_lint_check.yml:

permissions:
  contents: read

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@mackowski mackowski marked this pull request as ready for review November 9, 2025 06:47
@mackowski mackowski requested review from Copilot, jmanico and szh November 9, 2025 06:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds explicit read-only permissions to the markdown lint check workflow, following the principle of least privilege for GitHub Actions security.

  • Adds permissions configuration with contents: read to the lint job

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@szh szh merged commit ef20317 into master Nov 10, 2025
15 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.

5 participants