Skip to content

Conversation

Copy link

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.

Copilot AI changed the title [WIP] Ensure correct CodeQL workflow permissions Ensure correct CodeQL workflow permissions Jul 10, 2025
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