Skip to content

ci: add Python and Actions CodeQL security scanning - #4974

Merged
jbeckwith-oai merged 1 commit into
mainfrom
codex/agents-python-codeql
Sep 12, 2026
Merged

jbeckwith-oai merged 1 commit into
mainfrom
codex/agents-python-codeql

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

This pull request adds CodeQL security scanning for Python and GitHub Actions on main pushes, main-targeted pull requests, and a weekly schedule. The repository currently has no configured CodeQL security analysis; its separate Code Quality workflow does not establish security coverage.

Summary

  • Add stable CodeQL (python) and CodeQL (actions) jobs with immutable official action pins, separate result categories, and no-build analysis.
  • Limit permissions to repository reads and security-results uploads; disable checkout credential persistence and avoid project installation or build steps.
  • Preserve all existing workflows. Record that successful analysis execution does not imply an absence of findings.

Deployment follow-up

Administrators must preserve existing required checks, require both new language jobs, and activate native CodeQL merge protection on main with Alerts: All and Security alerts: All. Verify real main/PR/fork/Dependabot/scheduled runs, processed results, initial-alert triage, and effective enforcement after deployment. These settings are not changed by this PR.

Native findings protection covers PR-diff findings and excludes merge groups. No merge queue is introduced.

Test plan

  • actionlint 1.7.12 and pinned action-input validation passed.
  • Two consecutive independent adversarial review rounds, two fresh reviewers each; no blocking findings.
  • Repository verification passed: formatting, linting, mypy, pyright, and 9,660 tests; 60 skipped.
  • Nested native-macOS sandbox coverage remains with trusted GitHub-hosted CI, as prescribed by the repository's Codex verification mode.
  • Final content matches the reviewed and verified state.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T01:34:38.322312Z 2e58b4a Manual request
🔒 Security Review ✅ Completed 2026-09-12T01:36:06.409513Z 2e58b4a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e58b4a526

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/codeql.yml Resolved
@jbeckwith-oai

Copy link
Copy Markdown
Contributor Author

@codex review

Please review exact head 2e58b4a526bb10b47c7196b9d98ec517d0b266bd against current target 298b87c72209ae88d1fb22f8361ebb89e876b2dc, including the actual merge result b0a7048bb92dfc296b1854e0a70dd9f994faf560.

The cooldown finding has an evidence-backed reply: #4964 already added the documented seven-day GitHub Actions cooldown on the target branch. The target and PR merge both contain it; GitHub documents that security updates bypass cooldown. Please assess whether any supported blocker remains in the one-file CodeQL change using that effective configuration. No new code was necessary, and all 22 exact-head checks remain green.

@HAYDEN-OAI HAYDEN-OAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed the complete 43-line workflow addition at 2e58b4a526bb10b47c7196b9d98ec517d0b266bd against merge base faf10fda7cd68bebdfba5edb887a0805cd1c9464. No substantive introduced defects found.

The main push/PR/weekly triggers, separate Python and Actions analyses/categories, pinned official actions, no-build analysis, non-persistent checkout credentials, and narrowly scoped upload permissions fit the intended security-scanning boundary without changing existing workflows.

The workflow correctly distinguishes successful analysis execution from findings-based protection. Requiring both language jobs and configuring native CodeQL protection with both severity thresholds set to All remain separate administrator steps; GitHub documents the PR-diff and merge-group limitations. This approval does not certify deployed enforcement or clear scanner findings. Repository-admin settings were not independently verified.

The earlier Actions cooldown concern is covered on current main by #4964, which adds the seven-day ordinary-update cooldown; this PR does not alter that configuration.

Static review only; I did not run or assess tests, CI, or mergeability.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 2e58b4a526

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 2e58b4a526

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jbeckwith-oai
jbeckwith-oai merged commit fbd2dbc into main Sep 12, 2026
22 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the codex/agents-python-codeql branch September 12, 2026 01:39
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