@agenticcli/shipguard 0.7.1 → 0.8.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.
@@ -2,8 +2,8 @@ import {
2
2
  DEFAULT_MAX_FILES,
3
3
  DEFAULT_MAX_FILE_SIZE_BYTES,
4
4
  DEFAULT_MAX_TOTAL_BYTES
5
- } from "./chunk-3NSULPWH.js";
6
- import "./chunk-MPQ42F54.js";
5
+ } from "./chunk-MVYY4QWT.js";
6
+ import "./chunk-KGIK7XNK.js";
7
7
 
8
8
  // src/core/config-generator.ts
9
9
  import { writeFileSync, existsSync } from "fs";
@@ -14,7 +14,6 @@ import {
14
14
  allConformanceVectors,
15
15
  canonicalJson,
16
16
  canonicalizeFinding,
17
- compileCached,
18
17
  computeExecutableHash,
19
18
  computeMatcherRuntimeId,
20
19
  decodeUtf8Strict,
@@ -35,7 +34,7 @@ import {
35
34
  selectExpected,
36
35
  stripBom,
37
36
  verifyExactSet
38
- } from "./chunk-MPQ42F54.js";
37
+ } from "./chunk-KGIK7XNK.js";
39
38
  export {
40
39
  CapTracker,
41
40
  DEFAULT_CAPS,
@@ -52,7 +51,6 @@ export {
52
51
  allConformanceVectors,
53
52
  canonicalJson,
54
53
  canonicalizeFinding,
55
- compileCached,
56
54
  computeExecutableHash,
57
55
  computeMatcherRuntimeId,
58
56
  decodeUtf8Strict,
@@ -7,8 +7,8 @@ import {
7
7
  runProRules,
8
8
  runProRulesWithDispatch,
9
9
  validateBundleCompile
10
- } from "./chunk-A63X4LUJ.js";
11
- import "./chunk-MPQ42F54.js";
10
+ } from "./chunk-VJBU6FNW.js";
11
+ import "./chunk-KGIK7XNK.js";
12
12
  export {
13
13
  NoRulesAppliedError,
14
14
  ProFetchError,
package/docs/llms.txt CHANGED
@@ -24,10 +24,10 @@ shipguard history — show recent local scan history for this repo (read-only)
24
24
  - Deployment: CORS misconfiguration, debug mode, missing headers
25
25
 
26
26
  ## Target Users
27
- Solo SaaS founders, indie hackers, small dev teams using Claude Code, Codex, Cursor, or Lovable
27
+ Solo SaaS builders, indie hackers, small dev teams using Claude Code, Codex, Cursor, or Lovable
28
28
 
29
29
  ## GitHub
30
- https://github.com/ramxH3421/agenticcli
30
+ https://github.com/agenticcli/shipguard
31
31
 
32
32
  ## npm
33
33
  https://www.npmjs.com/package/@agenticcli/shipguard
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticcli/shipguard",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "CLI-first release gate for AI-built apps",
5
5
  "type": "module",
6
6
  "main": "./dist/cli.js",
@@ -31,7 +31,7 @@
31
31
  "eslint": "^8",
32
32
  "tsup": "^8.5.1",
33
33
  "typescript": "^5.8.0",
34
- "vitest": "^3.2.0",
34
+ "vitest": "^4.1.11",
35
35
  "@agenticcli/matcher-contract": "0.5.1",
36
36
  "@agenticcli/shared": "0.1.0"
37
37
  },
@@ -57,7 +57,7 @@
57
57
  "type": "git",
58
58
  "url": "git+https://github.com/agenticcli/shipguard.git"
59
59
  },
60
- "homepage": "https://agenticcli.dev/shipguard",
60
+ "homepage": "https://agenticcli.dev/shipguard?utm_source=npm_homepage&utm_medium=package&utm_campaign=shipguard_evergreen",
61
61
  "bugs": {
62
62
  "url": "https://github.com/agenticcli/shipguard/issues"
63
63
  },
@@ -65,7 +65,8 @@
65
65
  "node": ">=20"
66
66
  },
67
67
  "publishConfig": {
68
- "access": "public"
68
+ "access": "public",
69
+ "provenance": true
69
70
  },
