shipready 1.8.0 → 1.8.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/README.md CHANGED
@@ -11,6 +11,8 @@ shipready is a CLI for developers who build with AI and vibe-coding tools. It sc
11
11
 
12
12
  **No API key required. Works fully offline. No telemetry.**
13
13
 
14
+ ![shipready finds a hardcoded API key, moves it to .env automatically, and the score goes from 55 to 80](.github/assets/demo.gif)
15
+
14
16
  ## Why shipready exists
15
17
 
16
18
  AI coding tools are great at producing working code fast, but they routinely:
@@ -136,29 +138,37 @@ shipready fix --dry-run
136
138
 
137
139
  ```txt
138
140
  ╭──────────────────────────────────────────────────────────╮
139
- │ shipready v1.3.0 │
140
- │ project Next.js · pm pnpm
141
+ │ shipready v1.8.0 │
142
+ │ project Next.js · pm npm
141
143
  ╰──────────────────────────────────────────────────────────╯
142
144
 
143
- Score ████████████████████░░░░░░░░ 72/100 almost there
145
+ Score ███████████████░░░░░░░░░░░░░ 55/100 not ready to ship
146
+ -8 weak README · -6 no test script · -25 hardcoded secret · -6 TODO comments (3)
144
147
 
145
- ✓ package.json ok
146
- README ok
147
- Env safety .env.example missing (3 env vars used in code)
148
- ✗ .env is not ignored by git
149
- Secrets No obvious secrets found
150
- Git history 1 secret buried in git history (removed from code but still exposed)
151
- Code hygiene 4 TODO/FIXME comments found
152
- 2 console.log calls found
153
- .gitignore ok
148
+ ✓ package.json package.json found
149
+ ⚠ Missing scripts: test, lint
150
+ README README.md found
151
+ ⚠ README looks thin - add installation and usage instructions
152
+ Env safety No environment variables detected in code
153
+ Secrets 1 potential secret detected
154
+ 1 possible secret detected (lower confidence)
155
+ Code hygiene 2 TODO/FIXME comments found
156
+ ⚠ 1 console.log call found
157
+ ⚠ .gitignore .gitignore missing entries: .env, .env.local, .next
154
158
 
155
159
  Next steps
156
- 1. Purge leaked secrets from git history (BFG or git filter-repo) and rotate them
157
- 2. Add .env to .gitignore
158
- 3. Create .env.example (run: shipready fix)
159
- 4. Remove debug logs and debugger statements before shipping
160
+ 1. Rotate and remove hardcoded secrets immediately
161
+ 2. Expand README with installation and usage sections
162
+ 3. Add missing entries to .gitignore (run: shipready fix)
163
+ 4. Add missing package.json scripts (build/test/lint)
164
+ 5. Remove debug logs and debugger statements before shipping
165
+ 6. Resolve TODO/FIXME comments or track them as issues
166
+
167
+ Run with --verbose to see file locations.
160
168
  ```
161
169
 
170
+ Run `shipready fix` and the hardcoded key moves to `.env`, `.gitignore` gets patched, and the score jumps to 80 - see the [secret autofix](#secret-autofix) section.
171
+
162
172
  ## What it checks
163
173
 
164
174
  | Check | What it looks for |
@@ -381,24 +391,6 @@ Catch secrets **before** they enter history at all — see [`shipready staged`](
381
391
 
382
392
  Use `--json` to feed the report into other tooling, or `--sarif` for anything that speaks SARIF.
383
393
 
384
- ## Scoring
385
-
386
- Every project starts at 100 and loses points for issues:
387
-
388
- | Issue | Deduction |
389
- | --- | --- |
390
- | Missing package.json | -20 |
391
- | Missing README | -15 |
392
- | Weak README | -8 |
393
- | Missing build script | -8 |
394
- | Missing test script | -6 |
395
- | Missing .env.example (when env vars exist) | -10 |
396
- | .env not gitignored | -15 |
397
- | Possible secret | -25 each (max -50) |
398
- | TODO/debug leftovers | -2 each (max -15) |
399
-
400
- The score never goes below 0.
401
-
402
394
  ## Development
403
395
 
404
396
  ```bash
package/dist/cli.js CHANGED
@@ -54,7 +54,10 @@ async function applyFixes(root, force, dryRun = false) {
54
54
  const results = [
55
55
  ...secretFix.results,
56
56
  ...[fixEnvExample(root, envUsages, force, dryRun)].filter((r) => !(r.action === "skipped" && handled.has(r.file))),
57
- fixGitignore(root, dryRun),
57
+ fixGitignore(root, dryRun, project.framework, {
58
+ hasBuildScript: Boolean(project.scripts["build"]),
59
+ usesEnv: envUsages.length > 0 || secretFix.envAdditions.length > 0,
60
+ }),
58
61
  ...fixAgentFiles(root, project, force, dryRun),
59
62
  ];
60
63
  for (const { finding, reason } of secretFix.manual) {
@@ -1,13 +1,13 @@
1
- import { importantIgnoresFor, missingIgnoreEntries } from "../checks/gitignore.js";
1
+ import { importantIgnoresFor, missingIgnoreEntries, } from "../checks/gitignore.js";
2
2
  import { readTextFile, writeTextFile } from "../utils/files.js";
3
3
  /** Adds missing important entries to .gitignore (creates it if absent). */
4
- export function fixGitignore(root, dryRun = false, framework) {
4
+ export function fixGitignore(root, dryRun = false, framework, ctx) {
5
5
  const file = ".gitignore";
6
6
  const existing = readTextFile(root, file);
7
7
  if (existing === null) {
8
8
  const content = [
9
9
  "# Added by shipready",
10
- ...importantIgnoresFor(framework),
10
+ ...importantIgnoresFor(framework, ctx),
11
11
  "",
12
12
  ].join("\n");
13
13
  if (!dryRun) {
@@ -15,7 +15,7 @@ export function fixGitignore(root, dryRun = false, framework) {
15
15
  }
16
16
  return { file, action: "created", dryRun, preview: content };
17
17
  }
18
- const missing = missingIgnoreEntries(existing, framework);
18
+ const missing = missingIgnoreEntries(existing, framework, ctx);
19
19
  if (missing.length === 0) {
20
20
  return { file, action: "skipped", reason: "already complete" };
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shipready",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Pre-flight check for your repo before shipping. Scans AI-coded projects for secrets, env issues, debug leftovers, and generates AI-agent instruction files.",
5
5
  "type": "module",
6
6
  "license": "MIT",