security-harness-kit 0.5.4 → 0.5.6
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.md +61 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ With `shk`, you can:
|
|
|
26
26
|
|
|
27
27
|
- Scan project paths and Git-staged files for common secrets and PII across source code, Markdown, plain text, Office documents (`.docx`, `.xlsx`, `.pptx`), and text-layer `.pdf` files.
|
|
28
28
|
- Mask sensitive content from stdin, text files, and Office documents (`.docx`, `.xlsx`, `.pptx`).
|
|
29
|
-
- Encrypt `.env` files, store private keys in the
|
|
29
|
+
- Encrypt `.env` files, store private keys in the configured secret store, and run commands with decrypted values injected only at runtime.
|
|
30
30
|
- Install Git pre-commit hooks.
|
|
31
31
|
- Install managed hooks for Claude Code, Cursor, Codex, GitHub Copilot, Antigravity, and Windsurf.
|
|
32
32
|
- Preview metadata-only audit logs to understand blocked hook activity without storing detected values.
|
|
@@ -133,8 +133,32 @@ Generate a GitHub Actions workflow that scans every pull request:
|
|
|
133
133
|
|
|
134
134
|
```bash
|
|
135
135
|
shk ci init github
|
|
136
|
+
# Add GitHub code scanning alerts and PR annotations:
|
|
137
|
+
shk ci init github --upload-sarif
|
|
136
138
|
```
|
|
137
139
|
|
|
140
|
+
Alternatively, use the repository's composite action after checkout on a Linux or macOS runner:
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
permissions:
|
|
144
|
+
contents: read
|
|
145
|
+
security-events: write
|
|
146
|
+
|
|
147
|
+
steps:
|
|
148
|
+
- uses: actions/checkout@v6
|
|
149
|
+
with:
|
|
150
|
+
persist-credentials: false
|
|
151
|
+
- uses: Kazuki-tam/security-harness-kit@v1
|
|
152
|
+
with:
|
|
153
|
+
path: .
|
|
154
|
+
fail-on: high
|
|
155
|
+
upload-sarif: true
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Set `upload-sarif: false` when GitHub code scanning is unavailable. Private repositories
|
|
159
|
+
need GitHub Code Security enabled to upload SARIF. Pull requests from forks normally receive
|
|
160
|
+
a read-only token; disable upload for those runs if the repository does not permit SARIF upload.
|
|
161
|
+
|
|
138
162
|
Install the shk agent skill for Claude Code, Codex/Cursor, Copilot, Antigravity, and Windsurf:
|
|
139
163
|
|
|
140
164
|
```bash
|
|
@@ -198,6 +222,7 @@ shk env key import
|
|
|
198
222
|
shk env key list
|
|
199
223
|
shk env key delete --env staging
|
|
200
224
|
shk env key export --instructions
|
|
225
|
+
shk env key migrate --to 1password
|
|
201
226
|
shk env decrypt .env --output .env.local
|
|
202
227
|
|
|
203
228
|
shk hooks install
|
|
@@ -209,9 +234,10 @@ shk hooks install-ai --tool antigravity
|
|
|
209
234
|
shk hooks install-ai --tool windsurf
|
|
210
235
|
|
|
211
236
|
shk ci init github
|
|
237
|
+
shk ci init github --upload-sarif
|
|
212
238
|
shk ci init github --dry-run
|
|
213
239
|
shk ci init github --mode audit
|
|
214
|
-
shk ci init github --shk-version v0.5.
|
|
240
|
+
shk ci init github --shk-version v0.5.6
|
|
215
241
|
|
|
216
242
|
shk skills install
|
|
217
243
|
shk skills install --tool claude-code --global
|
|
@@ -239,6 +265,39 @@ When `package.json` is present, `shk init` can also apply package-manager supply
|
|
|
239
265
|
|
|
240
266
|
See [Configuration](docs/configuration.md) for the full `shk.toml` reference, custom rules, and suppression options.
|
|
241
267
|
|
|
268
|
+
### Env secret store backends
|
|
269
|
+
|
|
270
|
+
By default, `shk env` stores dotenv private keys in the **OS keyring** (local, zero extra dependencies). Teams can opt in to **1Password** for shared vault distribution, centralized revocation, and Business audit logs:
|
|
271
|
+
|
|
272
|
+
> **Prerequisite:** The 1Password backend requires the [1Password CLI (`op`)](https://www.1password.dev/cli/get-started), version 2.24.0 or later. Install it, connect it to the 1Password app or sign in, then verify it with `op --version` and `op whoami` before enabling this backend. The default keyring backend does not require `op`.
|
|
273
|
+
|
|
274
|
+
```toml
|
|
275
|
+
# Keep secret_store = "keyring" until after `shk env key migrate --to 1password`.
|
|
276
|
+
[env]
|
|
277
|
+
secret_store = "keyring"
|
|
278
|
+
project_id = "acme/backend-api" # required for 1Password; machine-independent
|
|
279
|
+
|
|
280
|
+
[env.onepassword]
|
|
281
|
+
vault = "shk-project-keys" # required before migrating to 1Password
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Set `SHK_OP_PATH` to an absolute path when the `op` binary is not on PATH. Run `shk doctor env` to verify `op` resolution, version, and sign-in state.
|
|
285
|
+
|
|
286
|
+
See [Configuration — Env Secret Store](docs/configuration.md#env-secret-store) and [Commands — env key migrate](docs/commands.md#shk-env-key-migrate) for the full reference.
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
# Phase 0 team handoff (no backend change): export instructions → vault → import
|
|
290
|
+
shk env key export --instructions
|
|
291
|
+
shk env key import --stdin
|
|
292
|
+
|
|
293
|
+
# Migrate keyring keys to 1Password (copies keys and updates shk.toml)
|
|
294
|
+
# Migrates indexed keys plus keys referenced by .env / .env.keys files throughout the project tree.
|
|
295
|
+
shk env key migrate --to 1password
|
|
296
|
+
# Verify the destination, then delete source copies explicitly.
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
**Threat model (honest):** 1Password is primarily a **team operations** upgrade (distribution, offboarding, audit). It also avoids persisting keys in the local keyring. Desktop app authorization can persist for a CLI session, so it is not a guarantee of biometric approval on every `shk env run`. Prefer short vault auto-lock and 1Password Business access logs for visibility.
|
|
300
|
+
|
|
242
301
|
## Exit Codes
|
|
243
302
|
|
|
244
303
|
| Code | Meaning |
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"hasInstallScript": true,
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"name": "security-harness-kit",
|
|
26
|
-
"version": "0.5.
|
|
26
|
+
"version": "0.5.6"
|
|
27
27
|
},
|
|
28
28
|
"node_modules/@isaacs/cliui": {
|
|
29
29
|
"engines": {
|
|
@@ -542,5 +542,5 @@
|
|
|
542
542
|
}
|
|
543
543
|
},
|
|
544
544
|
"requires": true,
|
|
545
|
-
"version": "0.5.
|
|
545
|
+
"version": "0.5.6"
|
|
546
546
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"artifactDownloadUrls": [
|
|
3
|
-
"https://github.com/Kazuki-tam/security-harness-kit/releases/download/v0.5.
|
|
3
|
+
"https://github.com/Kazuki-tam/security-harness-kit/releases/download/v0.5.6"
|
|
4
4
|
],
|
|
5
5
|
"bin": {
|
|
6
6
|
"shk": "run-shk.js"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"zipExt": ".tar.xz"
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
|
-
"version": "0.5.
|
|
88
|
+
"version": "0.5.6",
|
|
89
89
|
"volta": {
|
|
90
90
|
"node": "18.14.1",
|
|
91
91
|
"npm": "9.5.0"
|