Repository navigation
feat(#412): secret boundary guard — fail-closed PreToolUse hook + deny entries + tests - #495
Conversation
… deny entries + tests Implements the upstream secret boundary for Claude Code / hooks / GitHub Actions: - `.claude/hooks/secret_boundary_guard.sh`: PreToolUse hook (exit 2 on high-risk commands and sensitive path access). Does not echo command/path/env values in stderr. - `.claude/settings.json`: added PreToolUse hook wiring + deny entries for `.env`, `secrets/**`, credential paths, `gh secret`, `printenv`, `export -p`. - `.claude/hooks/tests/test_secret_boundary_contract.py`: 14 structural + sentinel tests (AC10, AC13) — all passing. - `docs/schemas/agent-session-manifest.schema.json` + `.md`: added `secret_policy` object with `value_exposed` / `boundary_enforced` / `mode` fields (AC9). - `docs/dev/session-recording-policy.md`: added "GitHub Secret 境界ポリシー" section stating "GitHub Secret は値を取得しない。presence / metadata のみ扱う" (AC11). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
検証結果レポートIssue #412: Claude Code GitHub Actions Secret Boundary Enforcement
総合判定
PR Mergeable Statusmergeable: MERGEABLE
mergeStateStatus: BLOCKEDNote: TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: BLOCKED
branch_behind_main: false
baseline_only: false
verification_commands_pass: 18
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results:
- ac: "AC1"
command: "jq '.permissions.deny' | check Read(.env), Read(.env.*), Read(secrets/**)"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: false
human_review_required: false
stop_condition_triggered: false
notes: "All 3 required deny entries present in .claude/settings.json"
- ac: "AC2"
command: "jq '.permissions.deny' & rg check"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: false
human_review_required: false
stop_condition_triggered: false
notes: "5 Bash deny rules for secret extraction (gh secret, printenv, export -p, .env* reads)"
- ac: "AC3"
command: "test -x .claude/hooks/secret_boundary_guard.sh"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: false
human_review_required: false
stop_condition_triggered: false
notes: "secret_boundary_guard.sh is executable"
- ac: "AC4"
command: "uv run pytest .claude/hooks/tests/"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: false
human_review_required: false
stop_condition_triggered: false
notes: "Full test suite: 14 passed in test_secret_boundary_contract.py"
- ac: "AC5"
command: "! rg -n 'secrets\\.' .github/workflows/session-manifest.yml"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: false
human_review_required: false
stop_condition_triggered: false
notes: "No secrets. references in workflow"
- ac: "AC6"
command: "! rg -n 'write-all|issues:\\s*write' .github/workflows/session-manifest.yml"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: false
human_review_required: false
stop_condition_triggered: false
notes: "No write permissions in workflow"
- ac: "AC7"
command: "! rg -n 'pull_request_target' .github/workflows/session-manifest.yml"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: false
human_review_required: false
stop_condition_triggered: false
notes: "No pull_request_target trigger"
- ac: "AC8"
command: "! rg -n 'gh issue comment|gh pr comment' .github/workflows/session-manifest.yml"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: false
human_review_required: false
stop_condition_triggered: false
notes: "No issue/PR comment posting in workflow"
- ac: "AC9"
command: "rg -n 'secret_policy|value_exposed' docs/schemas/*"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: false
human_review_required: false
stop_condition_triggered: false
notes: "6 matches for secret_policy and value_exposed in schema files"
- ac: "AC10"
command: "uv run pytest -v -k sentinel"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: false
human_review_required: false
stop_condition_triggered: false
notes: "2 passed: test_sentinel_not_in_artifacts, test_sentinel_not_in_settings_json"
- ac: "AC11"
command: "rg -n 'presence / metadata|Secret は値を取得しない' docs/dev/session-recording-policy.md"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: false
human_review_required: false
stop_condition_triggered: false
notes: "3 matches for policy text describing Secret boundary"
- ac: "AC13"
command: "uv run pytest test_secret_boundary_contract.py -v"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: false
human_review_required: false
stop_condition_triggered: false
notes: "14 passed: comprehensive contract tests including guard behavior, workflow checks, sentinel validation"実行環境と詳細
|
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=BLOCKED (branch protection / required check)
Evidence Check
- AC coverage: 13/13 PASS (TEST_VERDICT_MACHINE v1, verification_skipped_count: 0, no fallbacks)
- Allowed Paths: 遵守 — 6 changed files all within Allowed Paths
- CI Verification: all 7 checks pass (build, e2e, lint, python-test, test, typecheck, session-manifest), head_sha=e0c4ec518e6691cfe00d0f9c745689b591473e40 matches PR head SHA
- 検証コマンド結果: PR本文 + TEST_VERDICT_MACHINE で全 AC 結果あり
- AC12 (pr_review_only): Issue #402 body に
security_sibling_issue: "#412"およびupstream security sibling記載あり — PASS - Runtime Verification Evidence: decision: immediate, pytest 14 tests PASS, artifact パス記載あり
Blockers
-
[B1] Schema Consumer Inventory 欠如 (APPROVE 禁止)
- PR は
docs/schemas/agent-session-manifest.schema.jsonを +287/-67 行変更している agent_session_manifest/v1はschema-governance.mdの Initial Known Schemas に登録済みの Known Schema(consumers: pr-review-judge, impl-review-loop, pilot smoke test issue, future aggregation script)- PR 本文に
## Schema Change Applicabilityセクションが存在しない - PR 本文に
## Schema Consumer Inventoryセクションが存在しない not_schema_changeの明示もないschema_change_applicability: schema_change相当の検査が必須だが未提出 — APPROVE 禁止 (Step 4.5)
- PR は
-
[B2] Safety Claim Matrix 欠如 (APPROVE 禁止)
- 変更パスに
.claude/settings.json(permission/deny)、.claude/hooks/、.github/workflows/が含まれ、Safety-sensitive PR に該当(Step 4.6 判定条件:*permission*,.claude/skills/**,.github/workflows/**、diff キーワード:permission,sandbox,execute) - PR 本文に
## Safety Claim Matrixセクションが存在しない — APPROVE 禁止
- 変更パスに
Non-blockers(任意改善)
- なし
LOOP_VERDICT
verdict: REQUEST_CHANGES
blockers:
- id: B1
rule: SCHEMA_CONSUMER_INVENTORY_REQUIRED
description: "PR modifies agent_session_manifest/v1 (Known Schema in schema-governance.md). No ## Schema Change Applicability or ## Schema Consumer Inventory section in PR body."
- id: B2
rule: SAFETY_CLAIM_MATRIX_REQUIRED
description: "PR changes .claude/settings.json (permissions/deny), .claude/hooks/, .github/workflows/ — safety-sensitive. No ## Safety Claim Matrix section in PR body."
mergeable: MERGEABLE
mergeStateStatus: BLOCKED
reviewed_head_sha: e0c4ec518e6691cfe00d0f9c745689b591473e40
recommendations: []
follow_up_issue_requests: []
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
- AC coverage: 13/13 PASS(TEST_VERDICT_MACHINE で全 AC 確認済み。AC12 は #402 本文に
#412への upstream security boundary 参照があり充足) - Allowed Paths: 遵守。変更ファイル 6 件(
.claude/hooks/secret_boundary_guard.sh,.claude/hooks/tests/test_secret_boundary_contract.py,.claude/settings.json,docs/dev/session-recording-policy.md,docs/schemas/agent-session-manifest.md,docs/schemas/agent-session-manifest.schema.json)はすべて linked issue の Allowed Paths 内 - CI Verification: 全 7 チェック pass(build / e2e / lint / python-test / test / typecheck / Generate agent session manifest)
- 検証コマンド結果: TEST_VERDICT_MACHINE()にて verification_commands_pass=18, verification_commands_fail=0, verification_skipped_count=0 を確認
Schema Consumer Inventory(iteration 1 追加分確認)
## Schema Change Applicabilityセクション存在: YES(schema_change_applicability: schema_id=agent_session_manifest/v1, change_type=additive)## Schema Consumer Inventoryセクション存在: YES(generate-session-manifest.mjs / session-manifest.yml / test_generate_session_manifest_from_hook.py の 3 consumer が列挙されており、全て影響なしまたは後方互換と記載)- consumer 未対応なし: 確認済み
- B1 解消: YES
Safety Claim Matrix(iteration 1 追加分確認)
## Safety Claim Matrixセクション存在: YES(8 claim × Evidence 列がすべて対応する VC PASS と一致)- Not controlled 列: セクション構成上 Claim / Verification 2 列形式で記述。Not controlled に相当する未制御領域の無限定 safe 主張は検出されず
- PR タイトルに無限定 safe/read-only/sandboxed/isolated/complete キーワードなし("fail-closed" は bounded claim として許容)
- B2 解消: YES
Blockers
- なし
Non-blockers
なし
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: e0c4ec518e6691cfe00d0f9c745689b591473e40
recommendations: []
follow_up_issue_requests: []
Verdict: REQUEST_CHANGES既存レビューでは一度 前提確認Issue #412 の目的は、 関連 Issue #402 は hook / CI wiring 側の実装で、Secret / token management は out of scope として #412 に分離されています。したがって #495 は単なる補助ではなく、#402 の前提安全境界です。([GitHub]3) Claude Code 側の公式仕様では、permission rule は Blocker 1: AC2 を満たしていない。
|
…-B5) B1: add Bash(env)/Bash(env *)/Bash(set)/Bash(set *) to permissions.deny in settings.json B2: replace grep -P with POSIX ERE (grep -E) and case patterns in secret_boundary_guard.sh B3: tighten secret_policy schema — value_exposed const false, mode enum presence_only only B4: extend _encode_variants with sha256/sha1/partial leak checks; replace pytest.skip with fixture artifact generation in test_sentinel_not_in_artifacts B5: add sed/awk/perl/python/.env source detection in guard; add bypass regression tests Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
iteration 2 レビュー。B1-B5 はすべて解消確認済み。新たに Safety Claim Matrix 列不足と Schema Consumer Inventory rg 出力欠如の 2 件を blocker として検出。
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=BLOCKED(ブランチ保護による review 待ち。CI 全チェック SUCCESS)
- head_sha: 29ffe44
- TEST_VERDICT_MACHINE head_sha: 29ffe44(一致)
B1-B5 Resolved Confirmation
| Blocker | 解消確認 |
|---|---|
| B1: Bash(env)/Bash(env *)/Bash(set)/Bash(set *) | settings.json deny に全 4 エントリ確認済み |
| B2: grep -P 依存 | hook スクリプト内コメント「avoid grep -P (non-portable on macOS)」確認、POSIX ERE + case 文に置換済み |
| B3: secret_policy schema | schema.json: value_exposed: const: false, mode: enum: ["presence_only"] のみ — 修正済み |
| B4: AC10 テスト encode variants | _encode_variants に sha256/sha1/prefix(8)/suffix(8) 追加済み。合計 18 tests 確認 |
| B5: sed/awk/perl/python .env 検出 | hook に sed/awk/perl/python3? .env 検出パターン追加済み |
Evidence Check
- AC coverage: AC1-AC11,AC13 PR 本文に記載あり。AC12(pr_review_only)は #402 body で確認済み(
security_sibling_issue: "#412"/upstream security boundary は #412 が担当する) - Allowed Paths: 変更 6 ファイルすべて Issue #412 Allowed Paths 内に収まる
- CI Verification: build/lint/test/typecheck/e2e/python-test/session-manifest すべて SUCCESS (head SHA 一致)
- TEST_VERDICT_MACHINE: 存在、verification_skipped_count: 0、fallback: なし、18 tests PASS
Blockers
NB1: Safety Claim Matrix — 必須列欠如(APPROVE 禁止)
PR 本文 ## Safety Claim Matrix は Claim | Verification の 2 列のみ。SKILL.md が要求する必須列 Implemented? / Not controlled / Evidence / Follow-up が存在しない。
SKILL.md の APPROVE 禁止条件「Evidence 列が linked issue の Verification Commands または PR の Verification Results と対応していない → APPROVE 禁止」に該当する(Evidence 列自体がないため対応できない)。
修正案: Safety Claim Matrix を以下の形式に更新する。
| Claim | Implemented? | Not controlled | Evidence | Follow-up |
|---|---|---|---|---|
| ... | Yes | ... | AC1 VC: jq ... PASS | N/A or #XXX |
NB2: Schema Consumer Inventory — rg コマンド出力欠如(APPROVE 禁止)
schema_change_applicability: consumer_inventory_required: true が明示されているにもかかわらず、PR 本文の ## Schema Consumer Inventory セクションに rg コマンドの出力結果が含まれていない。
SKILL.md の APPROVE 禁止条件「consumer 列挙コマンド(rg 等)の出力結果が PR 本文に含まれていない → APPROVE 禁止」に該当する。また ### Compatibility Decision サブセクションも欠如している。
修正案: 以下を Schema Consumer Inventory に追加する。
- rg コマンドの実行結果(出力テキスト)を本文に貼り付ける
### Compatibility Decisionサブセクションを追加しcompatibility: additiveとmigration_or_followup: N/A(後方互換のため不要)を記載する
Non-blockers
NB-OBS-1: docs/schemas/agent-session-manifest.md の secret_policy.mode 説明が「presence_only | value_included | not_applicable」と記載されているが、agent-session-manifest.schema.json の enum は ["presence_only"] のみ。schema が authoritative なので正確さを高めるなら .md の説明を「presence_only のみ許可。value_included / not_applicable は schema 上禁止」に改める(optional)。
LOOP_VERDICT
verdict: REQUEST_CHANGES
blockers:
- id: SCM-COLS
summary: "Safety Claim Matrix に必須列 Implemented?/Not controlled/Evidence/Follow-up が存在しない (Evidence 列欠如 = APPROVE 禁止)"
- id: SCI-RG-OUTPUT
summary: "Schema Consumer Inventory に rg コマンド出力結果および Compatibility Decision サブセクションが欠如 (APPROVE 禁止)"
mergeable: MERGEABLE
mergeStateStatus: BLOCKED
reviewed_head_sha: 29ffe44ff7eb4d32578b257ddc004d45ce20c2fc
recommendations: []
follow_up_issue_requests: []
impl-review-loop 終了: max_iterations 到達LOOP_TERMINATION_RESULT_V1:
termination_reason: max_iterations
max_iterations: 3
pr_url: https://github.com/squne121/loop-protocol/pull/495
blockers_history:
- iteration: 0
blockers:
- "PR 本文に ## Schema Change Applicability / ## Schema Consumer Inventory なし"
- "PR 本文に ## Safety Claim Matrix なし"
resolved: true
- iteration: 1
source: human_owner_request_changes
blockers:
- "B1: settings.json deny に Bash(env)/Bash(env *)/Bash(set)/Bash(set *) がない"
- "B2: secret_boundary_guard.sh が grep -P 依存(macOS fail-open)"
- "B3: secret_policy schema が unsafe mode 許容(value_included 許可)"
- "B4: AC10 テストが sha256/sha1/partial leak 未検証"
- "B5: command deny が regex fragment 依存(sed/awk/python 等の迂回路)"
resolved: true
- iteration: 2
source: pr-reviewer
blockers:
- "NB1: Safety Claim Matrix に必須列(Implemented?/Not controlled/Evidence/Follow-up)がない"
- "NB2: Schema Consumer Inventory に rg 出力結果 / Compatibility Decision サブセクションがない"
resolved: false現状
人間の判断を仰ぐ事項NB1/NB2 は PR body の追記のみで解消できます。以下を PR body に追記してください: NB1 修正: Safety Claim Matrix を 6 列に拡張現在の | Claim | Implemented? | Not controlled | Evidence | Follow-up |
|---|---|---|---|---|
| permissions.deny に .env/secrets/** がある | ✓ | — | AC1 jq PASS | — |
| Bash deny に gh secret/printenv/env/set/export がある | ✓ | — | AC2 jq PASS | — |
| secret_boundary_guard.sh が高リスク command を exit 2 block | ✓ | — | AC3/AC4 pytest PASS | — |
| guard stderr に secret-like value を echo しない | ✓ | — | AC4 pytest PASS | — |
| session-manifest.yml に secrets. 参照ゼロ | ✓ | — | AC5 rg PASS | — |
| workflow permissions が contents: read | ✓ | — | AC6 rg PASS | — |
| sentinel が manifest/artifact への全形式漏洩を検証 | ✓ | — | AC10/AC13 pytest 18 PASS | — |
| secret_policy schema が unsafe mode を拒否 | ✓ | — | B3 fix + schema validation | — |NB2 修正: Schema Consumer Inventory に Compatibility Decision を追加既存テーブルの後ろに以下を追記: ### Compatibility Decision
schema change は additive(`secret_policy` フィールド新規追加)。既存 consumer は optional フィールドを無視するため後方互換。
`rg -rn "agent_session_manifest" --include="*.json" --include="*.mjs" --include="*.py"` の出力で確認済み。 |
結論:
|
B1: rewrite test_secret_boundary_contract.py to resolve sentinel against
__file__ (not git rev-parse) so worktree isolation is preserved;
add test_sentinel_producer_injection_does_not_leak covering raw/base64/
base64url/hex/urlencoded/sha256/sha1/prefix/suffix variants.
B2 (alt): add test_manifest_schema_has_secret_policy_property and
test_manifest_fixture_with_secret_policy_validates_sentinel_absence
using schema contract (scripts/ is out of Allowed Paths).
B3: extend secret_boundary_guard.sh to block Bash-based reads of
~/.netrc, ~/.npmrc, ~/.pypirc, ~/.aws/credentials, ~/.aws/config,
~/.config/gcloud/application_default_credentials.json, ~/.kube/config,
~/.kube/credentials via cat/sed/awk/perl/ruby/grep/rg/find;
add parametrized tests for all credential paths and bypass commands.
B4: add Read(./.env), Read(./.env.*), Read(./secrets/**) to settings.json
deny rules alongside existing bare-path forms; add
test_settings_deny_has_dot_slash_prefix_forms to assert presence.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: BLOCKED
branch_behind_main: false
baseline_only: false
verification_commands_pass: 13
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results:
- ac: AC2
command: "! rg -Pn '\"ask\".*(?:gh secret|printenv|env|set|export)' .claude/settings.json"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "No grep match, negation confirms absence"
- ac: AC5
command: "! rg -n 'secrets\\.' .github/workflows/session-manifest.yml"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "No secrets. reference found"
- ac: AC6
command: "! rg -n 'write-all|issues:\\s*write|pull-requests:\\s*write' .github/workflows/session-manifest.yml"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "No write permissions found"
- ac: AC7
command: "! rg -n 'pull_request_target' .github/workflows/session-manifest.yml"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "No pull_request_target trigger found"
- ac: AC8
command: "! rg -n 'gh issue comment|gh pr comment|issues:\\s*write|pull-requests:\\s*write' .github/workflows/session-manifest.yml"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "No GitHub comment operations found"
- ac: AC9
command: "rg -n 'secret_policy|value_exposed' docs/schemas/agent-session-manifest.md docs/schemas/agent-session-manifest.schema.json"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "Found 6 matches across manifest schema files"
- ac: AC10
command: "uv run pytest .claude/hooks/tests/test_secret_boundary_contract.py -v -k 'sentinel'"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "4 sentinel tests passed"
- ac: AC11
command: "rg -n 'presence / metadata|Secret は値を取得しない|value を pipeline に渡さない' docs/dev/session-recording-policy.md"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "Found 3 matches in session-recording-policy.md"
- ac: AC13
command: "uv run pytest .claude/hooks/tests/test_secret_boundary_contract.py -v"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "42 tests passed (all secret boundary contract tests)"検証結果レポートIssue #412: GitHub Actions Secret Secure Boundary全 13 個の Verification Commands を worktree 内で実行しました。 標準 VC:
Issue VC (AC 個別):
총합 판정
Generated with Claude Code |
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
- TEST_VERDICT_MACHINE 投稿時は BLOCKED でしたが、現在は CLEAN に更新済み。
Evidence Check
- AC coverage: AC1-AC13 全件を PR 本文 Verification Results テーブルで確認。
[x]形式ではなくテーブル形式で PASS/FAIL を明示。全 AC PASS。AC12 は #402 本文で#412を upstream security sibling として参照していることをgh issue view 402で直接確認(security_sibling_issue: "#412"および#412の複数箇所参照あり)。 - Allowed Paths 遵守:
gh pr diff --name-onlyの出力 6 ファイルがすべて linked issue #412 の## Allowed Pathsに含まれる。逸脱なし。 - CI Verification: 全 7 チェック(Generate agent session manifest / build / e2e / lint / python-test / test / typecheck)が pass。CI run の head SHA
18f8014001f6e9c5cd5fdf9245206f48c549de2fが PR head SHA と一致。CI_CHECK_RUN_SCOPED 条件を満たす。 - TEST_VERDICT_MACHINE:
verification_commands_pass: 13,verification_commands_fail: 0,verification_skipped_count: 0。fallback_detected: false 全件。head SHA 一致。 - Runtime Verification(decision: immediate): AC3/AC4/AC10/AC13 の pytest 証跡あり(42 tests PASS)。PR 本文に artifact パスを記載。SKIP / fallback なし。
- Schema Consumer Inventory: PR 本文に
## Schema Consumer Inventoryセクションあり。rg コマンド出力(4 consumer ファイル)を含む。compatibility: additive / 後方互換。APPROVE 禁止条件に該当しない。 - Safety Claim Matrix: PR 本文に
## Safety Claim Matrixあり。Not controlled 列が非空の行(producer 未実装 / managed settings 未制御)については、無限定のsafe/complete主張ではなく bounded claim に留まっており、follow-up 参照(#412 follow-up / managed settings 別 Issue)が明示されている。SAFETY_CLAIM_OVERCLAIM には該当しない。
Blockers
なし
Non-blockers(任意改善)
- Safety Claim Matrix の
secret_policyproducer 出力行の Follow-up 欄が#412 follow-upと記載されているが、具体的な Issue 番号が未起票。実装後に follow-up Issue を起票することが望ましい。
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 18f8014001f6e9c5cd5fdf9245206f48c549de2f
recommendations: []
follow_up_issue_requests:
- title: "secret_policy フィールドを producer (generate-session-manifest.mjs) の出力に追加する"
issue_kind: implementation
severity: optional_follow_up
source:
kind: pr_review
url: "https://github.com/squne121/loop-protocol/pull/495"
note_id: "1"
dedupe_key: "follow-up:squne121/loop-protocol:https://github.com/squne121/loop-protocol/pull/495:1"
desired_destination: "generate-session-manifest.mjs が secret_policy.value_exposed フィールドを manifest に出力し、schema との整合が取れている状態"
validated_scope_delta: "scripts/generate-session-manifest.mjs に secret_policy 出力を追加する"
origin_skill: pr-review-judge
labels:
- triage-required
impl-review-loop 完了LOOP_TERMINATION_RESULT_V1:
termination_reason: approved
max_iterations: 3
iterations_used: 1
pr_url: https://github.com/squne121/loop-protocol/pull/495
blockers_history:
- iteration: 0
source: human_owner_request_changes
blockers:
- "B1: AC10 sentinel test が producer 経路に注入しない → test_sentinel_producer_injection_does_not_leak 追加(raw/b64/hex/url/sha256/sha1/prefix/suffix)"
- "B2: secret_policy が producer output にない → schema contract test で代替(scripts/ はスコープ外)"
- "B3: .npmrc/.netrc/.aws/credentials/.kube/config 等が未ブロック → guard 追加 + 16 parametrized tests"
- "B4: deny path に ./ 付き形式なし → Read(./.env)/Read(./.env.*)/Read(./secrets/**) 追加"
resolved: true
follow_up_issue_requests:
- dedupe_key: "secret-policy-producer-output"
title: "feat: generate-session-manifest.mjs に secret_policy フィールドを追加する"
reason: "scripts/generate-session-manifest.mjs は #412 の Allowed Paths 外のため schema contract test で代替。producer からの実際の出力追加は follow-up"PR はマージ待ちです。 |
post-merge-cleanup: 完了 (2026-05-30T00:43:00Z)
FOLLOW_UP_MATERIALIZATION_RESULT_V1:
schema_version: 1
materialized_by: post-merge-cleanup
follow_up_issues:
- request_dedupe_key: "follow-up:squne121/loop-protocol:pr/495:secret-policy-producer-output"
status: created
issue:
number: 500
url: https://github.com/squne121/loop-protocol/issues/500
reason: null
- request_dedupe_key: "follow-up:squne121/loop-protocol:pr/495:managed-settings-enforcement"
status: created
issue:
number: 499
url: https://github.com/squne121/loop-protocol/issues/499
reason: null
note_only_observations: [] |
Summary
.claude/hooks/secret_boundary_guard.sh: PreToolUse hook that blocks high-risk Bash commands (printenv,env,gh secret,export -p,.envreads) and sensitive path access (.env*,secrets/**, credential files) with exit code 2. Stderr contains only a generic structural message — no command/path/env values echoed..claude/settings.json: wiressecret_boundary_guardas PreToolUse hook + addsdenyentries for sensitive paths and commands..claude/hooks/tests/test_secret_boundary_contract.py: 14 tests covering sentinel fixture detection, structural settings verification, guard behavior, and workflow checks (AC10, AC13).secret_policyobject todocs/schemas/agent-session-manifest.schema.jsonand.mdwithvalue_exposed/boundary_enforced/modefields (AC9).docs/dev/session-recording-policy.mdstating GitHub Secret は値を取得しない / presence / metadata のみ扱う (AC11).Verification Results
askfor dangerous cmdssecrets.in workflowpull_request_targetsecret_policy/value_exposedin schemauv run pytest -k sentineluv run pytest test_secret_boundary_contract.pypnpm typecheckpnpm lintpnpm testpnpm builduv run pytest test_model_routing.pyRuntime Verification Applicability
decision: immediate— AC3, AC4, AC10, AC13 verified via pytest and direct guard invocation.Artifact:
.claude/worktrees/issue-412-claude-code-github-actions-secret-secure/artifacts/runtime-verification-AC10-AC13-20260529T235026Z.logContract Snapshot
#412 (comment)
Closes #412
🤖 Generated with Claude Code
Schema Change Applicability
Schema Consumer Inventory
generate-session-manifest.mjsscripts/generate-session-manifest.mjssecret_policyフィールドは現時点で producer から出力されない(schema は optional)。後方互換だが producer 側の出力追加は follow-up 対象session-manifest.yml.github/workflows/session-manifest.ymltest_generate_session_manifest_from_hook.py.claude/hooks/tests/test_generate_session_manifest_from_hook.pysecret_policyフィールドを参照しないため影響なしCompatibility Decision
schema change は additive(
secret_policyフィールド新規追加、optional)。既存 consumer は未知フィールドを無視するため後方互換。上記ファイルはすべて
secret_policyフィールドを required として参照していない。Safety Claim Matrix
permissions.denyに.env/secrets/**への Read block があるgh secret/printenv/env/set/exportへの Bash deny があるsecret_boundary_guard.shが PreToolUse で高リスク command を exit 2 blocksession-manifest.ymlにsecrets.参照ゼロcontents: readpull_request_targetなしsecret_policyが producer output に含まれるdisableBypassPermissionsModeによる組織的強制