Skip to content

fix: pin GitHub Actions to SHA in asset-size workflow - #6

Merged
yutafujita merged 10 commits into
masterfrom
claude/flamboyant-mendel
Apr 2, 2026
Merged

yutafujita merged 10 commits into
masterfrom
claude/flamboyant-mendel

Conversation

@yutafujita

@yutafujita yutafujita commented Apr 2, 2026 •

Copy link
Copy Markdown

Summary

GitHub Actionsのサプライチェーン攻撃対策として、外部Actionをタグ指定からSHA固定に変更し、合わせて非推奨バージョンを最新版にアップグレードしました。

社内セキュリティガイドライン (GitHub ActionsでSHA固定する)

SHA固定 + バージョンアップグレード

  • actions/checkout → v6 (SHA固定)
  • actions/setup-node → v6 (SHA固定)
  • actions/cache → 削除(setup-node v6のビルトインキャッシュ cache: 'npm' に移行)
  • chrysanthos/simple-asset-size-reporter@1.0.2 → SHA固定

CI安定化

  • Node.jsテストマトリクス更新: EOLバージョン (10.x〜17.x, 19.x) を削除し、サポート中のLTS (18.x, 20.x, 22.x) に変更
  • macOSをテストマトリクスから除外: grunt-contrib-jasmine が依存する puppeteer@19.x の古いHeadlessモードがmacOSランナーでタイムアウトするため
  • TypeScript型チェック修正: tsc index.d.ts --ignoreConfig --types node に変更し、TS 5.x系のTS5112エラーを回避

Test plan

  • ubuntu + Node.js 18.x/20.x/22.x/24.x でテストが通ること
  • windows + Node.js 18.x/20.x/22.x/24.x でテストが通ること
  • benchmarkジョブが通ること
  • typescriptジョブが通ること
  • asset-sizeジョブが通ること

🤖 Generated with Claude Code

yutafujita and others added 9 commits April 2, 2026 12:30
Pin external actions to commit SHAs instead of tags to mitigate
supply chain attacks where tags could be moved to malicious commits.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Upgrade actions/checkout, actions/setup-node, and actions/cache from
deprecated v3 to v4 to fix CI failures, with SHA pinning for supply
chain security.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Upgrade to actions/checkout@v6, actions/setup-node@v6, and
actions/cache@v5 to resolve Node.js 20 deprecation warnings.
Previous v4 versions will stop working after June 2, 2026.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove EOL Node.js versions (10.x-17.x, 19.x) from test matrix
and add 22.x. actions/setup-node@v6 no longer supports these
old versions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove manual npm cache directory creation and actions/cache usage
which conflicts with setup-node v6's automatic caching. Use
setup-node's built-in cache: 'npm' instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove macOS from test matrix due to Puppeteer timeout issue
  (grunt-contrib-jasmine uses deprecated puppeteer@19.x headless mode)
- Add --ignoreConfig flag to tsc command to fix TS5112 error
  with TypeScript 5.x when tsconfig.json is present

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use tsconfig.json for TypeScript compilation so that type definitions
(node, mocha) are properly loaded. The --noEmit flag ensures no output
files are generated, matching the original intent of type-checking only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Override tsconfig.json's target=ES5 (deprecated in TS 6.0) with
--target es2018 on the command line to avoid TS5107 error with
latest TypeScript.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use --ignoreConfig to avoid TS5112 conflict with tsconfig.json,
and --types node to provide Node.js type definitions needed by
index.d.ts (stream, NodeJS namespace, etc.).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread .github/workflows/tests.yml Outdated
Add Node.js 24 (current active, LTS from October 2025) to the
test matrix for broader compatibility coverage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yutafujita
yutafujita merged commit 245c4b0 into master Apr 2, 2026
12 checks passed
@yutafujita
yutafujita deleted the claude/flamboyant-mendel branch April 2, 2026 10:32
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