Repository navigation
feat: Web App 公開範囲ポリシーゲート(opt-in の check-webapp-policy.sh) - #205
Merged
Merged
Conversation
Owner
Author
|
自動セキュリティレビューの指摘 3 件を修正した(commit efccce5):
|
2 tasks done
h13
force-pushed
the
feat/195-webapp-policy-gate
branch
2 times, most recently
from
December 2, 2026 10:45
33a5806 to
d0fd5c7
Compare
Owner
Author
|
セルフレビュー(5 PR 一括)で CD ゲートのバイパス経路が見つかったため修正した(d0fd5c7 時点): 問題: ① policy 値を 修正: ① custom property の解決を Enforce ステップ内のシェル変数に移し |
h13
force-pushed
the
feat/195-webapp-policy-gate
branch
from
December 2, 2026 11:16
d0fd5c7 to
7d424e3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #195
概要
appsscript.jsonのwebapp.accessを組織の許可範囲より広げる変更を CI/CD で止める opt-in ゲートを追加する。WEBAPP_ACCESS_POLICY未設定の組織には挙動変化なし。scripts/check-webapp-policy.sh(template-sync 対象):webapp.access/webapp.executeAsを検査MYSELF < DOMAIN < ANYONE < ANYONE_ANONYMOUS。超過で failWEBAPP_ACCESS_ALLOW_RESOLVED(CI が org 管理者専用ソースから解決)でのみ付与。repo 変数は自己申告のため不可executeAs: USER_DEPLOYING+ DOMAIN 超は警告、WEBAPP_EXECUTE_AS_POLICY=failでエラー昇格WEBAPP_POLICY_HELP_URLで申請先を案内cd.yml/.gitlab/cd.yml— 正のゲート。credentials 取得より前に実行。GitHub は custom propertywebapp-access-allowをgh apiで解決、GitLab は group 変数WEBAPP_ACCESS_ALLOWLIST(JSON)を$CI_PROJECT_PATHで引くci.yml/.gitlab/ci.yml— PR/MR 向けの補助チェック(統制には数えない旨をコメントに明記)ci.ymlに fixture 13 ケースの自己テストジョブ(template リポのみ実行)Acceptance Criteria との対応
WEBAPP_ACCESS_POLICY未設定で挙動変化なし → スクリプト先頭で exit 0(fixture テストで検証).deploy_baseの先頭と cd.yml の checkout 直後に配置workflow_run= main の定義)側のゲートで担保。確認手順を docs に記載Test Plan
pnpm run check+pnpm run buildグリーンGITHUB_TOKENの metadata 権限で private リポの properties/values が読めるか)は Open Question のまま — 導入時に実機確認備考
${{ vars.* }}はすべてenv:経由で渡し、run 本文への直接補間なし。custom property 値は heredoc 形式でGITHUB_ENVに書き、スクリプト側でも値を検証node -eに引数渡し(シェル補間なし)