Skip to content

feat(settings): allow GitHub Actions log host in Claude sandbox network policy - #304

Merged
furedea merged 2 commits into
mainfrom
feat/allow-gha-log-host-in-sandbox
Dec 2, 2026
Merged

furedea merged 2 commits into
mainfrom
feat/allow-gha-log-host-in-sandbox

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

概要

Claude サンドボックスの sandbox.network.allowedDomains に results-receiver.actions.githubusercontent.com を完全一致で追加し,gh run view <run-id> --log-failed が CI 失敗ログをサンドボックス内から取得できるようにする.ワイルドカードは使わず,書き込み保護やガードには触れない.

Closes #303

計画: #303 (comment)

変更

  • agents/claude/settings.json: results-receiver.actions.githubusercontent.com をアルファベット順で追加
  • tests/claude/test_settings.py: ホストが許可され,ワイルドカードが含まれないことを検証するテストを追加

実通信先の確認

  • gh run view <run-id> --log-failed は https://results-receiver.actions.githubusercontent.com/rest/runs/<id>/logs?... へ接続し,サンドボックスに拒否されることをこの環境で再現した.
  • 参考: gh api repos/.../actions/jobs/<job-id>/logs(ジョブ単位)は productionresultssa<N>.blob.core.windows.net へリダイレクトされる.これは --log-failed の経路ではないため追加していない.
  • results-receiver の先に追加のリダイレクト先があるかは,サンドボックス内で接続できず未確認.
  • 別件: gh run view --log-failed は ~/.cache/gh にログのキャッシュを書くが,サンドボックスの書き込み許可に含まれず operation not permitted で失敗する(GH_CACHE_DIR を書き込み可能な場所に向けると回避できる).ネットワーク許可だけでは --log-failed は完結しない可能性があり,スコープ外のため別 Issue 候補として残す.

検証

  • pytest(全体): 6586 passed,1 failed.失敗は tests/hooks/test_model_rules_process.py::test_only_the_op_process_receives_the_token_and_only_allowlisted_variables で,変更を退避した origin/main 相当の状態でも同じく失敗する(既存の失敗)
  • ruff check・ruff format --check・ty check: 通過
  • dprint check: 変更ファイルは通過(リポジトリ全体では本変更と無関係の 43 ファイルが未整形)

計画からの逸脱: なし

🤖 Generated with Claude Code

レビュー対応

  • Codex P2(ジョブログのフォールバック先 productionresultssa<N>.blob.core.windows.net も許可すべき): feat(settings): allow GitHub Actions log host in Claude sandbox network policy #303 のスコープ(完全一致の単一ホスト,ワイルドカードなし)外のため対応しない.N が可変でワイルドカードか列挙が必要になるため,別 Issue で脅威評価とともに判断する.スレッドに理由を返信して解決済み.
  • CodeQL(Incomplete URL substring sanitization): テストの in 判定が URL 検証と誤検知されたため,既存の {...} <= domains 形式の部分集合判定に変更した.

…rk policy

Add results-receiver.actions.githubusercontent.com to
sandbox.network.allowedDomains so gh run view --log-failed can fetch
run logs from inside the sandbox.

Refs #303

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@furedea

furedea commented Dec 2, 2026

Copy link
Copy Markdown
Owner

@codex review

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Review summary: no blocking findings.

  • The change adds one exact-match domain, results-receiver.actions.githubusercontent.com, to sandbox.network.allowedDomains. The list stays alphabetical and there are no wildcards. Write protections and guards are untouched, so I found no security concern.
  • The new test checks the host is allowed and that no entry starts with *. That is enough for this config-only change.
  • The domain list isn't duplicated anywhere else in the repo, so nothing else needs updating.
  • As the PR description already says, gh run view --log-failed may still fail in the sandbox because ~/.cache/gh is not writable. This change only covers the network half. Please make sure the follow-up issue gets filed, or the stated goal in feat(settings): allow GitHub Actions log host in Claude sandbox network policy #303 won't be fully met.
  • I did not run the tests. The one failing test the author reports is said to fail on main too.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-02T13:56:20.312171Z 15eec70 Manual request
ℹ️ 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.

Comment thread tests/claude/test_settings.py Fixed

@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: 341e9c00a1

ℹ️ 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 agents/claude/settings.json Resolved
@furedea

furedea commented Dec 2, 2026

Copy link
Copy Markdown
Owner

@codex review

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Review summary: I found no P0–P2 issues.

  • agents/claude/settings.json: the added domain is an exact match, with no wildcard. It's in alphabetical order and valid JSON. No other file in the repo keeps a copy of the allowlist, so nothing else needs the same change.
  • tests/claude/test_settings.py: the new test covers the changed behavior. It checks that the host is allowed and that no wildcard entries exist.
  • P3 (no action needed here): as the PR description says, gh run view --log-failed also writes to ~/.cache/gh, which the sandbox doesn't allow. Adding the network host alone may therefore not make the command work end to end. I'd suggest opening the follow-up issue you mention. I didn't run anything in the sandbox, so I haven't confirmed this myself.

I didn't run the test suite. The PR reports one failure that also occurs on main, in test_model_rules_process.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 15eec70161

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

@furedea
furedea merged commit e832155 into main Dec 2, 2026
29 checks passed
@furedea
furedea deleted the feat/allow-gha-log-host-in-sandbox branch December 2, 2026 14:07
furedea pushed a commit that referenced this pull request Dec 2, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.8.0](v0.7.0...v0.8.0)
(2026-12-02)


### ⚠ BREAKING CHANGES

* **adr:** drop the ADR front matter and adr-check
([#301](#301))

### Features

* **adr:** drop the ADR front matter and adr-check
([#301](#301))
([971cccf](971cccf))
* **adr:** keep only current decisions in ADRs
([#294](#294))
([f27eb15](f27eb15))
* **delegation:** herdr-core のレーンを --no-parent ではなく --no-notify で起動する
([#297](#297))
([34d251b](34d251b))
* **settings:** allow GitHub Actions log host in Claude sandbox network
policy ([#304](#304))
([e832155](e832155))


### Performance Improvements

* **delegation:** speed up lane CI waits and polling intervals
([#300](#300))
([f68c8a2](f68c8a2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: furedea-release[bot] <353651101+furedea-release[bot]@users.noreply.github.com>
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.

feat(settings): allow GitHub Actions log host in Claude sandbox network policy

2 participants