Repository navigation
chore: pin npx lockage invocations to the package version - #19
Merged
Merged
Conversation
…:versions
Extract readPackageVersion into src/version.ts, pin the 3 MCP defs and 4 static hook defs to lockage@0.9.4, embed lockage@${version} in setup-kiro.ts generated hooks, and add scripts/sync-versions.ts (--check fail-closed + rewrite) with a sync:versions npm script. Supply-chain hardening: an installed config keeps invoking a known version instead of latest.
Merged
tacck
added a commit
that referenced
this pull request
Oct 17, 2026
* ci: add GitHub Actions publish (Trusted Publishing/OIDC) + version-bump, Git Flow docs, root AGENTS.md (#12) - publish.yml: on push to main, publish only when version is unpublished; authenticate via npm Trusted Publishing (OIDC, id-token: write, no NPM_TOKEN); upgrade npm to >=11.5.1 on Node 22.14; three-file version gate; tag vX.Y.Z. - version-bump.yml: workflow_dispatch patch/minor/major, sync 3 version files + lockfile, open PR targeting dev. - package.json: add repository field (required for Trusted Publishing). - docs/branch-strategy.md (new, English), root AGENTS.md (new, references it). - docs/releasing.md and releasing_ja.md: rewrite to the CI + OIDC flow. * fix(ci): pin npm upgrade to npm@^11 in publish workflow (#14) npm@latest is now 12.x, which requires Node ^22.22.2 and fails with EBADENGINE on the Node 22.14 the workflow pins, breaking the publish run. npm@11 (11.21.x) satisfies the Trusted Publishing floor (>=11.5.1) and supports Node >=22.9.0, so it works on Node 22.14. * fix(ci): bump publish workflow Node to 22.22 for node:sqlite FTS5 The publish workflow pinned node-version '22.14', whose bundled node:sqlite has no FTS5 (enabled upstream in Node 24.0.0 via nodejs/node#57621 and backported to 22.16). On 22.14 every board/ticket test aborts with 'no such module: fts5', so the Test step fails before publish can run. Verified by hand: FTS5 is absent on 22.14/22.15 and present from 22.16 onward (22.16/22.22/24 all OK). Pin to 22.22; it keeps npm@^11 (needs Node >= 22.9.0) working and the full suite passes 417/417 on linux Node 22.22. * chore: pin npx lockage invocations to the package version (#19) * feat: pin npx lockage invocations to the package version and add sync:versions Extract readPackageVersion into src/version.ts, pin the 3 MCP defs and 4 static hook defs to lockage@0.9.4, embed lockage@${version} in setup-kiro.ts generated hooks, and add scripts/sync-versions.ts (--check fail-closed + rewrite) with a sync:versions npm script. Supply-chain hardening: an installed config keeps invoking a known version instead of latest. * test: add fail-closed pin gate and update tests to pinned npx form * docs: document the pinned npx policy and sync it in version-bump CI * docs: state the branch-off-dev / PR-to-dev flow in AGENTS.md (#20)
tacck
added a commit
that referenced
this pull request
Oct 17, 2026
* ci: add GitHub Actions publish (Trusted Publishing/OIDC) + version-bump, Git Flow docs, root AGENTS.md (#12) - publish.yml: on push to main, publish only when version is unpublished; authenticate via npm Trusted Publishing (OIDC, id-token: write, no NPM_TOKEN); upgrade npm to >=11.5.1 on Node 22.14; three-file version gate; tag vX.Y.Z. - version-bump.yml: workflow_dispatch patch/minor/major, sync 3 version files + lockfile, open PR targeting dev. - package.json: add repository field (required for Trusted Publishing). - docs/branch-strategy.md (new, English), root AGENTS.md (new, references it). - docs/releasing.md and releasing_ja.md: rewrite to the CI + OIDC flow. * fix(ci): pin npm upgrade to npm@^11 in publish workflow (#14) npm@latest is now 12.x, which requires Node ^22.22.2 and fails with EBADENGINE on the Node 22.14 the workflow pins, breaking the publish run. npm@11 (11.21.x) satisfies the Trusted Publishing floor (>=11.5.1) and supports Node >=22.9.0, so it works on Node 22.14. * fix(ci): bump publish workflow Node to 22.22 for node:sqlite FTS5 The publish workflow pinned node-version '22.14', whose bundled node:sqlite has no FTS5 (enabled upstream in Node 24.0.0 via nodejs/node#57621 and backported to 22.16). On 22.14 every board/ticket test aborts with 'no such module: fts5', so the Test step fails before publish can run. Verified by hand: FTS5 is absent on 22.14/22.15 and present from 22.16 onward (22.16/22.22/24 all OK). Pin to 22.22; it keeps npm@^11 (needs Node >= 22.9.0) working and the full suite passes 417/417 on linux Node 22.22. * chore: pin npx lockage invocations to the package version (#19) * feat: pin npx lockage invocations to the package version and add sync:versions Extract readPackageVersion into src/version.ts, pin the 3 MCP defs and 4 static hook defs to lockage@0.9.4, embed lockage@${version} in setup-kiro.ts generated hooks, and add scripts/sync-versions.ts (--check fail-closed + rewrite) with a sync:versions npm script. Supply-chain hardening: an installed config keeps invoking a known version instead of latest. * test: add fail-closed pin gate and update tests to pinned npx form * docs: document the pinned npx policy and sync it in version-bump CI * docs: state the branch-off-dev / PR-to-dev flow in AGENTS.md (#20) * fix(ci): install deps before sync:versions in version-bump workflow (#22) The version-bump workflow failed in CI with exit 127 (tsx: not found): the 'Sync pinned npx versions' step runs 'npm run sync:versions' (tsx scripts/sync-versions.ts), but node_modules was never installed. Add an 'npm ci' step after Setup Node.js (matching publish.yml). Verification: - npm run typecheck: passed - npm test: 418 passing; 1 pre-existing failure in test/worktree.test.ts (git worktree ref/SHA assertion) reproduced on the clean baseline with this change stashed, so it is unrelated to this YAML-only edit. - YAML: no js-yaml/python-yaml available; validated by careful manual re-read (indentation and step structure match surrounding steps). * chore: bump version to v0.9.5 (patch) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.
概要
プラグインの
npx -y lockage呼び出しを、npm パッケージの version(package.jsonのversion)に完全固定(lockage@X.Y.Z)します。サプライチェーン攻撃対策として、悪意ある新バージョンが自動で取り込まれることを防ぎます。あわせて、version bump 時に全固定箇所を機械的に統一する仕組みを追加します。変更内容
バージョン固定(サーバ起動用 13 箇所)
plugins/claude/.mcp.json/plugins/kiro/mcp.json/plugins/antigravity/mcp_config.jsonplugins/claude/hooks/hooks.json/plugins/antigravity/hooks.json/plugins/kiro/hooks/lockage-guard.json/lockage-session.json(kiro-session のプレースホルダは保持)src/hook/setup-kiro.tsが生成する Kiro hook:src/version.tsのreadPackageVersion()で実行時に version を埋め込み(ソースに固定値なし)setup kiroインストーラと docs の@latestは意図的に非固定のまま。機械的統一の仕組み
scripts/sync-versions.tsを追加(既存sync-plugins.tsと同型、--checkで fail-closed 検証)+sync:versionsnpm script.github/workflows/version-bump.ymlにnpm run sync:versionsステップを追加し、bump 時に全固定箇所を自動で新 version へ同期fail-closed ゲート
test/plugins.test.tsに「全 npx 箇所がpackage.jsonversion と一致」する検証を追加(スクリプトと同じoutOfSync()を共用。version は package.json から導出、npx は起動しない)test/kiro-power.test.ts/test/hook-cli.test.tsの assert を固定形式へ更新ドキュメント
README.md/README_ja.md、docs/releasing.md/docs/releasing_ja.md、plugins/README.md/plugins/README_ja.mdを、従来の「非固定で publish だけで届く」モデルから「完全固定、プラグイン更新で新サーバ版が届く」方針へ更新(日本語版含む)テスト
npm run build/npm run typecheck/npm run sync:versions -- --checkすべて成功npm test418/419 passtest/worktree.test.ts(Issue worktree の切り元がローカルの base ブランチなので、origin より古いと古い状態から作業が始まる #8 の fetch 副作用に関する既存の環境依存フレーキーテスト)は本変更の範囲外。本ブランチは worktree 関連ファイルを一切変更しておらず、クリーンなdevでも同一テストが同様に失敗することを確認済み--checkが exit 1、テストが落ちる)ことを手動確認済みブロックした機能
なし