Skip to content

feat: integrate Takumi Guard for npm supply chain protection - #8

Merged
yutafujita merged 4 commits into
masterfrom
feat/takumi-guard
Apr 2, 2026
Merged

yutafujita merged 4 commits into
masterfrom
feat/takumi-guard

Conversation

@yutafujita

@yutafujita yutafujita commented Apr 2, 2026 •

Copy link
Copy Markdown

Summary

ソフトウェアサプライチェーン攻撃の予防的対策として、npm installを実行する全GitHub ActionsジョブにTakumi Guard(GMO Flatt Security社提供のセキュアレジストリ)を導入しました。

https://88-oct.atlassian.net/wiki/spaces/OCT/pages/4693622946/Takumi+Guard

変更内容

  • tests.yml の全ジョブ(test / benchmark / typescript)に setup-takumi-guard-npm ステップを追加
  • asset-size.yml の compare ジョブに setup-takumi-guard-npm ステップを追加
  • 各ジョブに OIDC認証に必要な id-token: write パーミッションを追加
  • npm install 後に git checkout -- .npmrc を実行し、Takumi Guardによる .npmrc 変更がコミットされることを防止

対象ジョブ一覧

ワークフロー ジョブ 対応
tests.yml test ✅
tests.yml benchmark ✅
tests.yml typescript ✅
asset-size.yml compare ✅

Test plan

  • 全ジョブで setup-takumi-guard-npm ステップが正常に完了すること

🤖 Generated with Claude Code

yutafujita and others added 3 commits April 2, 2026 15:57
Add flatt-security/setup-takumi-guard-npm to all jobs that run
npm install, routing packages through Takumi Guard's security
proxy to detect and block malicious packages.

- Add setup-takumi-guard-npm step before npm install in all jobs
- Add id-token: write permission (required for OIDC auth)
- Add git checkout -- .npmrc after npm install to prevent
  Takumi Guard's .npmrc changes from being committed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The .npmrc file may not exist in the repository, causing
git checkout -- .npmrc to fail. Use || true to ignore the error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Takumi Guard's anonymous mode has IP-based rate limits which can
trigger 429 errors when multiple matrix jobs run concurrently.
Retry npm install with increasing delays (30s, 60s) on failure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
linhmtran168
linhmtran168 previously approved these changes Apr 2, 2026
Base automatically changed from claude/flamboyant-mendel to master April 2, 2026 10:32
@yutafujita
yutafujita dismissed linhmtran168’s stale review April 2, 2026 10:32

The base branch was changed.

@yutafujita
yutafujita merged commit f1a2623 into master Apr 2, 2026
11 checks passed
@yutafujita
yutafujita deleted the feat/takumi-guard branch April 2, 2026 10:40
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.

2 participants