@agenticcli/shipguard 0.8.1 → 0.10.0-rc.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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  CLI-first release gate for AI-built apps.
4
4
 
5
- Catches secrets leaks, auth gaps, payment webhook risks, destructive migrations, and deployment misconfigurations — before your code ships.
5
+ Checks for leaked secrets, auth gaps, payment webhook risks, destructive migrations, and deployment misconfigurations — before your code ships.
6
6
 
7
7
  ## 30-second quickstart
8
8
 
@@ -70,9 +70,21 @@ output — it never hijacks exit `2`, which is reserved for genuine config error
70
70
  not check; the exit code stays 0 because ShipGuard is passive by default. Pass `--strict`
71
71
  when you want that truthful verdict to actually stop something.
72
72
 
73
+ ### What was actually scanned
74
+
75
+ Every `--json` result (schemaVersion 6) has a `coverage` object: files discovered, scanned,
76
+ and skipped, with the reason for each skip (real binary, too large, symlink, unknown binary,
77
+ invalid text, unreadable, special file), plus text read as UTF-16 or with stray NUL bytes
78
+ turned into spaces. Real binaries (images, fonts, archives) are counted and are not a
79
+ problem. A scan that read **nothing** (`NO_FILES_SCANNED`, for example an empty folder or
80
+ `--changed` on a clean checkout), an unknown binary blob (`UNSCANNED_UNKNOWN_BINARY`), and a
81
+ truncated scan are `degraded` and so `DO_NOT_SHIP`. To clear a blob you trust, add its path to
82
+ `ignore.paths`. Some formats are counted but their contents are not scanned: SQLite files
83
+ outside the ASCII reading, compressed archives, and string tables inside ELF, PE, class and WASM files.
84
+
73
85
  ## Telemetry
74
86
 
75
- Published ShipGuard builds send one pseudonymous usage ping after each scan: CLI version, verdict (safe / review / blocked / error), a scan-duration bucket, a CI flag, the build type, and a random install id (a pseudonym stored in `~/.config/shipguard/telemetry.json`; not created or sent in CI, never linked to an account). Never file contents, paths, repo names, branches or commits, or user identity. `shipguard telemetry status` shows what is set, `shipguard telemetry reset` forgets the id (earlier pings can be deleted on request), `SHIPGUARD_TELEMETRY_DEBUG=1` prints the exact payload without sending. Builds from a source checkout never send anything.
87
+ Published ShipGuard builds send one pseudonymous usage ping after each scan, plus a one-off ping on the first run on an install and one after a successful `shipguard login` (7 keys: `schema`, `event`, `eventId`, `installId`, `cliVersion`, `provenance`, `ci`; the first-run ping is never sent in CI). A scan ping carries 8 keys: `schema`, `eventId`, `installId` (random pseudonym), `cliVersion`, `provenance` (build type), `verdict` (safe / review / blocked / error), `durationBucket` and `ci`. An optional `traffic` key (`test` or `internal`) is added only if you set `SHIPGUARD_TRAFFIC`; any other value is ignored. The install id is a pseudonym stored in `~/.config/shipguard/telemetry.json`; not created or sent in CI, never linked to an account. Never file contents, paths, repo names, branches or commits, or user identity. `shipguard telemetry status` shows what is set, `shipguard telemetry reset` forgets the id (earlier pings can be deleted on request), `SHIPGUARD_TELEMETRY_DEBUG=1` prints the exact payload without sending. Builds from a source checkout never send anything.
76
88
 
77
89
  Before the first ping on a machine, ShipGuard prints a one-line notice to stderr (in every mode, including `--json` and CI, so stdout stays clean). Turn pings off any of these ways:
78
90
 
@@ -82,12 +94,18 @@ Before the first ping on a machine, ShipGuard prints a one-line notice to stderr
82
94
 
83
95
  To see exactly what would be sent without sending it: `SHIPGUARD_TELEMETRY_DEBUG=1 shipguard scan`.
84
96
 
