@agenticcli/shipguard 0.7.1 → 0.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.
@@ -29,7 +29,7 @@ function serializeNumber(n) {
29
29
  throw new TypeError(`canonicalJson: NaN and Infinity are not valid JSON values (got ${n})`);
30
30
  }
31
31
  if (!Number.isSafeInteger(n) && !Object.is(n, -0)) {
32
- throw new TypeError(`canonicalJson: number ${n} is not a safe integer \u2014 fractional or out-of-range numbers are rejected in signed objects (LOCKED-SPEC \xA72 / FIX 9). Only safe integers (\u22122^53+1 to 2^53\u22121) are permitted.`);
32
+ throw new TypeError(`canonicalJson: number ${n} is not a safe integer \u2014 fractional or out-of-range numbers are rejected in signed objects (matcher spec \xA72). Only safe integers (\u22122^53+1 to 2^53\u22121) are permitted.`);
33
33
  }
34
34
  if (Object.is(n, -0))
35
35
  return "0";
@@ -1712,19 +1712,6 @@ function globToRegExp2(glob) {
1712
1712
  regexStr += "$";
1713
1713
  return new RegExp(regexStr);
1714
1714
  }
1715
- var COMPILE_CACHE_MAX = 2e4;
1716
- var compileCache = /* @__PURE__ */ new Map();
1717
- function compileCached(pattern, flags) {
1718
- const key = `${flags}\0${pattern}`;
1719
- const hit = compileCache.get(key);
1720
- if (hit !== void 0)
1721
- return hit;
1722
- const compiled = RE2JS.compile(pattern, flags);
1723
- if (compileCache.size >= COMPILE_CACHE_MAX)
1724
- compileCache.clear();
1725
- compileCache.set(key, compiled);
1726
- return compiled;
1727
- }
1728
1715
  function evaluatePattern2(matcher, file, ctx) {
1729
1716
  const flagsResult = parseFlags(matcher.flags);
1730
1717
  if (!flagsResult.ok) {
@@ -1737,7 +1724,7 @@ function evaluatePattern2(matcher, file, ctx) {
1737
1724
  const compiledAntiPatterns = [];
1738
1725
  for (const antiStr of matcher.antiPatterns) {
1739
1726
  try {
1740
- compiledAntiPatterns.push(compileCached(antiStr, re2jsFlags));
1727
+ compiledAntiPatterns.push(RE2JS.compile(antiStr, re2jsFlags));
1741
1728
  } catch (err) {
1742
1729
  console.error(`[re2js-v1] compile error for anti-pattern ${JSON.stringify(antiStr)}: ${err instanceof Error ? err.message : String(err)}`);
1743
1730
  throw new Error(`[re2js-v1] anti-pattern compile failure for ${JSON.stringify(antiStr)} \u2014 bundle degraded (fail-closed, FIX 5): ${err instanceof Error ? err.message : String(err)}`);
@@ -1746,7 +1733,7 @@ function evaluatePattern2(matcher, file, ctx) {
1746
1733
  for (const patternStr of matcher.patterns) {
1747
1734
  let compiled;
1748
1735
  try {
1749
- compiled = compileCached(patternStr, re2jsFlags);
1736
+ compiled = RE2JS.compile(patternStr, re2jsFlags);
1750
1737
  } catch (err) {
1751
1738
  console.error(`[re2js-v1] compile error for pattern ${JSON.stringify(patternStr)}: ${err instanceof Error ? err.message : String(err)}`);
1752
1739
  throw new Error(`[re2js-v1] primary pattern compile failure for ${JSON.stringify(patternStr)} \u2014 bundle degraded (fail-closed, FIX 5): ${err instanceof Error ? err.message : String(err)}`);
@@ -1880,7 +1867,7 @@ function evaluateFileRelationship2(matcher, file, ctx) {
1880
1867
  }
1881
1868
  let requiresCompiled;
1882
1869
  try {
1883
- requiresCompiled = compileCached(requiresPattern, 0);
1870
+ requiresCompiled = RE2JS.compile(requiresPattern);
1884
1871
  } catch {
1885
1872
  console.error(`[re2js-v1] requiresPattern compile error for ${JSON.stringify(requiresPattern)} \u2014 fail closed`);
1886
1873
  return [
@@ -2032,7 +2019,6 @@ export {
2032
2019
  nativeV1Executor,
2033
2020
  NATIVE_V1_ADAPTER_IMPL_HASH,
2034
2021
  NATIVE_V1_RUNTIME_ID,
2035
- compileCached,
2036
2022
  re2jsV1Executor,
2037
2023
  re2jsTestPattern,
2038
2024
  RE2JS_V1_ADAPTER_IMPL_HASH,
@@ -3,7 +3,7 @@ import {
3
3
  detectBinary,
4
4
  normalizeNewlines,
5
5
  stripBom
6
- } from "./chunk-MPQ42F54.js";
6
+ } from "./chunk-KGIK7XNK.js";
7
7
 
8
8
  // src/utils/fs.ts
9
9
  import fg from "fast-glob";
@@ -68,7 +68,7 @@ async function readFiles(rootDir, patterns = ["**/*"], ignorePatterns = [], opti
68
68
  dot: true,
69
69
  absolute: false,
70
70
  onlyFiles: true,
71
- // Privacy moat (incident 3063d8a9): NEVER follow symlinks. A symlink inside
71
+ // Privacy moat: NEVER follow symlinks. A symlink inside
72
72
  // the project pointing out of the root (e.g. `ln -s /home escape`) would
73
73
  // otherwise cause the scan to descend out-of-tree, reading and reporting
74
74
  // files the user never intended to scan (and risking a hang on huge external
@@ -94,7 +94,7 @@ async function readFiles(rootDir, patterns = ["**/*"], ignorePatterns = [], opti
94
94
  const named = skippedSymlinkFiles.join(", ");
95
95
  const more = skippedSymlinks > skippedSymlinkFiles.length ? " (and others)" : "";
96
96
  console.warn(
97
- `[shipguard] Scan INCOMPLETE: ${skippedSymlinks} symlink(s) not followed (privacy moat, incident 3063d8a9) and NOT scanned: ${named}${more}`
97
+ `[shipguard] Scan INCOMPLETE: ${skippedSymlinks} symlink(s) not followed (privacy protection) and NOT scanned: ${named}${more}`
98
98
  );
99
99
  }
100
100
  const total = filePaths.length;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.1",
2
+ "version": "0.8.1",
3
3
  "packageName": "@agenticcli/shipguard",
4
4
  "license": "Elastic-2.0",
5
5
  "licenseDisplay": "ELv2",
@@ -83,8 +83,8 @@
83
83
  "postgresql.auth.trust-auth-method"
84
84
  ],
85
85
  "bundledCorpusRuleCount": 30,
86
- "corpusVersion": 18,
87
- "bundleContentHash": "sha256:fce96295cc50f6345ad4ddee6745710ba1671156b8e04702ef21793427d399cb",
86
+ "corpusVersion": 19,
87
+ "bundleContentHash": "sha256:1e274f5f8176c4ad8566703a67b110d038b528942c26c25c2b7299367bc8ffa8",
88
88
  "offlineRuleCount": 60,
89
89
  "jsonSchemaFields": [
90
90
  "findings",
@@ -111,7 +111,7 @@
111
111
  "coverageChanged",
112
112
  "scanIdReused"
113
113
  ],
114
- "schemaVersion": "0.7",
114
+ "schemaVersion": "0.8",
115
115
  "degradeCodes": [
116
116
  "FILE_TOO_LARGE",
117
117
  "OUTPUT_TRUNCATED",
@@ -142,5 +142,5 @@
142
142
  ],
143
143
  "installSnippet": "npx @agenticcli/shipguard scan --changed --strict --json",
144
144
  "re2Engine": true,
145
- "generatedAt": "2026-10-02T06:06:11.087Z"
145
+ "generatedAt": "2026-10-21T12:43:20.985Z"
146
146
  }