Skip to content

release: publish protected multi-architecture Codex Security images - #17

Open
dc-oai wants to merge 12 commits into
mainfrom
agent/codex-security-ghcr-image-release
Open

release: publish protected multi-architecture Codex Security images#17
dc-oai wants to merge 12 commits into
mainfrom
agent/codex-security-ghcr-image-release

Conversation

@dc-oai

@dc-oai dc-oai commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Prepare the official 0.1.1 Codex Security image for externally distributed, noninteractive, resumable CSV repository scans.

  • Preserve the existing supported public package version; do not overwrite the separately merged 0.1.1 SDK release.
  • Build and validate linux/amd64 and linux/arm64 on native runners.
  • Keep pull request validation registry-free; image publication cannot run from a pull request.
  • Preserve the normal no-host-setup Compose workflow and the existing customer-facing security controls: nonroot execution, dropped Linux capabilities, no-new-privileges, narrowed seccomp, private mounted authentication, and persistent scan results.
  • Provide a separately selectable, enforcing AppArmor profile and Compose override for restricted Ubuntu hosts. Do not require the override on other hosts.
  • Keep Codex’s preferred sandbox when the explicit AppArmor profile is active; retain the compatibility fallback only when it is actually required.
  • Bind a clean pinned repository scan to its authoritative Git revision without weakening manifest, coverage, target, or workbench validation.
  • Keep interactive repository discovery out of scope.

Protected publication

  • Require the source commit to belong to protected main, and require the image tag to match the exact public CLI version.
  • Fail closed before any platform image is pushed unless ghcr.io/openai/codex-security has been created, made publicly readable, and granted access to this repository.
  • Require independent approval through the protected container environment.
  • Verify anonymously pullable platform images and the multi-architecture candidate before promotion.
  • Generate provenance in a separate, minimal-permission job before promoting the versioned, commit, and latest tags.
  • Never overwrite an existing stable version.

Verification

  • All public checks pass on Linux amd64, Linux arm64, Ubuntu, macOS, and Windows.
  • The companion monorepo Buildkite run is green: 380 SDK tests, 346 Copyberry integration tests, and an actual clean public projection all pass.
  • Native restricted and unrestricted Ubuntu hosts verify the intended hardened customer sandbox and Compose paths.
  • Native Linux customer regression suite: 365 passed, 3 expected platform/integration skips, 0 failed.
  • Independently built and clean-installed the exact @openai/codex-security@0.1.1 tarball; verified the public SDK import, installed CLI, all 94 bundled scanner-plugin files, all 178 expected package entries, and absence of unexpected internal content.
  • Release and pull request workflows pass actionlint; TypeScript and formatting validation run against the exact 0.1.1 package.
  • Fresh authenticated pinned-repository, restricted-Ubuntu full-scan verification is being checked separately; do not interpret sandbox-only success as a completed scan.

Opening or merging this PR does not create the GHCR package or publish an image. First publication still requires an authorized package administrator and independent protected-environment approval.

Source-of-truth companion: https://github.com/openai/openai/pull/1199105.

@dc-oai
dc-oai marked this pull request as ready for review July 28, 2026 20:26
@dc-oai
dc-oai requested review from a team and mldangelo-oai July 28, 2026 20:27

@mldangelo-oai mldangelo-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 putting this together — there is a lot to like here, especially the native amd64/arm64 validation, SHA-pinned actions, digest-based platform builds, SBOM generation, and the updated host-aware AppArmor fallback with regression coverage.

I took another pass on the latest head and compared the publicly visible release flow with Promptfoo’s public Docker workflow. I left a few inline suggestions that I think would make the first release safer and more predictable: explicitly handle first-time GHCR visibility, only promote stable image tags after attestation and smoke checks have passed, serialize all publication paths while protecting version-tag stability, and keep provenance signing in a small dedicated job.

As an optional follow-up, a deterministic successful bulk-scan smoke test would also provide stronger coverage alongside the existing empty-CSV regression.

Really appreciate the attention to hardened defaults and the improvement to sandbox selection — this is close, and I think the small release-flow adjustments would make it much more robust.

Comment thread .github/workflows/container-release.yml Outdated
run: |
set -euo pipefail
docker logout ghcr.io
if ! docker pull "$IMAGE:$VERSION"; then

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.

Could we explicitly document or preflight the first-time public-package bootstrap here? Newly created GHCR packages start out private, so an initial publication can reach this anonymous pull only after platform images and tags have already been pushed, then fail. Making the visibility/bootstrap prerequisite explicit before promotion would give the first release a clear, predictable success path.

references+=("$IMAGE@sha256:$digest")
done

docker buildx imagetools create \

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.

Would it make sense to create or select the manifest by digest first, run attestation and the public-pull/Compose checks against that candidate, and promote the version and latest tags only after everything succeeds? At the moment a later failure can leave the user-facing tags published even though the release failed.

Comment thread .github/workflows/container-release.yml Outdated
workflow_dispatch:

concurrency:
group: container-release-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref }}

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.

Small release-race concern: the concurrency key uses the ref, so a manual main run and a version-tag run can both publish to the same image/version/latest at the same time. Could we use a shared repository/image-level group for non-PR publication, and avoid overwriting an already published version? Promptfoo’s public Docker workflow uses a shared publishing group for this reason.

- publish-platform
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:

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.

Could we move provenance generation into its own minimal job, passing in the verified manifest digest as an output? That would keep provenance-signing permissions separate from repository checkout, registry promotion, and Compose execution, and follows the narrowly scoped attestation-job pattern in Promptfoo’s public workflow.

@dc-oai
dc-oai requested review from a team and mldangelo-oai July 28, 2026 21:22

dc-oai commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks, Michael — addressed the GHCR visibility preflight, verify-and-attest-before-promotion flow, shared release concurrency and immutable version tags, and dedicated least-privilege signing job. I’ll keep the successful bulk-scan smoke test as a follow-up.

@mldangelo-oai mldangelo-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.

Please see the comments on the docs. Willing to give this a try. Thank you so much @dc-oai

Comment thread README.md
await security.close();
```

## Containerized bulk scans

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.

can we move most of this to the developer docs

Comment thread README.md
payments,https://github.com/example/payments.git,0123456789abcdef0123456789abcdef01234567
```

Once the approved image has been published, prepare private results and

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.

double check this

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.

2 participants