フォーク側に溜まっていた 2 系統の変更をまとめて提出します。実装コードの変更はありません。 - #29
Merged
Merged
Conversation
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.
1. 秘密情報の誤コミット防止(pre-commit の gitleaks)
lefthook.yml/.gitignore/CONTRIBUTING.md/docs/dev/repo-security.md/.contrib/setup.sh一度 commit すると鍵は git 履歴に残り、除去には履歴の書き換えと鍵の失効・再発行が要ります。CI(
security.yml)の全履歴スキャンは最終防衛線ですが、そこで検知した時点で既に履歴に入っています。履歴に入る前に止められる唯一の場所が pre-commit なので、ここを本命の防御に据えました。GitHub の Push protection も push 時点の網で、かつ bitbank は GitHub の secret scanning パートナーではないため bitbank API キー専用の検出器が存在しません(詳細は
docs/dev/repo-security.md)。secret-file-namesで検査(.gitignoreはgit add -fと追跡済みファイルを防げないため 2 段構え)LEFTHOOK_REQUIRE_GITLEAKS=1でエラー、LEFTHOOK_SKIP_GITLEAKS=1でスキップあわせて
.github/workflows/ci.ymlの非ブロッキングなnpm auditを削除し、security.yml(--audit-level=high・ブロッキング)に一本化しました。high は critical を含むため、ci.yml 側は部分集合にしかならず、非ブロッキングな audit を重ねると「チェックがある」ように見えて実際には止まりません。2. README が実装に追従していなかったのを修正
README.mdコマンド一覧に
bitbank tax(events/reconcile/pnl/verify-report)・balance-history・profileの 3 つが載っておらず、Agent Skills にもtax-reportがありませんでした(カテゴリ小計が 7 + 1 + 2 + 2 = 12 本のまま。実数は 13 本)。chaos
s09が検査するのは Skill の総数プローズだけで、README でそれに当たるディレクトリツリー注記は 13 本と正しかったため、カテゴリ小計のズレは検出されないまま残っていました。skills/INDEX.mdとdocs/skill-workflow.mdは 3 つとも収録済みで、追従できていなかったのは README だけです。税務まわりは注意点も明記しました(読み取り専用・private GET のみ / 参考損益の 4 つの表示ガード(ADR-006) / 販売所を使う場合の
--brokerage-csv必須)。チェックリスト
npx vitest runが green(2191 passed)npx tsc --noEmitが greennpx biome check cli/が green