Skip to content

chore: Add explicit permissions to CodeQL workflow#40

Merged
srprash merged 1 commit intomainfrom
fix-workflow-permissions
Jan 13, 2026
Merged

chore: Add explicit permissions to CodeQL workflow#40
srprash merged 1 commit intomainfrom
fix-workflow-permissions

Conversation

@srprash
Copy link
Copy Markdown
Contributor

@srprash srprash commented Dec 19, 2025

Summary

This PR adds an explicit permission declaration to the CodeQL workflow to follow security best practices and the principle of least privilege.

Changes

.github/workflows/codeql-analysis.yml

  • Added security-events: write permission
  • This permission is required for CodeQL to publish security scan results to GitHub's security dashboard

Why this change?

  1. Security best practice: Explicitly declaring permissions makes it clear what access the workflow requires
  2. Principle of least privilege: Instead of relying on default GitHub token permissions, we declare only what's needed
  3. Auditability: Makes it easier to review and audit workflow permissions across the repository
  4. Compliance: Aligns with GitHub's recommended security practices for Actions workflows

Testing

  • The change is declarative and doesn't modify workflow logic
  • CodeQL workflow will continue to function with the added permission

This explicit permission declaration follows the principle of least
privilege and makes the required permissions clear for security auditing.
@srprash srprash changed the title Add explicit permissions to CodeQL workflow chore: Add explicit permissions to CodeQL workflow Dec 19, 2025
@srprash srprash closed this Dec 19, 2025
@srprash srprash reopened this Dec 19, 2025
@srprash srprash merged commit 404374e into main Jan 13, 2026
8 of 9 checks passed
@srprash srprash deleted the fix-workflow-permissions branch January 13, 2026 23:17
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.

3 participants