@agenticcli/shipguard 0.8.1 → 0.9.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
@@ -70,6 +70,18 @@ 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
87
  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.
@@ -1,7 +1,7 @@
1
1
  {
2
- "secrets": "860c45ff272d99ca2e1d8eddfdab015d17854fb9bc51d0fa953471cd4bdac694",
3
- "auth": "860c45ff272d99ca2e1d8eddfdab015d17854fb9bc51d0fa953471cd4bdac694",
4
- "database": "860c45ff272d99ca2e1d8eddfdab015d17854fb9bc51d0fa953471cd4bdac694",
5
- "deployment": "860c45ff272d99ca2e1d8eddfdab015d17854fb9bc51d0fa953471cd4bdac694",
6
- "payments": "860c45ff272d99ca2e1d8eddfdab015d17854fb9bc51d0fa953471cd4bdac694"
2
+ "secrets": "163a4efbe979c808be17cd9ac0eb7b059689480c6d7a7371d1d29e8d23abb4b6",
3
+ "auth": "163a4efbe979c808be17cd9ac0eb7b059689480c6d7a7371d1d29e8d23abb4b6",
4
+ "database": "163a4efbe979c808be17cd9ac0eb7b059689480c6d7a7371d1d29e8d23abb4b6",
5
+ "deployment": "163a4efbe979c808be17cd9ac0eb7b059689480c6d7a7371d1d29e8d23abb4b6",
6
+ "payments": "163a4efbe979c808be17cd9ac0eb7b059689480c6d7a7371d1d29e8d23abb4b6"
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,