85
- Details: [agenticcli.dev/docs#telemetry](https://agenticcli.dev/docs?utm_source=npm_readme&utm_medium=package&utm_campaign=shipguard_evergreen&utm_content=telemetry#telemetry)
97
+ Details: [docs/privacy.md](https://github.com/agenticcli/shipguard/blob/main/docs/privacy.md) and [agenticcli.dev/privacy](https://agenticcli.dev/privacy?utm_source=npm_readme&utm_medium=package&utm_campaign=shipguard_evergreen).
86
98
 
87
99
  ## Documentation
88
100
 
89
- See [full docs](https://agenticcli.dev/docs?utm_source=npm_readme&utm_medium=package&utm_campaign=shipguard_evergreen&utm_content=docs) for policy configuration, CI setup, and agent integration.
101
+ See the [ShipGuard docs](https://agenticcli.dev/shipguard/docs?utm_source=npm_readme&utm_medium=package&utm_campaign=shipguard_evergreen) for policy configuration, CI setup, and agent integration. Product page: [agenticcli.dev/shipguard](https://agenticcli.dev/shipguard?utm_source=npm_readme&utm_medium=package&utm_campaign=shipguard_evergreen).
102
+
103
+ ## Help
104
+
105
+ - Help, billing, bugs and security reports: support@agenticcli.dev
106
+ - General and press: contact@agenticcli.dev
107
+ - Issues: [github.com/agenticcli/shipguard/issues](https://github.com/agenticcli/shipguard/issues)
90
108
 
91
109
  ## License
92
110
 
93
- MIT
111
+ [Elastic License 2.0](LICENSE). Source-available, free to use commercially; you may not offer it as a hosted service or resell it.
@@ -1,7 +1,7 @@
1
1
  {
2
- "secrets": "860c45ff272d99ca2e1d8eddfdab015d17854fb9bc51d0fa953471cd4bdac694",
3
- "auth": "860c45ff272d99ca2e1d8eddfdab015d17854fb9bc51d0fa953471cd4bdac694",
4
- "database": "860c45ff272d99ca2e1d8eddfdab015d17854fb9bc51d0fa953471cd4bdac694",
5
- "deployment": "860c45ff272d99ca2e1d8eddfdab015d17854fb9bc51d0fa953471cd4bdac694",
6
- "payments": "860c45ff272d99ca2e1d8eddfdab015d17854fb9bc51d0fa953471cd4bdac694"
2
+ "secrets": "9e1157a2a87a28bc436440f695f0b8234decd40aa5f70e1fc4fd3964c8adc46f",
3
+ "auth": "9e1157a2a87a28bc436440f695f0b8234decd40aa5f70e1fc4fd3964c8adc46f",
4
+ "database": "9e1157a2a87a28bc436440f695f0b8234decd40aa5f70e1fc4fd3964c8adc46f",
5
+ "deployment": "9e1157a2a87a28bc436440f695f0b8234decd40aa5f70e1fc4fd3964c8adc46f",
6
+ "payments": "9e1157a2a87a28bc436440f695f0b8234decd40aa5f70e1fc4fd3964c8adc46f"
7
7
  }
@@ -1,3 +1,6 @@
1
+ import {
2
+ logger
3
+ } from "./chunk-NC5RELTG.js";
1
4
  import {
2
5
  EXEC_RULE_FIELDS,
3
6
  RE2JS_V1_RUNTIME_ID,
@@ -1868,43 +1871,6 @@ var secretsCheck = {
1868
1871
  run: checkSecrets
1869
1872
  };
1870
1873
 
1871
- // src/utils/logger.ts
1872
- import chalk from "chalk";
1873
- var logger = {
1874
- info: (msg) => console.error(chalk.blue("\u2139"), msg),
1875
- success: (msg) => console.error(chalk.green("\u2713"), msg),
1876
- warn: (msg) => console.error(chalk.yellow("\u26A0"), msg),
1877
- error: (msg) => console.error(chalk.red("\u2717"), msg),
1878
- // Diagnostics that are true and worth being able to inspect, but too detailed for a
1879
- // normal run — e.g. "this legacy finding was superseded by a governed corpus rule on
1880
- // the same line". Deliberately NOT a silent drop: the information is always produced
1881
- // and one env var makes it visible. Stderr only, like every other logger method.
1882
- debug: (msg) => {
1883
- if (process.env.SHIPGUARD_DEBUG) console.error(chalk.gray("\xB7"), msg);
1884
- },
1885
- finding: (severity, msg) => {
1886
- const colors = {
1887
- critical: chalk.bgRed.white,
1888
- high: chalk.red,
1889
- medium: chalk.yellow,
1890
- low: chalk.blue,
1891
- info: chalk.gray
1892
- };
1893
- const colorFn = colors[severity] || chalk.white;
1894
- const label = severity.toUpperCase().padEnd(8);
1895
- console.error(` ${colorFn(label)} ${msg}`);
1896
- },
1897
- score: (score, recommendation) => {
1898
- const color = score <= 20 ? chalk.green : score <= 50 ? chalk.yellow : chalk.red;
1899
- const icon = score <= 20 ? "\u2713" : score <= 50 ? "\u26A0" : "\u2717";
1900
- console.error("");
1901
- console.error(chalk.bold("ShipGuard Scan Result"));
1902
- console.error(`Risk Score: ${color(`${score}/100`)}`);
1903
- console.error(`Status: ${color(`${icon} ${recommendation.replace(/_/g, " ")}`)}`);
1904
- },
1905
- divider: () => console.error(chalk.gray("\u2500".repeat(50)))
1906
- };
1907
-
1908
1874
  // src/checks/auth.ts
1909
1875
  var SENSITIVE_NEXTJS_PAGE_PATTERN = /^(?:src\/)?app\/(admin|dashboard|billing|account|settings|management|debug|internal)(\/|$)/;
1910
1876
  var SENSITIVE_API_ROUTE_PATTERN = /^(?:src\/)?app\/api\/(admin|users|billing|account|management|debug|internal|env|_debug)(\/|$)/;
@@ -3833,7 +3799,6 @@ function runProRulesWithDispatch(rules, files, policy, cliVersion, table, manife
3833
3799
 
3834
3800
  export {
3835
3801
  goLink,
3836
- logger,
3837
3802
  getFindingKey,
3838
3803
  redactFindingsEvidence,
3839
3804
  secretsCheck,