Skip to content

ci: fix Codex permission profile handoff#721

Merged
jbeckwith-oai merged 6 commits into
mainfrom
codex/fix-go-version-review-home
Jul 22, 2026
Merged

ci: fix Codex permission profile handoff#721
jbeckwith-oai merged 6 commits into
mainfrom
codex/fix-go-version-review-home

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Summary

Fix the monthly Go version review so the unprivileged Codex process loads its checked-in permission profile.

The workflow now installs the profile at the target user's real default Codex home, lets codex-action resolve that home itself, and pre-creates the proxy's per-run handoff file with runner-only write access.

Root cause

The workflow passed a workspace-relative codex-home to codex-action. With the unprivileged-user safety strategy, the action launches Codex through sudo -u codex; sudo resets the explicit CODEX_HOME, so Codex searched its actual user home and could not see the named [permissions] table.

The production dispatch failed closed with:

Error: default_permissions requires a [permissions] table

The publisher and CI-dispatch jobs were skipped, and no branch or pull request was created.

Security impact

This does not loosen the action's GitHub permissions, environment/secret scope, network denial, generated-file allowlist, or publisher isolation. The permission profile is installed read-only, and only the runner-owned proxy can write its per-run handoff file before the action changes that file to root-owned, read-only mode.

Validation

  • actionlint v1.7.9
  • git diff --check
  • Codex CLI v0.144.6 loaded the go-version-review profile from a read-only default home and advanced to the intentionally invalid model-provider check

Copilot AI review requested due to automatic review settings July 21, 2026 22:08
@jbeckwith-oai
jbeckwith-oai marked this pull request as ready for review July 21, 2026 22:11
@jbeckwith-oai
jbeckwith-oai requested a review from a team as a code owner July 21, 2026 22:11

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.

Pull request overview

Updates the monthly Go version review automation to ensure the unprivileged Codex process can reliably load the checked-in permission profile across the sudo boundary used by the unprivileged-user safety strategy.

Changes:

  • Move the Codex home/profile install location from a workspace-relative path to the unprivileged user’s default Codex home (/home/codex/.codex).
  • Pre-create the per-run proxy handoff file and let codex-action resolve the Codex home without an explicit codex-home input.
  • Clarify comments in the Codex permission profile TOML to match the new installation behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/go-version-review.yml Installs the permission profile into the unprivileged user’s default Codex home and adjusts setup to support unprivileged-user execution.
.github/codex/go-version-review-config.toml Updates commentary to reflect the new workflow installation path and isolation approach.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/go-version-review.yml
Comment thread .github/workflows/go-version-review.yml
@openai-sdks

openai-sdks Bot commented Jul 21, 2026

Copy link
Copy Markdown

OkTest Summary

237/237 SDK tests passed in 9.258s for Go SDK PR #721.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 151ms
tests/chat-completions-create.test.ts ✅ Passed 254ms
tests/chat-completions-stream.test.ts ✅ Passed 107ms
tests/files-content-binary.test.ts ✅ Passed 119ms
tests/files-create-multipart.test.ts ✅ Passed 116ms
tests/files-list-pagination.test.ts ✅ Passed 136ms
tests/initialize-config.test.ts ✅ Passed 247ms
tests/instance-isolation.test.ts ✅ Passed 114ms
tests/models-list.test.ts ✅ Passed 190ms
tests/responses-background-lifecycle.test.ts ✅ Passed 221ms
tests/responses-body-method-errors.test.ts ✅ Passed 345ms
tests/responses-cancel-timeout.test.ts ✅ Passed 239ms
tests/responses-cancel.test.ts ✅ Passed 231ms
tests/responses-compact-retries.test.ts ✅ Passed 240ms
tests/responses-compact.test.ts ✅ Passed 221ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 160ms
tests/responses-create-advanced.test.ts ✅ Passed 182ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.006s
tests/responses-create-errors.test.ts ✅ Passed 267ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 113ms
tests/responses-create-retries.test.ts ✅ Passed 208ms
tests/responses-create-stream-failures.test.ts ✅ Passed 125ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 202ms
tests/responses-create-stream-wire.test.ts ✅ Passed 2.404s
tests/responses-create-stream.test.ts ✅ Passed 110ms
tests/responses-create-terminal-states.test.ts ✅ Passed 211ms
tests/responses-create-timeout.test.ts ✅ Passed 215ms
tests/responses-create.test.ts ✅ Passed 277ms
tests/responses-delete.test.ts ✅ Passed 210ms
tests/responses-input-items-errors.test.ts ✅ Passed 154ms
tests/responses-input-items-list.test.ts ✅ Passed 166ms
tests/responses-input-items-options.test.ts ✅ Passed 192ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 204ms
tests/responses-input-tokens-count.test.ts ✅ Passed 215ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.017s
tests/responses-not-found-errors.test.ts ✅ Passed 333ms
tests/responses-parse.test.ts ✅ Passed 152ms
tests/responses-retrieve-retries.test.ts ✅ Passed 268ms
tests/responses-retrieve.test.ts ✅ Passed 189ms
tests/responses-stored-method-errors.test.ts ✅ Passed 530ms
tests/retry-behavior.test.ts ✅ Passed 3.037s
tests/sdk-error-shape.test.ts ✅ Passed 310ms

