Skip to content

Maintenance: Switch CodeQL from default setup to advanced setup so fork PRs get analyzed #5506

Description

@svozza

Summary

CodeQL is currently configured on this repo via default setup (the GitHub-managed dynamic/github-code-scanning/codeql workflow), and the CodeQL status check is a required check on the main branch. Default setup only runs its analysis for branches in the base repository — it does not analyze pull requests opened from forks. Because the check is required, every fork PR ends up permanently blocked: the CodeQL check sits in "Expected — waiting for status to be reported" indefinitely and can never be satisfied, so the PR's merge state stays BLOCKED.

This is currently affecting #5486 (a docs-only fork PR). Verified by inspecting all commits on that PR: zero CodeQL runs were ever created, while same-repo PRs get a CodeQL run within a minute of each push. The only recent precedent, fork PR #5444, appears to have been admin-merged to bypass the same block.

Why is this needed?

External contributions come from forks by definition. Today they can only be merged via admin override, which either bypasses a required security gate or forces a maintainer to recreate the branch inside the base repo — both are friction and neither is sustainable for a public OSS project that actively solicits community contributions.

Which area does this relate to?

Automation, Governance

Solution

Migrate from CodeQL default setup to advanced setup: add a checked-in .github/workflows/codeql.yml workflow with pull_request (and push to main / schedule) triggers. Advanced setup runs on fork PRs, so the required CodeQL check can actually report a status. Fork-PR runs remain gated behind GitHub Actions' "require approval for all external contributors" policy (already enabled on this repo), so a maintainer still explicitly approves before any workflow executes against a fork's code — preserving the security posture while unblocking the merge path. Once the advanced workflow is in place and reporting the CodeQL check, disable default setup.

Acknowledgment

Activity

  1. added
    triageThis item has not been triaged by a maintainer, please wait
    internalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
    on Jul 27, 2026
  2. powertools-for-aws-oss-automation commented on Jul 27, 2026

    @powertools-for-aws-oss-automation

    Warning

    This issue is now closed. Please be mindful that future comments are hard for our team to see.
    If you need more assistance, please either reopen the issue, or open a new issue referencing this one.
    If you wish to keep having a conversation with other community members under this issue feel free to do so.

  3. added
    pending-releaseThis item has been merged and will be released soon
    and removed
    triageThis item has not been triaged by a maintainer, please wait
    on Jul 27, 2026
  4. added
    completedThis item is complete and has been merged/shipped
    and removed
    pending-releaseThis item has been merged and will be released soon
    on Aug 18, 2026
  5. removed
    internalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
    completedThis item is complete and has been merged/shipped
    on Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions