ship18ion 1.1.3 → 1.2.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.
Files changed (45) hide show
  1. package/CONTRIBUTING.md +60 -0
  2. package/LICENSE +21 -0
  3. package/README.md +16 -0
  4. package/dist/cli/index.d.ts +2 -0
  5. package/dist/engine/ast.d.ts +6 -0
  6. package/dist/engine/config.d.ts +12 -0
  7. package/dist/engine/detector.d.ts +2 -0
  8. package/dist/engine/runner.d.ts +3 -0
  9. package/dist/engine/runner.js +9 -0
  10. package/dist/engine/scanner.d.ts +1 -0
  11. package/dist/engine/secrets.d.ts +6 -0
  12. package/{src/engine/types.ts → dist/engine/types.d.ts} +15 -17
  13. package/dist/reporters/console.d.ts +2 -0
  14. package/dist/reporters/console.js +3 -0
  15. package/dist/rules/build.d.ts +3 -0
  16. package/dist/rules/env.d.ts +2 -0
  17. package/dist/rules/frameworks/nextjs.d.ts +2 -0
  18. package/dist/rules/git.d.ts +2 -0
  19. package/dist/rules/hygiene.d.ts +2 -0
  20. package/dist/rules/hygiene.js +47 -0
  21. package/dist/rules/packages.d.ts +2 -0
  22. package/dist/rules/packages.js +32 -0
  23. package/dist/rules/secrets.d.ts +2 -0
  24. package/dist/rules/security.d.ts +2 -0
  25. package/package.json +9 -3
  26. package/SHIPPING.md +0 -57
  27. package/src/cli/index.ts +0 -56
  28. package/src/engine/ast.ts +0 -84
  29. package/src/engine/config.ts +0 -28
  30. package/src/engine/detector.ts +0 -27
  31. package/src/engine/runner.ts +0 -53
  32. package/src/engine/scanner.ts +0 -22
  33. package/src/engine/secrets.ts +0 -26
  34. package/src/reporters/console.ts +0 -66
  35. package/src/rules/build.ts +0 -77
  36. package/src/rules/env.ts +0 -99
  37. package/src/rules/frameworks/nextjs.ts +0 -33
  38. package/src/rules/git.ts +0 -95
  39. package/src/rules/secrets.ts +0 -53
  40. package/src/rules/security.ts +0 -55
  41. package/tests/fixtures/leaky-app/.env +0 -3
  42. package/tests/fixtures/leaky-app/package.json +0 -7
  43. package/tests/fixtures/leaky-app/src/index.js +0 -21
  44. package/tsconfig.json +0 -15
  45. package/walkthrough.md +0 -51
package/walkthrough.md DELETED
@@ -1,51 +0,0 @@
1
- ship18ion - Production Readiness Inspector
2
- I have successfully built ship18ion, a CLI tool to check for production readiness.
3
-
4
- Features Implemented
5
- 1. Environment Variable Safety
6
- Unused Variable Detection: Scans
7
-
8
- .env
9
- files and code to find variables defined but never used.
10
- Missing Variable Detection: Identifies process.env.VAR usages that lack a corresponding definition in
11
-
12
- .env
13
- (or config).
14
- Format Support: Supports
15
-
16
- .env
17
- , .env.production files.
18
- Robust AST Parsing: Correctly detects process.env.VAR, import.meta.env.VAR (Vite), and process.env["VAR"].
19
- 2. Secrets Detection
20
- Pattern Matching: Detects AWS Keys, Google API Keys, Stripe Keys, and generic private keys.
21
- Entropy Heuristics: Detects potential high-entropy strings assigned to "secret" or "key" variables.
22
- 3. Framework & Security Checks
23
- Next.js Safety: Scans for NEXT_PUBLIC_ variables that appear to contain secrets (e.g. NEXT_PUBLIC_SECRET_KEY).
24
- Git Safety: Warns if deploying from a dirty working directory or a non-production branch.
25
- Debug Mode: Alerts on debug: true.
26
- CORS Wildcards: Fails if origin: '*' is detected.
27
- Database Credentials: Detects hardcoded connection strings.
28
- 4. Dependency & Build Safety
29
- Dev Dependencies: Warns if eslint or other dev tools are in dependencies.
30
- Build Artifacts: Alerts if source maps (.map) or
31
-
32
- .env
33
- files are found in build directories.
34
- Usage
35
- # In your project root
36
- npx ship18ion check
37
- # CI Mode (minimal output)
38
- npx ship18ion check --ci
39
- How to Ship & Share
40
- See
41
-
42
- SHIPPING.md
43
- for detailed instructions on:
44
-
45
- Local Testing: Using npm link to test on your other projects instantly.
46
- Publishing: Pushing to NPM so anyone can use npx ship18ion.
47
- Architecture
48
- CLI: Built with commander.
49
- Engine: TypeScript-based rule engine.
50
- Parsing: Babel-based AST parsing.
51
- Config: ship18ion.config.json support.