@guardsmith/cli 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +19 -3
- package/README.md +20 -3
- package/package.json +2 -2
package/README.ja.md
CHANGED
|
@@ -51,6 +51,21 @@ npx @guardsmith/cli explain claude-md/thin-diff
|
|
|
51
51
|
npx @guardsmith/cli version
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
| コマンド | 主なフラグ |
|
|
55
|
+
| ------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
56
|
+
| `guard new <dir>` | — |
|
|
57
|
+
| `guard init` | — |
|
|
58
|
+
| `guard lint` | `--root`、`--policy`、`--format console\|sarif\|json`、`--out`、`--no-cache`、`--no-gitignore` |
|
|
59
|
+
| `guard sync` | `--root`、`--policy`、`--write`、`--no-cache`、`--no-gitignore` |
|
|
60
|
+
| `guard explain <rule-id>` | — |
|
|
61
|
+
| `guard version` | — |
|
|
62
|
+
|
|
63
|
+
各 check は「**コミットされうるファイル**」を対象にします。既定で `.gitignore`(入れ子も)に
|
|
64
|
+
追従し、`.git/` は常に除外するため、`secret-scan` は `.claude/settings.local.json` の中身を
|
|
65
|
+
報告せず、`file-exists` は `.gitignore` 対象のパスを「存在しない」と扱います。さらにポリシーの
|
|
66
|
+
`ignore`(glob)を除外し、除外対象は結果フィルタではなく走査の時点で枝刈りします。
|
|
67
|
+
`--no-gitignore` で全走査に戻せます。
|
|
68
|
+
|
|
54
69
|
`guard new` の後は Claude Code でプロジェクトを開いてください — 同梱の `init-project`
|
|
55
70
|
スキルがインタビューを行い、テンプレートを具体化します。初期化が本当に完了すると
|
|
56
71
|
`guard lint` が PASS します。
|
|
@@ -62,9 +77,10 @@ npx @guardsmith/cli version
|
|
|
62
77
|
version: 1
|
|
63
78
|
target: claude-code
|
|
64
79
|
extends:
|
|
65
|
-
- github:novexar/guardsmith//presets/baseline.yaml@v0.
|
|
80
|
+
- github:novexar/guardsmith//presets/baseline.yaml@v0.6.0 # tag pinning is mandatory
|
|
66
81
|
# Projects with a frontend also add:
|
|
67
|
-
# - github:novexar/guardsmith//presets/frontend.yaml@v0.
|
|
82
|
+
# - github:novexar/guardsmith//presets/frontend.yaml@v0.6.0
|
|
83
|
+
ignore: [] # 全走査から除外する glob(extends 間で連結される)
|
|
68
84
|
rules: [] # add or override (redefining an id overrides it)
|
|
69
85
|
exemptions: [] # time-boxed waivers: reason + approved_by + expires required
|
|
70
86
|
```
|
|
@@ -80,7 +96,7 @@ GitHub の外に出ることはありません。期限切れの例外(exemption
|
|
|
80
96
|
workflow に 1 行追加:
|
|
81
97
|
|
|
82
98
|
```yaml
|
|
83
|
-
- uses: novexar/Guardsmith@v0.
|
|
99
|
+
- uses: novexar/Guardsmith@v0.6.0
|
|
84
100
|
```
|
|
85
101
|
|
|
86
102
|
違反した PR はサマリコメントと SARIF レポート付きで失敗します。閉域網などの環境では
|
package/README.md
CHANGED
|
@@ -51,6 +51,22 @@ npx @guardsmith/cli explain claude-md/thin-diff
|
|
|
51
51
|
npx @guardsmith/cli version
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
| Command | Key flags |
|
|
55
|
+
| ------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
56
|
+
| `guard new <dir>` | — |
|
|
57
|
+
| `guard init` | — |
|
|
58
|
+
| `guard lint` | `--root`, `--policy`, `--format console\|sarif\|json`, `--out`, `--no-cache`, `--no-gitignore` |
|
|
59
|
+
| `guard sync` | `--root`, `--policy`, `--write`, `--no-cache`, `--no-gitignore` |
|
|
60
|
+
| `guard explain <rule-id>` | — |
|
|
61
|
+
| `guard version` | — |
|
|
62
|
+
|
|
63
|
+
Checks operate on **files that could be committed**: `.gitignore` (nested files included)
|
|
64
|
+
is honoured by default and `.git/` is always excluded, so `secret-scan` never reports a
|
|
65
|
+
value inside `.claude/settings.local.json`, and `file-exists` treats a `.gitignore`'d path
|
|
66
|
+
as missing. The policy's `ignore` globs are excluded on top of that, and excluded trees are
|
|
67
|
+
pruned during traversal rather than filtered afterwards. `--no-gitignore` restores the full
|
|
68
|
+
scan when you want to audit ignored files.
|
|
69
|
+
|
|
54
70
|
After `guard new`, open the project with Claude Code — the bundled `init-project` skill
|
|
55
71
|
interviews you and concretizes the templates. `guard lint` passes once initialization
|
|
56
72
|
is genuinely complete.
|
|
@@ -62,9 +78,10 @@ is genuinely complete.
|
|
|
62
78
|
version: 1
|
|
63
79
|
target: claude-code
|
|
64
80
|
extends:
|
|
65
|
-
- github:novexar/guardsmith//presets/baseline.yaml@v0.
|
|
81
|
+
- github:novexar/guardsmith//presets/baseline.yaml@v0.6.0 # tag pinning is mandatory
|
|
66
82
|
# Projects with a frontend also add:
|
|
67
|
-
# - github:novexar/guardsmith//presets/frontend.yaml@v0.
|
|
83
|
+
# - github:novexar/guardsmith//presets/frontend.yaml@v0.6.0
|
|
84
|
+
ignore: [] # globs excluded from every scan (concatenated across extends layers)
|
|
68
85
|
rules: [] # add or override (redefining an id overrides it)
|
|
69
86
|
exemptions: [] # time-boxed waivers: reason + approved_by + expires required
|
|
70
87
|
```
|
|
@@ -80,7 +97,7 @@ Add one line to your workflow using the
|
|
|
80
97
|
[GuardSmith Lint Action](https://github.com/marketplace/actions/guardsmith-lint):
|
|
81
98
|
|
|
82
99
|
```yaml
|
|
83
|
-
- uses: novexar/Guardsmith@v0.
|
|
100
|
+
- uses: novexar/Guardsmith@v0.6.0
|
|
84
101
|
```
|
|
85
102
|
|
|
86
103
|
Violating PRs fail with a summary comment and a SARIF report. Air-gapped environments can
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardsmith/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "GuardSmith CLI — the guard binary (init / lint / sync / new / explain)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
"bin"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@guardsmith/core": "^0.
|
|
22
|
+
"@guardsmith/core": "^0.5.0"
|
|
23
23
|
}
|
|
24
24
|
}
|