Skip to content

feat(action)!: prepare hosted runners and require completed PR checks - #1580

Merged
mldangelo-oai merged 29 commits into
mainfrom
mdangelo/codex/security-ci-usability
Nov 3, 2026
Merged

mldangelo-oai merged 29 commits into
mainfrom
mdangelo/codex/security-ci-usability

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Prepare GitHub-hosted Ubuntu runners for Codex Security scans and make the pull-request check require a completed scan or a verified empty diff for its event snapshot.

Changes

  • Install Bubblewrap and its AppArmor profile on GitHub-hosted Ubuntu 24.04 virtual machines, then check sandbox readiness before forwarding scan credentials. Temporarily avoid the affected PHP restart during package installation when needrestart is installed.
  • Bind scans and acceptance checks to the PR head, target branch, and live base revision on the triggering GitHub host. Use distinct check names for different target branches and separate concurrency for title and body edits.
  • Require fail-on-severity: none for dry runs. The required-check example rejects dry runs, failed or cancelled scans, and skipped scan jobs; verified empty diffs remain successful no-ops.
  • Link uploaded report artifacts in the job summary and update examples and integration checks for the configured model and cost settings.
  • Explain the protected-workflow and merge-time freshness prerequisites in the Action README, migration to the target-specific required check, and the permissions needed by the SARIF example. Suggested published-docs update: align the GitHub Actions setup and required PR checks workflow with these prerequisites and the Ubuntu setup behavior.

Testing

Final commit deb147e3 changes only the Action README. Documentation checks and all 31 example tests pass. Executable source, tests, workflows, generated files, and dependency metadata match qualified parent 322d369e, where the following passed:

  • In github-action: npm run build and npm run validate — 222 tests, TypeScript, metadata/docs checks, and generated distribution parity passed.
  • npm run test:cli — integration against the locked published CLI passed with synthetic inputs and no external model calls, including sandbox readiness and filesystem enforcement.
  • SDK Action-release and dependency-pin suites — 56 tests passed with Bun 1.3.14 and seed 12345.
  • Actionlint for repository workflows and both Action examples; ShellCheck for the CI-listed shell scripts and the generated package-install shell fragment.

Hosted checks for deb147e3, including the Ubuntu 24.04 sandbox-setup smoke test, remain pending.

Risk and rollout

This changes dry-run compatibility: configurations combining a dry run with severity enforcement must set fail-on-severity: none. Automatic sandbox setup modifies packages and the AppArmor profile on supported GitHub-hosted Ubuntu virtual machines. Self-hosted runners and job containers need a working sandbox beforehand.

The example verifies its event snapshot. Repositories requiring a scan of the current merge diff must separately enforce trusted workflow provenance and a merge-time gate that requalifies whenever the live base changes, including after this check completes. A same-head status check and strict up-to-date requirement alone do not establish that freshness; CODEOWNERS alone does not establish workflow provenance. The example targets repositories without merge queues; merge_group is unsupported. Fork contributions need an approved scan path before the required check can succeed.

Release the Action with its matching CLI through the coordinated release workflow.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@github-actions github-actions Bot added the breaking-change Breaking change called out in generated release notes label Oct 11, 2026
@mldangelo-oai
mldangelo-oai marked this pull request as ready for review October 11, 2026 00:31
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 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-10-31T04:37:10.755096Z deb147e New commits
🔒 Security Review ✅ Completed 2026-10-31T04:38:56.346705Z deb147e New commits

Security findings

Blocking findings (1)

ℹ️ 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.

@mldangelo-oai
mldangelo-oai force-pushed the mdangelo/codex/security-ci-usability branch from d207baa to 442b3b5 Compare October 11, 2026 02:02
@mldangelo-oai
mldangelo-oai changed the base branch from main to mdangelo/codex/security-gpt6-pricing October 11, 2026 02:02

@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: 442b3b5881

ℹ️ 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-action/src/runtime.ts Resolved
Comment thread github-action/examples/pull-request.yml Resolved

@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 Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 442b3b5881

ℹ️ 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.

Comment thread github-action/src/runtime.ts Resolved
Base automatically changed from mdangelo/codex/security-gpt6-pricing to main October 11, 2026 05:47
@mldangelo-oai
mldangelo-oai requested a balanced review from Copilot October 11, 2026 18:01

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 901bf60db3

ℹ️ 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".

Copilot AI 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.

🔵 Needs a closer look

It combines breaking enforcement behavior with privileged runner configuration and credential-boundary changes requiring final human review.

0 open findings

What changed in this PR

Prepares hosted Ubuntu runners automatically and makes configured severity enforcement require complete reviews.

Changes:

  • Provisions and verifies the sandbox before credential-bearing scans.
  • Fails incomplete enforced scans while preserving reports and artifact links.
  • Adds canonical repository/PR workflows with a required review gate.
