Skip to content

ci: Codex Actionを監査済みSHAへ固定する#251

Merged
ootakazuhiko merged 5 commits into
mainfrom
codex/issue-248-pin-codex-action
Jul 19, 2026
Merged

ci: Codex Actionを監査済みSHAへ固定する#251
ootakazuhiko merged 5 commits into
mainfrom
codex/issue-248-pin-codex-action

Conversation

@ootakazuhiko

@ootakazuhiko ootakazuhiko commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

概要(必須)

  • 変更内容: Codex Actionのactive sampleとChapter 13掲載例を監査済みfull commit SHAへpinし、Codex CLI exact version、read-only profile、checkout credential境界、更新手順、回帰checker/self-testを追加しました。

関連Issue/仕様(必須)

影響範囲(必須)

  • 対象章/ページ: /chapters/chapter13/
  • 影響: examples/workflows/codex-pr-review-comment.yml、Chapter 13の対応例、Book QA、package QA scriptだけを更新。repository settingsや実運用workflowは変更しません。

受入基準(必須)

  • Issue の受入基準を満たす
  • 変更禁止領域に触れていない
  • 章参照・内部リンク・アンカーが壊れていない
  • active workflow/sampleのmutable openai/codex-action@v1が0件
  • source/docsの対象節が改行正規化後に一致する

テスト/検証(必須)

  • upstream監査(2026-07-19):
    • v1 / v1.11 annotated tagをtarget commitまでdereferenceし、両方が52fe01ec70a42f454c9d2ebd47598f9fd6893d56を指すことを確認
    • target commitはGitHub APIでverified/valid、upstream CI 28712691847 success
    • target checkoutでpnpm install --frozen-lockfile、test 16/16、check/typecheck、build、dist差分0
    • upstream source checkoutのpnpm auditは10件(high 3 / moderate 5 / low 2)。公開GHSAなし、通常経路での到達可能性は未確定のため、本文に残存riskと再監査条件を明記
  • local:
    • mise exec node@24 -- npm ci: PASS、repository側audit 0
    • mise exec node@24 -- npm run test:light: PASS(契約checker + negative self-test、markdownlint、Jekyll buildを含む)
    • mise exec node@24 -- npm audit: PASS、0 vulnerabilities
    • actionlint(example / Book QA): PASS
    • upstream一次情報URL 4件: HTTP 200
    • git diff --check: PASS
  • test PRでの実action実行は、安全に利用できる既存OPENAI_API_KEY/課金契約がないため未実施。upstream CI、upstream local validation、repository静的契約、PR CIで代替します。

リスク/ロールバック(必須)

  • リスク: pin対象upstreamの依存auditに未解決項目があり、tagはunsignedです。target commitのGitHub verified状態、同一codeへの既存v1参照、GitHub-hosted単発/read-only用途への限定を根拠に条件付き採用します。self-hosted/ARC、unprivileged-user、同一job複数回実行は対象外です。
  • ロールバック手順: 本PRのsquash merge commitをrevertします。mutable tagへは戻さず、別の監査済みSHAを再選定します。

Review 対応(必須)

  • review 本文・inline comment・suggestion を全件確認した
  • 修正した指摘には返信した
  • 修正しない指摘には理由を返信した
  • 未解決の review thread が 0 件である

QA(必須)

merge 後確認(原則必須)

  • main の checks が green である
  • Pagesと公開先のsmoke testを実施した
  • 完了証跡をIssue #248に記録した

Pages確認(原則必須)

  • top HTTP 200
  • /chapters/chapter13/ HTTP 200 + action SHA / Codex CLI marker確認

AI支援/エージェント利用の開示(任意)

  • AI/エージェント利用: 有
  • 利用範囲: upstream監査補助、実装、契約checker、独立security review、検証

補足

  • Codex Action自体の採否、全repositoryの一括pin、repository settingsは対象外です。

Copilot AI review requested due to automatic review settings July 19, 2026 12:36
@ootakazuhiko