70
71
  "scripts": {
71
72
  "build": "tsup",
@@ -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": 18,
5
- "corpusHash": "sha256:6762d562afaa997b54e3cfdc7169a749e40b48e7680d1dd7f796358dda735cfe",
4
+ "corpusVersion": 19,
5
+ "corpusHash": "sha256:4edcc0b1a6f89a2c34e796f022a693cf7b89dbc4e3bcf4afd5e7b54804150a97",
6
6
  "ruleCount": 30,
7
- "contentHash": "sha256:fce96295cc50f6345ad4ddee6745710ba1671156b8e04702ef21793427d399cb",
7
+ "contentHash": "sha256:1e274f5f8176c4ad8566703a67b110d038b528942c26c25c2b7299367bc8ffa8",
8
8
  "rules": [
9
9
  {
10
10
  "id": "generic.auth.jwt-none-algorithm",
@@ -147,7 +147,7 @@
147
147
  "severity": "high",
148
148
  "confidence": "MEDIUM",
149
149
  "action": "warn",
150
- "version": 4,
150
+ "version": 5,
151
151
  "status": "experimental",
152
152
  "cwe": [
153
153
  "CWE-942",
@@ -173,7 +173,7 @@
173
173
  "flags": "",
174
174
  "antiPatternScope": "block"
175
175
  },
176
- "explanation": "The server reflects the incoming Origin request header back into Access-Control-Allow-Origin without validating it against an allowlist. This is more dangerous than a static wildcard: any attacker-controlled origin can read authenticated API responses. CVE-2024-25124 (CVSS 9.8) in the Fiber Go framework exploited exactly this pattern, granting any origin full credentialed access to protected endpoints (CWE-942, CWE-346).\nv4 (task #27 triage, rule-corpus/triage/2026-07-15-absence-block-candidates.md #5): downgraded HIGH/block -> MEDIUM/warn. FOUNDER-FYI: this rule ships in the offline FREE/bundled tier (tier: free, bundleEligible: true), so this downgrade reaches every CLI user, logged in or not — a wider blast radius than the Pro-only rules in this same wave. The sink itself is precise (reflecting req.headers.origin into Access-Control-Allow-Origin IS the specific dangerous act, not an over-broad capture) — the false positives come from the antiPattern vocabulary being too narrow: origin validation written as `const allowed = origin === 'https://example.com'; if (allowed) ...` (variable named \"allowed\", comparison via ===, not includes()/allowList) or `/^https:\\/\\/(www\\.)?example\\.com$/.test(req.headers.origin)` (.test(), not in the antiPattern vocabulary either) are both common, correct validation idioms this rule's fixed vocabulary did not recognize. Expanded the antiPattern vocabulary to also cover ===, .test(, and switch( as a complementary fix, and downgraded to warn because the underlying gap (an unbounded set of ways to write \"compare against an allowlist\") cannot be fully enumerated by any fixed vocabulary — per rule-corpus/rule-logic.md Section 4, a rule with a residual absence-style blind spot is capped at warn, never block, regardless of confidence.",
176
+ "explanation": "The server reflects the incoming Origin request header back into Access-Control-Allow-Origin without validating it against an allowlist. This is more dangerous than a static wildcard: any attacker-controlled origin can read authenticated API responses. CVE-2024-25124 (CVSS 9.8) in the Fiber Go framework exploited exactly this pattern, granting any origin full credentialed access to protected endpoints (CWE-942, CWE-346).",
177
177
  "recommendation": "Validate the incoming Origin header against a server-side allowlist before reflecting it. Store allowed origins in an environment variable (ALLOWED_ORIGINS) and check membership before setting Access-Control-Allow-Origin. Never reflect req.headers.origin directly.",
178
178
  "fix": "const allowed = (process.env.ALLOWED_ORIGINS || '').split(','); if (allowed.includes(req.headers.origin)) res.setHeader('Access-Control-Allow-Origin', req.headers.origin);",
179
179
  "findingType": "vulnerability",
@@ -194,7 +194,7 @@
194
194
  "severity": "high",
195
195
  "confidence": "MEDIUM",
196
196
  "action": "warn",
197
- "version": 5,
197
+ "version": 6,
198
198
  "status": "experimental",
199
199
  "cwe": [
200
200
  "CWE-942",
@@ -228,7 +228,7 @@
228
228
  ],
229
229
  "flags": ""
230
230
  },
231
- "explanation": "A wildcard CORS origin (Access-Control-Allow-Origin: *) was detected. For API endpoints returning user data, this allows any origin on the internet to read responses. Combined with credentials: 'include', wildcard origins are rejected by browsers — but without credentials, sensitive data is still exposed to cross-origin requests from attacker-controlled pages.\nv4 (founder ruling 2026-08-08, batch item 11): upgraded MEDIUM -> HIGH. This closes a severity disagreement the CLI's own dedup logic had been surfacing since it shipped (packages/cli/src/core/legacy-corpus-map.ts, `dedupeLegacyAgainstCorpus` doc comment): the legacy hand-written deployment check already rates the same wildcard-CORS defect `high` (packages/cli/src/checks/deployment.ts, `deployment_cors_wildcard` / `deployment_config_cors_wildcard_origin`) and dedup kept both findings because it can never silently soften a report. Canonical ruling: CORS misconfiguration is HIGH severity — nothing about the detection pattern, confidence, or action (warn) changed, only the severity label.\nv5 (2026-09-30): detection widened to setups v4 missed. The rule now also covers JSON/JSONC/JSON5 files and these shapes: a cors middleware or option object whose origin is true (reflects every requesting origin, so credentialed requests from any site succeed) or is a list containing the wildcard; key/value header entries such as the Vercel vercel.json and Firebase Hosting firebase.json headers arrays; and AWS API Gateway (SAM AllowOrigin, HTTP API AllowOrigins, method response header parameters). Severity, confidence, action (warn) and tier are unchanged. False-positive guards: origin true is matched only inside cors()/enableCors()/register(cors) calls or cors option objects, never on a bare origin key; JSON string values that merely describe the header are ignored; font-file rules and the existing test/static markers still suppress.",
231
+ "explanation": "A wildcard CORS origin (Access-Control-Allow-Origin: *) was detected. For API endpoints returning user data, this allows any origin on the internet to read responses. Combined with credentials: 'include', wildcard origins are rejected by browsers — but without credentials, sensitive data is still exposed to cross-origin requests from attacker-controlled pages.",
232
232
  "recommendation": "Replace the wildcard with an explicit allowlist of trusted origins. Use environment variables for origin configuration (ALLOWED_ORIGINS) so production and development settings can differ. Audit whether this endpoint requires CORS at all.",
233
233
  "fix": "Replace `'*'` with `process.env.ALLOWED_ORIGIN` and validate against an allowlist.",
234
234
  "findingType": "vulnerability",
@@ -1161,7 +1161,7 @@
1161
1161
  "severity": "critical",
1162
1162
  "confidence": "HIGH",
1163
1163
  "action": "block",
1164
- "version": 5,
1164
+ "version": 6,
1165
1165
  "status": "experimental",
1166
1166
  "cwe": [
1167
1167
  "CWE-798"
@@ -1186,7 +1186,7 @@
1186
1186
  ],
1187
1187
  "flags": ""
1188
1188
  },
1189
- "explanation": "A hardcoded Stripe live secret key (sk_live_ prefix) was detected in source. This key grants full access to the Stripe account including charges, refunds, customer data, and payouts — immediate payment account compromise if exposed.\nv5 (founder ruling 2026-08-08, batch item 11): upgraded HIGH -> CRITICAL. This closes a severity disagreement the CLI's own dedup logic had been surfacing since it shipped (packages/cli/src/core/legacy-corpus-map.ts, `dedupeLegacyAgainstCorpus` doc comment): the legacy hand-written secrets check already rates this same defect `critical` (packages/cli/src/checks/secrets.ts, 'Stripe Live Secret Key' pattern) and dedup kept both findings because it can never silently soften a report. A live Stripe secret key is a complete, immediate payment-account takeover — charges, refunds, payouts, customer PII — which is a canonical CRITICAL-severity secret exposure, not merely HIGH. Canon set by the founder ruling; nothing about the detection pattern itself changed.",
1189
+ "explanation": "A hardcoded Stripe live secret key (sk_live_ prefix) was detected in source. This key grants full access to the Stripe account including charges, refunds, customer data, and payouts — immediate payment account compromise if exposed.",
1190
1190
  "recommendation": "Remove the key immediately and roll it in the Stripe dashboard under Developers > API Keys. Store the key in an environment variable (STRIPE_SECRET_KEY) loaded at runtime. Never commit live API keys to version control.",
1191
1191
  "fix": "Replace with `process.env.STRIPE_SECRET_KEY` and add it to .env.local (gitignored). Rotate the exposed key immediately.",
1192
1192
  "findingType": "vulnerability",