View OkTest run #29949164003

SDK merge (1c660eb4e639) · head (13eba7e01e2d) · base (11f52335b412) · OkTest (d2b5921fc22a)

Copilot AI review requested due to automatic review settings July 21, 2026 22:17

@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: 2d87853cda

ℹ️ 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/go-version-review.yml
Comment thread .github/workflows/go-version-review.yml

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 21, 2026 22:27
@jbeckwith-oai
jbeckwith-oai force-pushed the codex/fix-go-version-review-home branch from df1a06f to e484773 Compare July 21, 2026 22:30

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/go-version-review.yml Outdated
Comment thread .github/workflows/go-version-review.yml Outdated
Comment thread .github/workflows/go-version-review.yml Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 22:31

@HAYDEN-OAI HAYDEN-OAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One security-boundary issue remains at this head, so I am leaving a COMMENT review rather than approving. The rest of the audited split looks sound: proposal token/secret scope, disabled command network, fresh credential-free publisher with allowlist/content validation, and the isolated dispatch job.

Comment thread .github/workflows/go-version-review.yml Outdated

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

.github/workflows/go-version-review.yml:68

  • The pinned actions/checkout hash is annotated as # v6.0.2 here, but other workflows in this repo annotate the same pinned hash as # v6 (e.g., .github/workflows/ci.yml:42, codeql.yml:37). For consistency (and to avoid implying the hash maps to a specific patch tag), align this comment with the established convention.
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/go-version-review.yml:254

  • The pinned actions/checkout hash is annotated as # v6.0.2 here, but other workflows in this repo annotate the same pinned hash as # v6 (e.g., .github/workflows/ci.yml:42, codeql.yml:37). For consistency (and to avoid implying the hash maps to a specific patch tag), align this comment with the established convention.
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

Copilot AI review requested due to automatic review settings July 21, 2026 23:03

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/go-version-review.yml

@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: 993f0c87af

ℹ️ 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/go-version-review.yml
Copilot AI review requested due to automatic review settings July 21, 2026 23:11
@jbeckwith-oai
jbeckwith-oai force-pushed the codex/fix-go-version-review-home branch from 993f0c8 to ac00155 Compare July 21, 2026 23:11

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/workflows/go-version-review.yml:100

  • CODEX_AUTOMATION_DIR (the workspace .codex-automation directory) is no longer created in this step after moving CODEX_AUTOMATION_HOME to /home/codex/.codex. Later steps write $GO_RELEASE_FEED and other paths under .codex-automation, so the workflow will fail if the directory doesn't already exist.
          # The action normally creates this home itself. We create it first so
          # the named permission profile is present before Codex starts. Root
          # ownership plus the sticky bit lets the runner-group members create
          # their own disposable state without replacing one another's files.

@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: ac00155702

ℹ️ 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/go-version-review.yml
Copilot AI review requested due to automatic review settings July 21, 2026 23:26

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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 22, 2026 00:04
@jbeckwith-oai
jbeckwith-oai force-pushed the codex/fix-go-version-review-home branch from c323a2c to f29c5f4 Compare July 22, 2026 00:04

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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@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: f29c5f4cd5

ℹ️ 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/go-version-review.yml
Comment thread .github/codex/go-version-review-config.toml
Comment thread .github/codex/prompts/go-version-review.md Outdated
Copilot AI review requested due to automatic review settings July 22, 2026 01:09
@jbeckwith-oai

Copy link
Copy Markdown
Contributor Author

@codex review

All currently open findings were addressed in 13eba7e; please review the current head.

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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@jbeckwith-oai

Copy link
Copy Markdown
Contributor Author

@HAYDEN-OAI ME GRIMLOCK FIX ALL OPEN FINDINGS IN 13eba7e. KEY STAY LOCKED AWAY, LOOPBACK STAY CLOSED, FULL TESTS RUN BEFORE GITHUB TOKEN. CI GREEN. PLEASE RE-REVIEW AND STAMP.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 13eba7e01e

View security finding report

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

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 13eba7e01e

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

@HAYDEN-OAI HAYDEN-OAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thermo-nuclear review complete at 13eba7e. No substantive structural, maintainability, boundary, or correctness issues found. I validated the pinned codex-action home/proxy semantics, reviewed the current discussion and permission boundary, reran actionlint v1.7.9 and git diff --check, and confirmed the repository checks are green.

@jbeckwith-oai
jbeckwith-oai merged commit 1c660eb into main Jul 22, 2026
18 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the codex/fix-go-version-review-home branch July 22, 2026 16:58
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