@agenticcli/shipguard 0.12.0 → 0.13.1
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/LICENSE +201 -90
- package/NOTICE +4 -0
- package/README.md +22 -14
- package/dist/checksum-manifest.json +5 -5
- package/dist/{chunk-WMGOTWCL.js → chunk-4J3V4FKA.js} +1698 -122
- package/dist/chunk-4J3V4FKA.js.map +1 -0
- package/dist/chunk-IZOXM3IM.js +32 -0
- package/dist/chunk-IZOXM3IM.js.map +1 -0
- package/dist/{chunk-RVDTQ2FR.js → chunk-MPBX5W3L.js} +1 -0
- package/dist/chunk-MPBX5W3L.js.map +1 -0
- package/dist/cli-facts.json +7 -7
- package/dist/cli.js +10800 -3958
- package/dist/cli.js.map +1 -0
- package/dist/{dist-5SSCBJRC.js → dist-3XUWQFMP.js} +2 -1
- package/dist/dist-3XUWQFMP.js.map +1 -0
- package/dist/framework-EUF7YNNW.js +9 -0
- package/dist/framework-EUF7YNNW.js.map +1 -0
- package/dist/{pro-scanner-NSDJLVII.js → pro-scanner-5UJZYBZF.js} +3 -3
- package/dist/pro-scanner-5UJZYBZF.js.map +1 -0
- package/docs/llms.txt +15 -7
- package/docs/placement-kit.md +9 -6
- package/package.json +27 -20
- package/rules/free-bundle.json +15 -15
- package/dist/chunk-IPNOC7JF.js +0 -918
- package/dist/chunk-NC5RELTG.js +0 -40
- package/dist/config-generator-BNFR3LZR.js +0 -74
- package/dist/framework-PA6RVE7G.js +0 -27
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
selectExpected,
|
|
35
35
|
stripBom,
|
|
36
36
|
verifyExactSet
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-MPBX5W3L.js";
|
|
38
38
|
export {
|
|
39
39
|
CapTracker,
|
|
40
40
|
DEFAULT_CAPS,
|
|
@@ -72,3 +72,4 @@ export {
|
|
|
72
72
|
stripBom,
|
|
73
73
|
verifyExactSet
|
|
74
74
|
};
|
|
75
|
+
//# sourceMappingURL=dist-3XUWQFMP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"mappings":"","names":[]}
|
|
@@ -7,9 +7,8 @@ import {
|
|
|
7
7
|
runProRules,
|
|
8
8
|
runProRulesWithDispatch,
|
|
9
9
|
validateBundleCompile
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-RVDTQ2FR.js";
|
|
10
|
+
} from "./chunk-4J3V4FKA.js";
|
|
11
|
+
import "./chunk-MPBX5W3L.js";
|
|
13
12
|
export {
|
|
14
13
|
NoRulesAppliedError,
|
|
15
14
|
ProFetchError,
|
|
@@ -20,3 +19,4 @@ export {
|
|
|
20
19
|
runProRulesWithDispatch,
|
|
21
20
|
validateBundleCompile
|
|
22
21
|
};
|
|
22
|
+
//# sourceMappingURL=pro-scanner-5UJZYBZF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"mappings":"","names":[]}
|
package/docs/llms.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# ShipGuard
|
|
2
|
-
> The
|
|
1
|
+
# ShipGuard by AgenticCLI
|
|
2
|
+
> The security scanner your coding agent runs before every commit. One command checks a project for leaked secrets, unprotected routes, destructive database migrations, unverified payment webhooks and risky deploy settings. It runs on your machine and gives the same answer every time. Review code with a rulebook to build secure code. Rules come down; your code never goes up.
|
|
3
3
|
|
|
4
|
-
ShipGuard is not a code reviewer and not a
|
|
4
|
+
ShipGuard is not a code reviewer and not a full SAST tool. It uses plain pattern rules (no AI model). It informs: the verdict is in the JSON `recommendation` field (SAFE_TO_SHIP, REVIEW_BEFORE_SHIP, DO_NOT_SHIP). The exit code is 0 whenever the scan completes; add --strict to make it exit 1 on a blocking result.
|
|
5
5
|
|
|
6
6
|
## Install
|
|
7
7
|
npx @agenticcli/shipguard scan
|
|
@@ -13,9 +13,11 @@ shipguard scan — scan project for risks
|
|
|
13
13
|
shipguard scan --changed — scan only changed files (not for CI: a clean checkout has nothing to compare)
|
|
14
14
|
shipguard scan --strict — exit code 1 on a blocking result or an unfinished scan (opt-in hard gate, free on every plan)
|
|
15
15
|
shipguard scan --report — generate Markdown report
|
|
16
|
-
shipguard scan --json — machine-readable output (schemaVersion
|
|
16
|
+
shipguard scan --json — machine-readable output (schemaVersion 7; the `coverage` object says how many files were discovered, scanned and skipped, and why)
|
|
17
17
|
shipguard scan --check-regressions — exit code 1 if a previously-passing rule now fails
|
|
18
|
-
shipguard hook — install
|
|
18
|
+
shipguard hook — install a git hook (--target claude or --target ci for Claude Code or GitHub Actions)
|
|
19
|
+
shipguard setup — set up the gate for your agent (claude, codex, cursor, ci); --dry-run lists every file first
|
|
20
|
+
shipguard uninstall — remove what setup wrote and name what stays
|
|
19
21
|
shipguard history — show recent local scan history for this repo (read-only)
|
|
20
22
|
shipguard schema --json — the machine-readable contract: verdicts, exit codes, limits
|
|
21
23
|
|
|
@@ -27,10 +29,16 @@ shipguard schema --json — the machine-readable contract: verdicts, exit codes,
|
|
|
27
29
|
- Deployment: CORS misconfiguration, debug mode, missing headers
|
|
28
30
|
|
|
29
31
|
## Target Users
|
|
30
|
-
|
|
32
|
+
SaaS founders shipping with Claude Code, Codex and Cursor
|
|
33
|
+
|
|
34
|
+
## Privacy
|
|
35
|
+
Your code never leaves your machine. ShipGuard never sends code, file paths or file contents. It sends product usage telemetry to help improve the product. Switch it off: `shipguard telemetry disable` or DO_NOT_TRACK=1. Details: https://github.com/agenticcli/shipguard/blob/main/docs/privacy.md
|
|
36
|
+
|
|
37
|
+
## Plans
|
|
38
|
+
Free: the general rules, unlimited, no account. Pro: the full rulebook (rulebook scans); prices at https://agenticcli.dev/pricing
|
|
31
39
|
|
|
32
40
|
## License
|
|
33
|
-
|
|
41
|
+
Apache License 2.0 (open source CLI; free to use, change and share, including commercially). The ShipGuard and AgenticCLI names are not part of the license.
|
|
34
42
|
|
|
35
43
|
## Docs
|
|
36
44
|
- Getting started: https://github.com/agenticcli/shipguard/blob/main/docs/getting-started.md
|
package/docs/placement-kit.md
CHANGED
|
@@ -23,11 +23,14 @@ does not**, which is why section 2 exists as well — an `AGENTS.md`-only setup
|
|
|
23
23
|
callers uncovered.
|
|
24
24
|
|
|
25
25
|
```markdown
|
|
26
|
-
##
|
|
26
|
+
## Security scan — ShipGuard
|
|
27
27
|
|
|
28
28
|
Before you merge, push, or tell the user something is ready to ship, run:
|
|
29
29
|
|
|
30
|
-
shipguard scan --json --strict
|
|
30
|
+
npx --no-install @agenticcli/shipguard scan --json --strict
|
|
31
|
+
|
|
32
|
+
(That is for a project that has ShipGuard as a devDependency, which is not on PATH. With a global
|
|
33
|
+
install, run `shipguard scan --json --strict` instead.)
|
|
31
34
|
|
|
32
35
|
Exit code 0 does NOT mean "safe". It means "the scan ran". Read the JSON:
|
|
33
36
|
|
|
@@ -67,7 +70,7 @@ If you would rather not import the whole file, paste the section-1 block directl
|
|
|
67
70
|
installing, or add it by hand:
|
|
68
71
|
|
|
69
72
|
```yaml
|
|
70
|
-
name: ShipGuard
|
|
73
|
+
name: ShipGuard security scan
|
|
71
74
|
|
|
72
75
|
on:
|
|
73
76
|
pull_request:
|
|
@@ -79,11 +82,11 @@ jobs:
|
|
|
79
82
|
name: ShipGuard verdict
|
|
80
83
|
runs-on: ubuntu-latest
|
|
81
84
|
steps:
|
|
82
|
-
- uses: actions/checkout@v4
|
|
83
|
-
- uses: actions/setup-node@v4
|
|
85
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
86
|
+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
84
87
|
with:
|
|
85
88
|
node-version: '20'
|
|
86
|
-
- name: Run
|
|
89
|
+
- name: Run ShipGuard
|
|
87
90
|
run: npx --yes @agenticcli/shipguard scan --json --strict
|
|
88
91
|
```
|
|
89
92
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenticcli/shipguard",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.13.1",
|
|
4
|
+
"description": "Open source CLI that scans AI-written code for secrets, auth, webhook and deploy flaws. For Claude Code, Codex, Cursor.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cli.js",
|
|
7
7
|
"bin": {
|
|
@@ -12,18 +12,23 @@
|
|
|
12
12
|
"rules",
|
|
13
13
|
"templates",
|
|
14
14
|
"docs",
|
|
15
|
-
"README.md"
|
|
15
|
+
"README.md",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"NOTICE"
|
|
16
18
|
],
|
|
17
19
|
"dependencies": {
|
|
18
20
|
"@noble/hashes": "^2.4.0",
|
|
19
21
|
"chalk": "^5.4.0",
|
|
20
22
|
"commander": "^13.1.0",
|
|
21
23
|
"fast-glob": "^3.3.0",
|
|
22
|
-
"jose": "^6.2.13",
|
|
23
24
|
"minimatch": "^11.0.1",
|
|
24
25
|
"re2js": "2.8.7",
|
|
25
26
|
"yaml": "^2.9.1"
|
|
26
27
|
},
|
|
28
|
+
"overrides": {
|
|
29
|
+
"picomatch@^2": "2.3.2",
|
|
30
|
+
"picomatch@^4": "4.0.4"
|
|
31
|
+
},
|
|
27
32
|
"devDependencies": {
|
|
28
33
|
"@types/node": "^22.0.0",
|
|
29
34
|
"@typescript-eslint/eslint-plugin": "^7",
|
|
@@ -32,35 +37,37 @@
|
|
|
32
37
|
"tsup": "^8.5.1",
|
|
33
38
|
"typescript": "^5.8.0",
|
|
34
39
|
"vitest": "^4.1.11",
|
|
35
|
-
"@agenticcli/
|
|
36
|
-
"@agenticcli/
|
|
40
|
+
"@agenticcli/matcher-contract": "0.5.1",
|
|
41
|
+
"@agenticcli/shared": "0.1.0"
|
|
37
42
|
},
|
|
38
43
|
"keywords": [
|
|
39
44
|
"shipguard",
|
|
40
45
|
"agenticcli",
|
|
41
|
-
"
|
|
46
|
+
"open-source",
|
|
42
47
|
"security-scanner",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"ai-agents",
|
|
48
|
+
"secret-scanner",
|
|
49
|
+
"secret-detection",
|
|
46
50
|
"claude-code",
|
|
47
|
-
"
|
|
51
|
+
"claude-code-security",
|
|
48
52
|
"codex",
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
+
"codex-cli",
|
|
54
|
+
"codex-security",
|
|
55
|
+
"cursor",
|
|
56
|
+
"ai-agents",
|
|
57
|
+
"ai-coding-agent",
|
|
58
|
+
"ai-agent-security",
|
|
53
59
|
"ai-generated-code",
|
|
60
|
+
"ai-code",
|
|
61
|
+
"security-review",
|
|
54
62
|
"pre-commit",
|
|
63
|
+
"pre-commit-hook",
|
|
55
64
|
"github-actions",
|
|
56
65
|
"ci",
|
|
57
|
-
"pre-deploy",
|
|
58
|
-
"stripe-webhook",
|
|
59
|
-
"env-files",
|
|
60
66
|
"nextjs",
|
|
61
|
-
"
|
|
67
|
+
"stripe-webhook",
|
|
68
|
+
"leaked-api-key"
|
|
62
69
|
],
|
|
63
|
-
"license": "
|
|
70
|
+
"license": "Apache-2.0",
|
|
64
71
|
"author": {
|
|
65
72
|
"name": "AgenticCLI",
|
|
66
73
|
"url": "https://agenticcli.dev"
|
package/rules/free-bundle.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"description": "Offline free rule bundle compiled from rule-corpus/*/rule.yaml where bundleEligible=true and enabled=true. Governed by rules.md §4/§5/§9. Generated by scripts/build-free-bundle.ts — never hand-edited.",
|
|
4
|
-
"corpusVersion":
|
|
5
|
-
"corpusHash": "sha256:
|
|
4
|
+
"corpusVersion": 29,
|
|
5
|
+
"corpusHash": "sha256:4966b5d90a0c78af5d872d3bf238bf9616fa53fb23df1d34942a72aa4e8b9519",
|
|
6
6
|
"ruleCount": 36,
|
|
7
|
-
"contentHash": "sha256:
|
|
7
|
+
"contentHash": "sha256:944160bb49310b67426bf7fa1bed515cb08646da9a9604ac0fa7bb7b04a61ff0",
|
|
8
8
|
"rules": [
|
|
9
9
|
{
|
|
10
10
|
"id": "generic.auth.jwt-none-algorithm",
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
"severity": "high",
|
|
474
474
|
"confidence": "MEDIUM",
|
|
475
475
|
"action": "warn",
|
|
476
|
-
"version":
|
|
476
|
+
"version": 4,
|
|
477
477
|
"status": "experimental",
|
|
478
478
|
"cwe": [
|
|
479
479
|
"CWE-78"
|
|
@@ -485,16 +485,16 @@
|
|
|
485
485
|
"type": "pattern",
|
|
486
486
|
"fileGlob": "**/*.{ts,js,tsx,jsx}",
|
|
487
487
|
"patterns": [
|
|
488
|
-
"\\
|
|
489
|
-
"\\
|
|
490
|
-
"\\
|
|
491
|
-
"\\
|
|
488
|
+
"(?:(?:^|[ \\t(;,=!&|{}:?+\\-*/<>\\[])|[Pp]rocess\\.|\\bcp\\.)exec\\s*\\(\\s*[a-zA-Z_$][a-zA-Z0-9_.]*\\s*\\+",
|
|
489
|
+
"(?:(?:^|[ \\t(;,=!&|{}:?+\\-*/<>\\[])|[Pp]rocess\\.|\\bcp\\.)exec\\s*\\(\\s*`[^`]{0,200}\\$\\{",
|
|
490
|
+
"(?:(?:^|[ \\t(;,=!&|{}:?+\\-*/<>\\[])|[Pp]rocess\\.|\\bcp\\.)execSync\\s*\\(\\s*[a-zA-Z_$][a-zA-Z0-9_.]*\\s*\\+",
|
|
491
|
+
"(?:(?:^|[ \\t(;,=!&|{}:?+\\-*/<>\\[])|[Pp]rocess\\.|\\bcp\\.)execSync\\s*\\(\\s*`[^`]{0,200}\\$\\{"
|
|
492
492
|
],
|
|
493
493
|
"antiPatterns": [
|
|
494
494
|
"\\btest\\b|\\bspec\\b|__tests__|__fixtures__",
|
|
495
495
|
"eslint-disable"
|
|
496
496
|
],
|
|
497
|
-
"flags": ""
|
|
497
|
+
"flags": "m"
|
|
498
498
|
},
|
|
499
499
|
"explanation": "Node.js child_process.exec() or execSync() is called with a dynamically constructed command string (variable concatenation or template literal with interpolation). exec() invokes the system shell (/bin/sh) and is therefore vulnerable to shell injection when any portion of the command string is derived from user input. This is the Node.js equivalent of Python subprocess with shell=True.",
|
|
500
500
|
"recommendation": "Replace exec() with execFile() or spawn() which do NOT use a shell and pass arguments as an array. This prevents shell injection even with user-controlled arguments. Alternatively, validate and sanitize all input before constructing shell commands.",
|
|
@@ -558,7 +558,7 @@
|
|
|
558
558
|
"severity": "high",
|
|
559
559
|
"confidence": "HIGH",
|
|
560
560
|
"action": "block",
|
|
561
|
-
"version":
|
|
561
|
+
"version": 5,
|
|
562
562
|
"status": "experimental",
|
|
563
563
|
"cwe": [
|
|
564
564
|
"CWE-95"
|
|
@@ -570,17 +570,17 @@
|
|
|
570
570
|
"type": "pattern",
|
|
571
571
|
"fileGlob": "**/*.{ts,js,tsx,jsx}",
|
|
572
572
|
"patterns": [
|
|
573
|
-
"eval\\s*\\(\\s*[a-
|
|
574
|
-
"eval\\s*\\(\\s*[a-
|
|
575
|
-
"eval\\s*\\(`[^`]*`\\)",
|
|
576
|
-
"new\\s+Function\\s*\\(\\s*[a-
|
|
573
|
+
"(?:(?:^|[ \\t(;,=!&|{}:?+\\-*/<>\\[])|window\\.|globalThis\\.)eval\\s*\\(\\s*[a-z_$][a-zA-Z0-9_.\\[\\]]*\\s*\\)",
|
|
574
|
+
"(?:(?:^|[ \\t(;,=!&|{}:?+\\-*/<>\\[])|window\\.|globalThis\\.)eval\\s*\\(\\s*[a-z_$][a-zA-Z0-9_.\\[\\]]*\\s*\\+\\s*[a-zA-Z_$]",
|
|
575
|
+
"(?:(?:^|[ \\t(;,=!&|{}:?+\\-*/<>\\[])|window\\.|globalThis\\.)eval\\s*\\(`[^`]*`\\)",
|
|
576
|
+
"(?:^|[ \\t(;,=!&|{}:?+\\-*/<>\\[])new\\s+Function\\s*\\(\\s*[a-z_$][a-zA-Z0-9_.]*\\s*\\)"
|
|
577
577
|
],
|
|
578
578
|
"antiPatterns": [
|
|
579
579
|
"eval\\s*\\(\\s*['\"][^'\"]{0,200}['\"]\\s*\\)",
|
|
580
580
|
"\\btest\\b|\\bspec\\b|__fixtures__|__tests__",
|
|
581
581
|
"eslint-disable"
|
|
582
582
|
],
|
|
583
|
-
"flags": "",
|
|
583
|
+
"flags": "m",
|
|
584
584
|
"antiPatternScope": "block"
|
|
585
585
|
},
|
|
586
586
|
"explanation": "eval() or new Function() is called with a non-literal argument. If any part of the evaluated expression is derived from user input, this is a direct code injection vulnerability (CWE-95, CVE-2024-4181) allowing arbitrary JavaScript execution in the server or browser context. CSA 2026 research found 24.2% of AI-generated JS snippets contained this weakness. HIGH confidence — antiPatterns filter string-literal eval calls that are provably safe.",
|