Copy link
Copy Markdown
Collaborator Author

@codex review

Issue #248の受け入れ条件、openai/codex-action v1.11 target SHAとCodex CLI pin、permission/secret/shell trust boundary、upstream audit記述、mutable ref回帰checker/self-test、src/docs/example同期を確認してください。

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

ℹ️ 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 scripts/check-chapter13-codex-action-contract.js 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

Chapter 13(Codex Action 例)と examples/ のサンプルについて、openai/codex-action を監査済みの full commit SHA に固定し、Codex CLI の exact version・read-only profile・権限境界の明確化、および回帰防止の 契約チェッカーを追加するPRです(Issue #248)。

Changes:

  • openai/codex-action@v1openai/codex-action@52fe01ec70a42f454c9d2ebd47598f9fd6893d56 # v1.11 へ置換し、codex-version: 0.144.6permission-profile: ":read-only" を明記
  • pin更新手順・監査メモ(一次情報URL、監査条件)を Chapter 13 に追記(src/docs/ 同期)
  • Chapter 13 Codex Action の supply-chain 契約チェッカー(self-test付き)を追加し、test:light と Book QA に組み込み

Reviewed changes

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

Show a summary per file
File Description
src/chapters/chapter13/index.md Chapter 13 の Codex Action 例を SHA pin + CLI version 固定に更新し、更新手順/監査ノートを追記
docs/chapters/chapter13/index.md 公開側(Pages)も同内容へ同期
examples/workflows/codex-pr-review-comment.yml サンプル workflow の action pin / read-only profile / CLI version 固定を反映
scripts/check-chapter13-codex-action-contract.js Chapter 13 のサンプル・本文同期・最小権限・pin条件などを検証する契約チェッカーを追加
package.json check:chapter13-codex-action と self-test を追加し test:light に組み込み
.github/workflows/book-qa.yml Book QA で契約チェッカーを実行するステップを追加

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

Comment thread examples/workflows/codex-pr-review-comment.yml
Comment thread src/chapters/chapter13/index.md
Comment thread docs/chapters/chapter13/index.md
@ootakazuhiko

Copy link
Copy Markdown
Collaborator Author

@codex review

419ecc0で全Codex Action stepの列挙検証、1 job 1 step契約、@main追加negative self-test、任意non-full-SHA ref検出へ強化しました。前回P2の解消と新規回帰がないことを再確認してください。

@ootakazuhiko

Copy link
Copy Markdown
Collaborator Author

@codex review

64c69f8で追加fetchを廃止し、checkout認証中のfetch-depth: 0 + persist-credentials: falseへ変更しました。public/private再現性、credential境界、全action ref検証、src/docs/example同期とchecker回帰を最新commitで確認してください。

@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: 64c69f8d93

ℹ️ 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 scripts/check-chapter13-codex-action-contract.js Outdated
@ootakazuhiko

Copy link
Copy Markdown
Collaborator Author

@codex review

0a53686で.github/workflowsexamplessrcdocsを再帰走査し、全uses: openai/codex-action@...を監査済みSHAと照合するrepository-wide checkerへ拡張しました。@main/未承認40桁SHAのself-testを含め、前回P2と新規回帰を最終確認してください。

@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: 0a53686db3

ℹ️ 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 scripts/check-chapter13-codex-action-contract.js Outdated
@ootakazuhiko

Copy link
Copy Markdown
Collaborator Author

@codex review

e78e0bcでuses値の単一/二重引用符とcolon前後の空白を検出し、引用符付き@mainの両形式をrepository-wide self-testへ追加しました。前回P2の解消と新規回帰がないことを最終確認してください。

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: e78e0bcd28

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

@ootakazuhiko
ootakazuhiko merged commit 56f54b2 into main Jul 19, 2026
2 checks passed
@ootakazuhiko
ootakazuhiko deleted the codex/issue-248-pin-codex-action branch July 19, 2026 12: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.

[P1][Supply Chain] codex-action例を監査済みcommit SHAへpinする

2 participants