File Description
action.yml Updates public input/output behavior.
.github/​workflows/​action-ci.yml Exercises automatic sandbox setup.
github-action/​src/​runtime.ts Provisions and probes the sandbox.
github-action/​src/​main.ts Enforces completeness and links artifacts.
github-action/​src/​inputs.ts Rejects enforcement during dry runs.
github-action/​src/​reporting.ts Describes enforcement and report links.
github-action/​src/​artifacts.ts Returns uploaded artifact IDs.
github-action/​scripts/​linux-smoke.mjs Verifies the real sandbox probe.
github-action/​scripts/​generate-input-docs.mjs Generates workflow examples.
github-action/​scripts/​cli-integration.ts Validates example configurations.
github-action/​examples/​repository.yml Adds the canonical repository workflow.
github-action/​examples/​pull-request.yml Adds the required PR review workflow.
github-action/​README.md Documents new behavior and examples.
github-action/​dist/​index.cjs Updates the shipped Action bundle.
github-action/​tests/​runtime.test.ts Tests provisioning and preflight.
github-action/​tests/​main.test.ts Tests enforcement and artifact links.
github-action/​tests/​reporting.test.ts Tests incomplete-scan messaging.
github-action/​tests/​inputs.test.ts Tests dry-run restrictions.
github-action/​tests/​input-docs.test.ts Tests workflow generation.
github-action/​tests/​examples.test.ts Tests the required-review gate.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mldangelo-oai
mldangelo-oai requested a balanced review from Copilot October 11, 2026 23:32
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 02e56a5cc2

ℹ️ 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".

Copilot AI 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.

🟡 Changes recommended

The top-level README still documents the previous sandbox setup and incomplete-scan behavior.

1 open finding

🧠 Review effort: Balanced

Comment thread github-action/README.md Resolved
@mldangelo-oai
mldangelo-oai requested a balanced review from Copilot October 12, 2026 00:21
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: ab1e6bfbbd

ℹ️ 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".

Copilot AI 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.

🔵 Needs a closer look

It combines privileged runner configuration, breaking enforcement semantics, and coordinated release-time CLI pinning that warrant final human verification.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the runner preparation and required-check updates. Current-head merge-safety review of 5ccb66845b57d45f463fd467ad8fa5537bbf406c found no new material issue. The existing README model correction remains a nonblocking suggestion; I have not repeated it inline.

Fresh validation passed all 195 Action tests, types, metadata/docs checks and byte-exact distribution reproduction. I reviewed the rebased provider, repository-origin and patched artifact-upload integration. Sandbox setup/probe code and the pinned runtime are unchanged from the previously verified hosted run; no new privileged runner provisioning or live model scan was performed locally.

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for tightening the runner setup and required-check contract. Reviewed all 20 changed files at 6870d26; the sandbox probe runs before scan credentials are supplied, and the required job accepts only a completed scan or a verified empty diff. The earlier model-description mismatch is fixed.

Fresh validation on Node 24 passed all 195 tests, typechecking, metadata/docs checks, and the generated-bundle comparison. No actionable issue found. Privileged hosted-runner provisioning and the pinned CLI integration were not rerun locally; their inputs match the previously validated hosted version.

@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: 7657cf0519

ℹ️ 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-action/examples/pull-request.yml Resolved
Comment thread github-action/examples/pull-request.yml Resolved

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for tightening hosted runner preparation and the required PR check. Reviewed all 21 changed files and their current integration; no remaining actionable issue. Base retargets trigger a scan, title/body edits preserve the substantive check, and the documented merge-queue limitation is clear. Sandbox setup and its probe run before scan credentials are supplied.

Fresh validation passed all 204 Action tests, types, metadata/docs checks, workflow linting and byte-exact bundle reproduction. Current hosted CI separately passed actual Ubuntu sandbox preparation, the shipped sandbox probe, dry-run/post cleanup and pinned CLI compatibility. No live provider scan or privileged local provisioning was performed.

@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: 8bb135153c

ℹ️ 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-action/src/runtime.ts Resolved

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for tightening the preflight and setup flow. The installed CLI configuration is checked before provisioning, ordinary provider/configuration errors do not trigger apt, and the required PR gate still distinguishes completed scans from skipped work. No material issue found.

Fresh validation passed all 211 Action tests, types, metadata/docs checks, byte-exact bundle reproduction, formatting and configured workflow linting. Current hosted CI also passed the matching Action tree, published CLI integration, packaged sandbox/dry-run smoke and cleanup.

The existing needrestart discussion remains a nonblocking setup-efficiency follow-up: the historical log shows a roughly 90-second recoverable PHP restart timeout, while CI preconfigures its exemption. I did not establish an apt failure or indefinite hang.

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for tightening the standalone runner setup and PR-check behavior. I completed an owner-level merge-safety review of all 24 changed files at deb147e38c020f91d6af598ff88501b67f3e2bd9; no material unresolved findings.

The required-check example intentionally qualifies its event snapshot. Trusted workflow provenance and merge-time requalification remain separate prerequisites, as documented. The dry-run/severity compatibility change is explicit, and the temporary needrestart workaround now belongs to the Action itself.

Fresh local validation passed 143 selected functional/workflow tests, types, metadata/docs checks, byte-exact bundles, actionlint and ShellCheck. Current hosted CI passed all 222 Action tests, packaged smoke and pinned CLI integration on an exact-tree merge; separate smoke steps checked out this exact head and passed automatic Ubuntu setup, sandbox startup, both credential-free provider configurations and cleanup. I did not run the full suite or privileged setup locally, and no live model/provider call was performed.

@mldangelo-oai
mldangelo-oai merged commit f601cd6 into main Nov 3, 2026
90 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/security-ci-usability branch November 3, 2026 02:23
@github-actions github-actions Bot mentioned this pull request Nov 3, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Breaking change called out in generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants