shippingszn 0.10.1 → 0.12.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/LICENSE +1 -1
- package/README.md +67 -226
- package/dist/index.js +2105 -460
- package/package.json +14 -10
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,258 +1,99 @@
|
|
|
1
1
|
# shippingszn
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
assets, weak browser defenses, dangerous code patterns, unguarded routes, and
|
|
7
|
-
last-mile polish gaps — then prints a 0-100 readiness score, a launch verdict,
|
|
8
|
-
and every finding with the file and line it came from. It never writes to your
|
|
9
|
-
project and needs no account to run.
|
|
10
|
-
|
|
11
|
-
## Install / usage
|
|
3
|
+
Free, read-only launch inspection for AI-built apps. It finds common launch
|
|
4
|
+
blockers and gives you the evidence, fix instructions, AI-builder prompt, and
|
|
5
|
+
verification step for every finding.
|
|
12
6
|
|
|
13
7
|
```bash
|
|
14
|
-
npx shippingszn@latest
|
|
15
|
-
npx shippingszn@latest ./path # scan a specific directory
|
|
16
|
-
npx shippingszn@latest --no-telemetry # run fully offline, zero network calls
|
|
17
|
-
# or
|
|
18
|
-
pnpm dlx shippingszn@latest
|
|
8
|
+
npx shippingszn@latest
|
|
19
9
|
```
|
|
20
10
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
builder, the 58-item launch workbook, unlimited re-scans, and launch monitoring
|
|
24
|
-
— lives at <https://shippingszn.com/fix-kit>. The scanner is free and always
|
|
25
|
-
will be; the Fix Kit is how you fix what it finds.
|
|
11
|
+
Normal scans include the complete result in the terminal and in `--json`; no
|
|
12
|
+
finding is hidden behind payment.
|
|
26
13
|
|
|
27
|
-
|
|
28
|
-
one exception is a tiny first-run marker under your config dir,
|
|
29
|
-
`~/.config/shippingszn/seen`, used to show the telemetry notice once.) By
|
|
30
|
-
default each run makes two anonymous requests: a scan handoff for checkout that
|
|
31
|
-
carries finding-level detail (severity, checklist item, `file:line`, and a short
|
|
32
|
-
evidence snippet — secret values always redacted before upload), and an
|
|
33
|
-
aggregate Wall summary with score, severity counts, files scanned, scanner
|
|
34
|
-
version, and safe stack tags. Neither uploads full source files, repo URLs,
|
|
35
|
-
project names, unredacted secrets, handles, or emails. Pass `--no-telemetry` to
|
|
36
|
-
run fully offline (zero network calls). Details in [Telemetry](#telemetry).
|
|
14
|
+
## Launch scan
|
|
37
15
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
by severity** — its severity, the checklist item it maps to, the `file:line`,
|
|
41
|
-
and what's wrong — plus completed-checks coverage and the Fix Kit CTA. Run with
|
|
42
|
-
`--json` to get the same in a machine-readable shape, including the full
|
|
43
|
-
`findings` array:
|
|
16
|
+
```text
|
|
17
|
+
shippingszn [path] [options]
|
|
44
18
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
{
|
|
55
|
-
"checkId": "hardcoded-secrets",
|
|
56
|
-
"itemId": "secrets",
|
|
57
|
-
"severity": "high",
|
|
58
|
-
"itemTitle": "Lock up your API keys and passwords",
|
|
59
|
-
"file": "src/lib/config.ts",
|
|
60
|
-
"line": 12,
|
|
61
|
-
"message": "Possible hardcoded API key detected.",
|
|
62
|
-
"permalink": "https://shippingszn.com/i/secrets"
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
"unlockUrl": "https://shippingszn.com/fix-kit?scanResultId=00000000-0000-4000-8000-000000000123",
|
|
66
|
-
"scanHandoff": {
|
|
67
|
-
"status": "uploaded",
|
|
68
|
-
"resultId": "00000000-0000-4000-8000-000000000123",
|
|
69
|
-
"unlockUrl": "https://shippingszn.com/fix-kit?scanResultId=00000000-0000-4000-8000-000000000123"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
19
|
+
--json Machine-readable score, findings, and report status.
|
|
20
|
+
--no-telemetry Fully offline: no private report upload or Wall ping.
|
|
21
|
+
--no-wall Alias for --no-telemetry.
|
|
22
|
+
--proof Backward-compatible alias; uploads are on by default.
|
|
23
|
+
--base-url <url> Base URL for report and checklist links.
|
|
24
|
+
--cwd <path> Directory to scan. Default: current directory.
|
|
25
|
+
--no-color Disable terminal colors.
|
|
26
|
+
-h, --help Show help.
|
|
27
|
+
-v, --version Print version.
|
|
72
28
|
```
|
|
73
29
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
exactly what's wrong; the Launch Fix Kit is how you fix it.
|
|
30
|
+
Each finding includes its severity, title, sanitized file location and evidence,
|
|
31
|
+
why it blocks launch, concrete fix instructions, a prompt for your AI builder,
|
|
32
|
+
and a verification step. The launch workbook and private report are free too.
|
|
78
33
|
|
|
79
|
-
##
|
|
34
|
+
## Local AI visibility with BYOK
|
|
80
35
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
1. **Scan handoff** (`POST /api/scan-results`) — powers the `/fix-kit` link the
|
|
84
|
-
CLI prints. It carries finding-level detail: each finding's severity, the
|
|
85
|
-
checklist item it maps to, its `file:line` location, and a short evidence
|
|
86
|
-
snippet from the matched line. Secret values are always redacted to a
|
|
87
|
-
`abc123…x9z2` form before upload. It does not include your repo URL, project
|
|
88
|
-
name, or full source files.
|
|
89
|
-
2. **Aggregate Wall summary** (`POST /api/wall`) — intentionally small: score,
|
|
90
|
-
launch label, files scanned, finding counts by severity, detected stack
|
|
91
|
-
tags, scanner version, and timestamp. No paths, no filenames, no
|
|
92
|
-
finding-level detail.
|
|
93
|
-
|
|
94
|
-
On the **first run on a machine**, the CLI prints a description of both requests
|
|
95
|
-
plus the exact aggregate payload (to stderr, so it never corrupts `--json`
|
|
96
|
-
output) and a note that you can turn it off. Telemetry is default-on but fully
|
|
97
|
-
transparent and opt-out-able:
|
|
36
|
+
Visibility checks call providers directly from your machine with your own API
|
|
37
|
+
keys. ShippingSZN never receives or stores those keys.
|
|
98
38
|
|
|
99
39
|
```bash
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
`--no-wall` is an alias for `--no-telemetry`. With telemetry off, the CLI makes
|
|
104
|
-
**no** scan-handoff upload and **no** Wall ping.
|
|
105
|
-
|
|
106
|
-
The same run also creates a scan-specific paid-report handoff. The terminal
|
|
107
|
-
prints a `/fix-kit?scanResultId=...` URL so checkout can carry that scan into
|
|
108
|
-
the Launch Fix Kit after purchase. `--proof` is still accepted for old docs, but
|
|
109
|
-
it is no longer required.
|
|
110
|
-
|
|
111
|
-
## What gets checked
|
|
112
|
-
|
|
113
|
-
The initial check set is intentionally small and high-signal. Each finding
|
|
114
|
-
maps back to one of the items on the checklist.
|
|
115
|
-
|
|
116
|
-
- Hardcoded API keys across many providers (OpenAI, Anthropic, Stripe, AWS,
|
|
117
|
-
Google, GitHub, Slack, private key blocks).
|
|
118
|
-
- `.env` present but not ignored in `.gitignore`, or `.env` present but no
|
|
119
|
-
`.env.example`.
|
|
120
|
-
- Missing `.gitignore`, `robots.txt`, `sitemap.xml`, or a custom favicon.
|
|
121
|
-
- Missing security-header middleware in common server configs.
|
|
122
|
-
- Dangerous code patterns: unsafe HTML injection in React, runtime
|
|
123
|
-
code-execution calls, wildcard CORS.
|
|
124
|
-
- OTP/auth readiness signals: phone normalization, resend/cooldown behavior,
|
|
125
|
-
anti-enumeration copy, mobile one-time-code input, delivery-smoke evidence,
|
|
126
|
-
recovery paths, and paid report access that depends on OTP.
|
|
127
|
-
- Python: common debug-mode slip-ups, hardcoded framework secrets, missing
|
|
128
|
-
env-var loading.
|
|
129
|
-
- Ruby: unsafe string rendering, hardcoded Rails secrets.
|
|
130
|
-
- Go: `http.ListenAndServe` without TLS, hardcoded token / apiKey / secret
|
|
131
|
-
literals.
|
|
132
|
-
- Placeholder content (`lorem ipsum`, `John Doe`, `test@example.com`) and
|
|
133
|
-
`TODO` / `FIXME` / `XXX` / `HACK` comments.
|
|
134
|
-
|
|
135
|
-
Each finding is tagged Critical, High, Medium, or Lower and maps to the relevant
|
|
136
|
-
checklist item. All of that finding-level detail is free and printed on every
|
|
137
|
-
run; the Fix Kit turns it into the human launch decision and AI-builder punch
|
|
138
|
-
list of fixes.
|
|
139
|
-
|
|
140
|
-
## Scoring
|
|
141
|
-
|
|
142
|
-
The 0-100 Readiness Score is not a black box. Each finding subtracts a fixed
|
|
143
|
-
number of penalty points from 100 based on its severity:
|
|
144
|
-
|
|
145
|
-
| Severity | Penalty per finding |
|
|
146
|
-
| -------- | ------------------- |
|
|
147
|
-
| Critical | 35 |
|
|
148
|
-
| High | 22 |
|
|
149
|
-
| Medium | 10 |
|
|
150
|
-
| Lower | 5 |
|
|
40
|
+
export OPENAI_API_KEY=...
|
|
41
|
+
export ANTHROPIC_API_KEY=...
|
|
42
|
+
npx shippingszn@latest visibility https://example.com
|
|
151
43
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
| Band | Score range | Trigger |
|
|
157
|
-
| -------------------- | ----------- | ----------------------------------------- |
|
|
158
|
-
| Fix now (no-go) | 0-59 | any Critical finding caps the score at 59 |
|
|
159
|
-
| Fix-first | 60-79 | any High finding (no Critical) caps at 79 |
|
|
160
|
-
| Verify before launch | 80-89 | any Medium finding (no Critical/High) |
|
|
161
|
-
| Launchable | 90-100 | only Lower findings, or a clean scan |
|
|
162
|
-
|
|
163
|
-
So one Critical finding alone drops you to at most 59 ("Fix now") regardless of
|
|
164
|
-
how few findings there are; a single High caps you at 79 ("Fix-first"). Count
|
|
165
|
-
pressure moves the score inside its band. The CLI runs with no source-side score
|
|
166
|
-
cap — the score you see is the severity-banded score.
|
|
167
|
-
|
|
168
|
-
## Suppressing false positives
|
|
169
|
-
|
|
170
|
-
Two opt-out mechanisms, both off by default:
|
|
171
|
-
|
|
172
|
-
- **`.gitignore` is respected.** Files your repo gitignores (build output,
|
|
173
|
-
generated reports, local `.env`, vendored sub-projects) are skipped.
|
|
174
|
-
This works automatically inside any git repo; outside a git repo the
|
|
175
|
-
scanner falls back to walking the full directory.
|
|
176
|
-
- **Inline ignore markers.** For one-off cases where a file legitimately
|
|
177
|
-
contains a pattern the scanner detects (a regex literal, copy that
|
|
178
|
-
describes a placeholder, a test fixture), add one of:
|
|
44
|
+
# Non-interactive execution requires explicit confirmation:
|
|
45
|
+
npx shippingszn@latest visibility https://example.com \
|
|
46
|
+
--engines openai,anthropic --yes --output ./shippingszn-visibility
|
|
47
|
+
```
|
|
179
48
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
49
|
+
The preflight lists selected and missing providers, prompt count, maximum call
|
|
50
|
+
count, and warns that your provider account may be charged. Compiled limits are
|
|
51
|
+
five prompts per provider, fifteen answer calls total, concurrency of two, one
|
|
52
|
+
retry for transient failures, and a 45-second request timeout.
|
|
183
53
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
54
|
+
Keys are accepted only through `OPENAI_API_KEY` and `ANTHROPIC_API_KEY`.
|
|
55
|
+
Credential command-line flags are rejected because process listings and shell
|
|
56
|
+
history can expose them. Reports stay local by default and are written as JSON
|
|
57
|
+
and Markdown into a new or empty output directory. Missing providers produce
|
|
58
|
+
explicit partial coverage; ShippingSZN never substitutes its own account.
|
|
188
59
|
|
|
189
|
-
|
|
190
|
-
patterns, language patterns). They deliberately do **not** apply to
|
|
191
|
-
hardcoded-secret detection — false positives there should be addressed
|
|
192
|
-
by removing the secret pattern, not by allowlisting.
|
|
60
|
+
## Privacy and telemetry
|
|
193
61
|
|
|
194
|
-
|
|
62
|
+
By default a launch scan makes two sanitized requests:
|
|
195
63
|
|
|
196
|
-
|
|
64
|
+
1. A private scan handoff creates a high-entropy report URL. It includes a
|
|
65
|
+
pseudonymous project fingerprint, score, safe finding metadata, and sanitized
|
|
66
|
+
locations/evidence. It excludes the repository URL, project name, absolute
|
|
67
|
+
path, matched source lines, file contents, and secrets.
|
|
68
|
+
2. An anonymous Wall ping includes aggregate score, band, finding counts, file
|
|
69
|
+
count, scanner version, timestamp, and safe stack tags.
|
|
197
70
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
- Auto-fixing problems. The CLI is read-only.
|
|
201
|
-
- Deep static analysis or language-specific lints. Use ESLint, Semgrep, or
|
|
202
|
-
Snyk for that.
|
|
203
|
-
- Validating your actual third-party dashboards (Stripe spend caps, OpenAI
|
|
204
|
-
quotas, etc.).
|
|
71
|
+
The first run explains both requests. Use `--no-telemetry` for zero network
|
|
72
|
+
calls. Local visibility responses are not included in either request.
|
|
205
73
|
|
|
206
|
-
|
|
207
|
-
obvious things tripped a tripwire. Use the Fix Kit, owner-verification items, and
|
|
208
|
-
rerun loop before you ship.
|
|
74
|
+
## Coverage
|
|
209
75
|
|
|
210
|
-
|
|
76
|
+
Checks include hardcoded credentials, environment-file exposure, crawl assets,
|
|
77
|
+
browser defenses, unsafe code patterns, auth/OTP readiness, rate limits,
|
|
78
|
+
paid-API spend guards, uploads, payment webhook validation, dependency
|
|
79
|
+
integrity, monitoring, legal pages, placeholder content, and unfinished-work
|
|
80
|
+
markers.
|
|
211
81
|
|
|
212
|
-
|
|
213
|
-
shippingszn
|
|
82
|
+
The scanner respects `.gitignore`. Inline `shippingszn:ignore` and
|
|
83
|
+
`shippingszn:ignore-next-line` markers suppress eligible code-pattern findings;
|
|
84
|
+
hardcoded-secret findings cannot be suppressed.
|
|
214
85
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
full findings array).
|
|
218
|
-
--no-telemetry Run fully offline: no scan handoff, no Wall ping, zero
|
|
219
|
-
network calls. (--no-wall is an alias.)
|
|
220
|
-
--proof Backward-compatible alias. Normal runs already return
|
|
221
|
-
a scan-specific Launch Fix Kit URL.
|
|
222
|
-
--base-url <url> Base URL used to build checkout and Fix Kit links.
|
|
223
|
-
--cwd <path> Directory to scan. Default: current working directory.
|
|
224
|
-
--no-color Disable ANSI colors in the human-readable summary.
|
|
225
|
-
-h, --help Show help.
|
|
226
|
-
-v, --version Print version.
|
|
227
|
-
```
|
|
86
|
+
A clean result is not a launch certificate. Runtime behavior, provider
|
|
87
|
+
dashboards, and authenticated journeys still require end-user verification.
|
|
228
88
|
|
|
229
89
|
## Exit codes
|
|
230
90
|
|
|
231
|
-
- `0
|
|
232
|
-
- `1
|
|
233
|
-
- `2
|
|
234
|
-
|
|
235
|
-
This makes the CLI suitable for CI:
|
|
236
|
-
|
|
237
|
-
```yaml
|
|
238
|
-
# .github/workflows/launch-check.yml
|
|
239
|
-
- run: npx shippingszn@latest --json > launch-check.json
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
For PR scan signal, have GitHub Actions run the scanner and post the JSON
|
|
243
|
-
summary as a comment: score, severity counts, findings, and unlock URL.
|
|
244
|
-
|
|
245
|
-
## Privacy
|
|
91
|
+
- `0`: no Critical findings, or a completed visibility scan.
|
|
92
|
+
- `1`: one or more Critical launch findings.
|
|
93
|
+
- `2`: invalid input, unconfirmed visibility spend, or scanner error.
|
|
246
94
|
|
|
247
|
-
|
|
248
|
-
default it creates a scan handoff for checkout and makes one best-effort
|
|
249
|
-
outbound request to post anonymous Wall stats: score, launch label, files
|
|
250
|
-
scanned count, finding counts by severity, detected stack tags, scanner version,
|
|
251
|
-
and timestamp. Wall stats never include source code, file paths, filenames,
|
|
252
|
-
project names, repo URLs, secrets, emails, handles, finding titles, evidence, or
|
|
253
|
-
report contents. The first run on a machine prints the exact payload to stderr,
|
|
254
|
-
and `--no-telemetry` (alias `--no-wall`) turns off all network calls.
|
|
95
|
+
License: MIT
|
|
255
96
|
|
|
256
|
-
##
|
|
97
|
+
## Business knowledge
|
|
257
98
|
|
|
258
|
-
|
|
99
|
+
[Business documentation](docs/business/README.md) explains this component, its public source contract, and known limits independently of agent configuration.
|