Skip to content

Ensure correct CodeQL workflow permissions #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 10, 2025

This PR adds the required security-events: write permission at the job level for the CodeQL workflow that runs github/codeql-action/analyze.

Changes Made

  • Added permissions: security-events: write to the CodeQL-Build job in .github/workflows/codeql-analysis.yml
  • The permission is correctly defined at the job level (not root level) as per GitHub Actions security best practices

Background

GitHub Actions workflows that use github/codeql-action/analyze require the security-events: write permission to upload code scanning results. This permission should be defined at the job level rather than the workflow root level to follow the principle of least privilege.

Verification

  • ✅ YAML syntax validated
  • ✅ Only one workflow uses github/codeql-action/analyze
  • ✅ Permission follows the same pattern as other security-related workflows in the repository
  • ✅ Minimal change with no impact on existing functionality

Fixes #18.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: trask <218610+trask@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Ensure correct CodeQL workflow permissions Ensure correct CodeQL workflow permissions Jul 10, 2025
@Copilot Copilot AI requested a review from trask July 10, 2025 00:28
Copilot finished work on behalf of trask July 10, 2025 00:28
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.

Ensure correct CodeQL workflow permissions
2 participants