@node9/proxy 2.0.0 → 2.1.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/dist/cli.js +996 -906
- package/dist/cli.mjs +995 -905
- package/dist/index.js +3 -0
- package/dist/index.mjs +3 -0
- package/dist/scan-ink.mjs +100 -54
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4847,11 +4847,13 @@ function getConfig(cwd) {
|
|
|
4847
4847
|
}
|
|
4848
4848
|
const shieldOverrides = readShieldOverrides();
|
|
4849
4849
|
const activeShieldNames = [.../* @__PURE__ */ new Set([...readActiveShields(), ...cloudManagedShields])];
|
|
4850
|
+
const appliedShields = [];
|
|
4850
4851
|
const cloudManagedSet = new Set(cloudManagedShields);
|
|
4851
4852
|
for (const shieldName of activeShieldNames) {
|
|
4852
4853
|
const isCloudMandated = cloudManagedSet.has(shieldName);
|
|
4853
4854
|
const shield = isCloudMandated ? BUILTIN_SHIELDS[shieldName] : getShield(shieldName);
|
|
4854
4855
|
if (!shield) continue;
|
|
4856
|
+
appliedShields.push(shieldName);
|
|
4855
4857
|
const existingRuleNames = new Set(mergedPolicy.smartRules.map((r) => r.name));
|
|
4856
4858
|
const ruleOverrides = isCloudMandated ? {} : shieldOverrides[shieldName] ?? {};
|
|
4857
4859
|
for (const rule of shield.smartRules) {
|
|
@@ -4873,6 +4875,7 @@ function getConfig(cwd) {
|
|
|
4873
4875
|
if (!existingWords.has(word)) mergedPolicy.dangerousWords.push(word);
|
|
4874
4876
|
}
|
|
4875
4877
|
}
|
|
4878
|
+
mergedPolicy.appliedShields = appliedShields.sort();
|
|
4876
4879
|
const existingAdvisoryNames = new Set(mergedPolicy.smartRules.map((r) => r.name));
|
|
4877
4880
|
const cc = mergedPolicy.commandChecks ?? {};
|
|
4878
4881
|
const advisoryKnobKey = (name) => {
|
package/dist/index.mjs
CHANGED
|
@@ -4817,11 +4817,13 @@ function getConfig(cwd) {
|
|
|
4817
4817
|
}
|
|
4818
4818
|
const shieldOverrides = readShieldOverrides();
|
|
4819
4819
|
const activeShieldNames = [.../* @__PURE__ */ new Set([...readActiveShields(), ...cloudManagedShields])];
|
|
4820
|
+
const appliedShields = [];
|
|
4820
4821
|
const cloudManagedSet = new Set(cloudManagedShields);
|
|
4821
4822
|
for (const shieldName of activeShieldNames) {
|
|
4822
4823
|
const isCloudMandated = cloudManagedSet.has(shieldName);
|
|
4823
4824
|
const shield = isCloudMandated ? BUILTIN_SHIELDS[shieldName] : getShield(shieldName);
|
|
4824
4825
|
if (!shield) continue;
|
|
4826
|
+
appliedShields.push(shieldName);
|
|
4825
4827
|
const existingRuleNames = new Set(mergedPolicy.smartRules.map((r) => r.name));
|
|
4826
4828
|
const ruleOverrides = isCloudMandated ? {} : shieldOverrides[shieldName] ?? {};
|
|
4827
4829
|
for (const rule of shield.smartRules) {
|
|
@@ -4843,6 +4845,7 @@ function getConfig(cwd) {
|
|
|
4843
4845
|
if (!existingWords.has(word)) mergedPolicy.dangerousWords.push(word);
|
|
4844
4846
|
}
|
|
4845
4847
|
}
|
|
4848
|
+
mergedPolicy.appliedShields = appliedShields.sort();
|
|
4846
4849
|
const existingAdvisoryNames = new Set(mergedPolicy.smartRules.map((r) => r.name));
|
|
4847
4850
|
const cc = mergedPolicy.commandChecks ?? {};
|
|
4848
4851
|
const advisoryKnobKey = (name) => {
|
package/dist/scan-ink.mjs
CHANGED
|
@@ -152,6 +152,18 @@ function rollupByShield(sections, topRulesPerShield = 3) {
|
|
|
152
152
|
}
|
|
153
153
|
return out.sort((a, b) => b.totalCatches - a.totalCatches);
|
|
154
154
|
}
|
|
155
|
+
function originForRule(ruleName, sections, enabled) {
|
|
156
|
+
for (const section of sections) {
|
|
157
|
+
if (section.rules.some((r) => r.name === ruleName)) {
|
|
158
|
+
if (section.sourceType === "default") return "default";
|
|
159
|
+
if (section.sourceType === "shield") {
|
|
160
|
+
const key = section.shieldKey ?? section.id;
|
|
161
|
+
return enabled.has(key) ? `\u2713 shield:${key}` : `needs shield:${key}`;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return "";
|
|
166
|
+
}
|
|
155
167
|
function relativeDate(timestamp, now = /* @__PURE__ */ new Date()) {
|
|
156
168
|
const t = new Date(timestamp).getTime();
|
|
157
169
|
if (Number.isNaN(t)) return "?";
|
|
@@ -161,6 +173,11 @@ function relativeDate(timestamp, now = /* @__PURE__ */ new Date()) {
|
|
|
161
173
|
return `${days}d`;
|
|
162
174
|
}
|
|
163
175
|
|
|
176
|
+
// src/cli/render/ink/panels/title-count.ts
|
|
177
|
+
function topOf(shown, total) {
|
|
178
|
+
return total > shown ? ` \xB7 top ${shown} of ${total}` : "";
|
|
179
|
+
}
|
|
180
|
+
|
|
164
181
|
// src/cli/render/ink/panels/LeaksPanel.tsx
|
|
165
182
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
166
183
|
var ROW_LIMIT = 4;
|
|
@@ -168,7 +185,10 @@ function LeaksPanel({ summary, width, now = /* @__PURE__ */ new Date() }) {
|
|
|
168
185
|
const leaks = summary.leaks;
|
|
169
186
|
if (leaks.length === 0) return null;
|
|
170
187
|
return /* @__PURE__ */ jsxs5(Box5, { borderStyle: "round", borderColor: "red", paddingX: 1, flexDirection: "column", width, children: [
|
|
171
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ jsxs5(Text5, { bold: true, color: "red", children: [
|
|
189
|
+
"CREDENTIAL LEAKS",
|
|
190
|
+
/* @__PURE__ */ jsx5(Text5, { dimColor: true, children: topOf(Math.min(leaks.length, ROW_LIMIT), leaks.length) })
|
|
191
|
+
] }),
|
|
172
192
|
leaks.slice(0, ROW_LIMIT).map((leak, i) => /* @__PURE__ */ jsxs5(Box5, { children: [
|
|
173
193
|
/* @__PURE__ */ jsx5(Box5, { width: 5, children: /* @__PURE__ */ jsx5(Text5, { dimColor: true, children: relativeDate(leak.timestamp, now).padStart(4) }) }),
|
|
174
194
|
/* @__PURE__ */ jsx5(Box5, { width: 16, children: /* @__PURE__ */ jsx5(Text5, { color: "red", bold: true, wrap: "truncate-end", children: leak.patternName }) }),
|
|
@@ -188,30 +208,31 @@ function LeaksPanel({ summary, width, now = /* @__PURE__ */ new Date() }) {
|
|
|
188
208
|
// src/cli/render/ink/panels/BlockedPanel.tsx
|
|
189
209
|
import { Box as Box6, Text as Text6 } from "ink";
|
|
190
210
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
191
|
-
function originForRule(ruleName, sections) {
|
|
192
|
-
for (const section of sections) {
|
|
193
|
-
if (section.rules.some((r) => r.name === ruleName)) {
|
|
194
|
-
if (section.sourceType === "default") return "default";
|
|
195
|
-
if (section.sourceType === "shield") {
|
|
196
|
-
return `needs shield:${section.shieldKey ?? section.id}`;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
return "";
|
|
201
|
-
}
|
|
202
211
|
var ROW_LIMIT2 = 12;
|
|
203
|
-
function BlockedPanel({
|
|
204
|
-
|
|
212
|
+
function BlockedPanel({
|
|
213
|
+
summary,
|
|
214
|
+
width,
|
|
215
|
+
enabledShields = []
|
|
216
|
+
}) {
|
|
217
|
+
const enabled = new Set(enabledShields);
|
|
218
|
+
const allRules = topRulesByVerdict(summary.sections, "block", Number.MAX_SAFE_INTEGER);
|
|
219
|
+
const rules = allRules.slice(0, ROW_LIMIT2);
|
|
205
220
|
if (rules.length === 0) return null;
|
|
221
|
+
const origins = rules.map((r) => originForRule(r.name, summary.sections, enabled));
|
|
222
|
+
const anyNeeds = origins.some((o) => o.startsWith("needs shield:"));
|
|
223
|
+
const footer = enabled.size === 0 ? "\u2192 install node9 + enable shields above" : anyNeeds ? "\u2192 \u2713 marks rules from enabled shields \xB7 enable the rest above" : "\u2192 \u2713 all these rules come from enabled shields";
|
|
206
224
|
return /* @__PURE__ */ jsxs6(Box6, { borderStyle: "round", borderColor: "red", paddingX: 1, flexDirection: "column", width, children: [
|
|
207
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ jsxs6(Text6, { bold: true, color: "red", children: [
|
|
226
|
+
"WOULD HAVE BLOCKED",
|
|
227
|
+
/* @__PURE__ */ jsx6(Text6, { dimColor: true, children: topOf(rules.length, allRules.length) })
|
|
228
|
+
] }),
|
|
208
229
|
rules.map((rule, i) => /* @__PURE__ */ jsxs6(Box6, { children: [
|
|
209
230
|
/* @__PURE__ */ jsx6(Box6, { width: 3, children: /* @__PURE__ */ jsx6(Text6, { color: "red", children: "\u2717" }) }),
|
|
210
231
|
/* @__PURE__ */ jsx6(Box6, { width: 24, children: /* @__PURE__ */ jsx6(Text6, { bold: true, wrap: "truncate-end", children: rule.name }) }),
|
|
211
232
|
/* @__PURE__ */ jsx6(Box6, { width: 6, children: /* @__PURE__ */ jsx6(Text6, { bold: true, children: `\xD7${rule.count}` }) }),
|
|
212
|
-
/* @__PURE__ */ jsx6(Text6, { dimColor: true, wrap: "truncate-end", children: originForRule(rule.name, summary.sections) })
|
|
233
|
+
/* @__PURE__ */ jsx6(Text6, { dimColor: true, wrap: "truncate-end", children: originForRule(rule.name, summary.sections, enabled) })
|
|
213
234
|
] }, i)),
|
|
214
|
-
/* @__PURE__ */ jsx6(Box6, { children: /* @__PURE__ */ jsx6(Text6, { dimColor: true, wrap: "truncate-end", children:
|
|
235
|
+
/* @__PURE__ */ jsx6(Box6, { children: /* @__PURE__ */ jsx6(Text6, { dimColor: true, wrap: "truncate-end", children: footer }) })
|
|
215
236
|
] });
|
|
216
237
|
}
|
|
217
238
|
|
|
@@ -219,14 +240,19 @@ function BlockedPanel({ summary, width }) {
|
|
|
219
240
|
import { Box as Box7, Text as Text7 } from "ink";
|
|
220
241
|
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
221
242
|
var ROW_LIMIT3 = 4;
|
|
243
|
+
var ENV_ROW_LIMIT = 3;
|
|
222
244
|
function BlastRadiusPanel({
|
|
223
245
|
blast,
|
|
224
246
|
blastExposures,
|
|
225
247
|
width
|
|
226
248
|
}) {
|
|
227
249
|
if (blastExposures === 0) return null;
|
|
250
|
+
const shown = Math.min(blast.reachable.length, ROW_LIMIT3) + Math.min(blast.envFindings.length, ENV_ROW_LIMIT);
|
|
228
251
|
return /* @__PURE__ */ jsxs7(Box7, { borderStyle: "round", borderColor: "yellow", paddingX: 1, flexDirection: "column", width, children: [
|
|
229
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ jsxs7(Text7, { bold: true, color: "yellow", children: [
|
|
253
|
+
"BLAST RADIUS",
|
|
254
|
+
/* @__PURE__ */ jsx7(Text7, { dimColor: true, children: topOf(shown, blastExposures) })
|
|
255
|
+
] }),
|
|
230
256
|
blast.reachable.slice(0, ROW_LIMIT3).map((path, i) => {
|
|
231
257
|
const desc = path.description.split(" \u2014 ")[0].split(/—|--/)[0].trim();
|
|
232
258
|
return /* @__PURE__ */ jsxs7(Box7, { children: [
|
|
@@ -251,19 +277,13 @@ function BlastRadiusPanel({
|
|
|
251
277
|
// src/cli/render/ink/panels/ReviewQueuePanel.tsx
|
|
252
278
|
import { Box as Box8, Text as Text8 } from "ink";
|
|
253
279
|
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
254
|
-
function originForRule2(ruleName, sections) {
|
|
255
|
-
for (const section of sections) {
|
|
256
|
-
if (section.rules.some((r) => r.name === ruleName)) {
|
|
257
|
-
if (section.sourceType === "default") return "default";
|
|
258
|
-
if (section.sourceType === "shield") {
|
|
259
|
-
return `needs shield:${section.shieldKey ?? section.id}`;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
return "";
|
|
264
|
-
}
|
|
265
280
|
var ROW_LIMIT4 = 5;
|
|
266
|
-
function ReviewQueuePanel({
|
|
281
|
+
function ReviewQueuePanel({
|
|
282
|
+
summary,
|
|
283
|
+
width,
|
|
284
|
+
enabledShields = []
|
|
285
|
+
}) {
|
|
286
|
+
const enabled = new Set(enabledShields);
|
|
267
287
|
const rules = topRulesByVerdict(summary.sections, "review", ROW_LIMIT4);
|
|
268
288
|
if (rules.length === 0) return null;
|
|
269
289
|
return /* @__PURE__ */ jsxs8(Box8, { borderStyle: "round", borderColor: "gray", paddingX: 1, flexDirection: "column", width, children: [
|
|
@@ -271,7 +291,7 @@ function ReviewQueuePanel({ summary, width }) {
|
|
|
271
291
|
rules.map((rule, i) => /* @__PURE__ */ jsxs8(Box8, { children: [
|
|
272
292
|
/* @__PURE__ */ jsx8(Box8, { width: 22, children: /* @__PURE__ */ jsx8(Text8, { wrap: "truncate-end", children: rule.name }) }),
|
|
273
293
|
/* @__PURE__ */ jsx8(Box8, { width: 6, children: /* @__PURE__ */ jsx8(Text8, { bold: true, children: `\xD7${rule.count}` }) }),
|
|
274
|
-
/* @__PURE__ */ jsx8(Text8, { dimColor: true, wrap: "truncate-end", children:
|
|
294
|
+
/* @__PURE__ */ jsx8(Text8, { dimColor: true, wrap: "truncate-end", children: originForRule(rule.name, summary.sections, enabled) })
|
|
275
295
|
] }, i)),
|
|
276
296
|
/* @__PURE__ */ jsxs8(Box8, { children: [
|
|
277
297
|
/* @__PURE__ */ jsx8(Text8, { dimColor: true, wrap: "truncate-end", children: "\u2192 " }),
|
|
@@ -304,7 +324,10 @@ function AgentLoopsPanel({ loopFindings, width }) {
|
|
|
304
324
|
const toolEntries = [...byTool.entries()].sort((a, b) => b[1] - a[1]).slice(0, TOOL_ROW_LIMIT);
|
|
305
325
|
const topStuck = [...loopFindings].sort((a, b) => b.count - a.count).slice(0, STUCK_ROW_LIMIT);
|
|
306
326
|
return /* @__PURE__ */ jsxs9(Box9, { borderStyle: "round", borderColor: "gray", paddingX: 1, flexDirection: "column", width, children: [
|
|
307
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ jsxs9(Text9, { bold: true, children: [
|
|
328
|
+
"AGENT LOOPS",
|
|
329
|
+
/* @__PURE__ */ jsx9(Text9, { dimColor: true, children: topOf(toolEntries.length, byTool.size) })
|
|
330
|
+
] }),
|
|
308
331
|
toolEntries.map(([tool, repeats]) => {
|
|
309
332
|
const pct = totalRepeats > 0 ? Math.round(repeats / totalRepeats * 100) : 0;
|
|
310
333
|
return /* @__PURE__ */ jsxs9(Box9, { children: [
|
|
@@ -1651,9 +1674,9 @@ var LONG_OUTPUT_THRESHOLD_BYTES = 100 * 1024;
|
|
|
1651
1674
|
|
|
1652
1675
|
// src/cli/render/ink/panels/ShieldsPanel.tsx
|
|
1653
1676
|
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1654
|
-
function ShieldsPanel({ summary,
|
|
1677
|
+
function ShieldsPanel({ summary, width, enabledShields = [] }) {
|
|
1678
|
+
const enabled = new Set(enabledShields);
|
|
1655
1679
|
const impacts = rollupByShield(summary.sections);
|
|
1656
|
-
const exposed = Math.max(0, 100 - blastScore);
|
|
1657
1680
|
const ranked = [...impacts].sort((a, b) => {
|
|
1658
1681
|
const aDiscount = PROTECTIVE_SHIELD_DISCOUNTS[a.shieldName] ?? 0;
|
|
1659
1682
|
const bDiscount = PROTECTIVE_SHIELD_DISCOUNTS[b.shieldName] ?? 0;
|
|
@@ -1662,30 +1685,30 @@ function ShieldsPanel({ summary, blastScore, width }) {
|
|
|
1662
1685
|
});
|
|
1663
1686
|
const hitShields = ranked.filter((i) => i.totalCatches > 0);
|
|
1664
1687
|
const hitNames = new Set(hitShields.map((i) => i.shieldName));
|
|
1665
|
-
const
|
|
1666
|
-
const
|
|
1667
|
-
const
|
|
1688
|
+
const zeroHitAll = Object.keys(BUILTIN_SHIELDS).filter((name) => !hitNames.has(name)).sort();
|
|
1689
|
+
const zeroHitBuiltins = zeroHitAll.filter((name) => !enabled.has(name));
|
|
1690
|
+
const zeroHitEnabled = zeroHitAll.filter((name) => enabled.has(name));
|
|
1691
|
+
const topRec = hitShields.find(
|
|
1692
|
+
(r) => (PROTECTIVE_SHIELD_DISCOUNTS[r.shieldName] ?? 0) > 0 && !enabled.has(r.shieldName)
|
|
1693
|
+
);
|
|
1694
|
+
const allCovered = !topRec && hitShields.some(
|
|
1695
|
+
(r) => (PROTECTIVE_SHIELD_DISCOUNTS[r.shieldName] ?? 0) > 0 && enabled.has(r.shieldName)
|
|
1696
|
+
);
|
|
1668
1697
|
return /* @__PURE__ */ jsxs10(Box10, { borderStyle: "round", borderColor: "cyan", paddingX: 1, flexDirection: "column", width, children: [
|
|
1669
1698
|
/* @__PURE__ */ jsx10(Text10, { bold: true, color: "cyan", children: "SHIELDS" }),
|
|
1670
1699
|
hitShields.map((impact) => {
|
|
1671
1700
|
const discount = PROTECTIVE_SHIELD_DISCOUNTS[impact.shieldName] ?? 0;
|
|
1672
|
-
const
|
|
1701
|
+
const isOn = enabled.has(impact.shieldName);
|
|
1673
1702
|
const noun = `op${impact.totalCatches !== 1 ? "s" : ""}`;
|
|
1674
1703
|
return /* @__PURE__ */ jsxs10(Box10, { children: [
|
|
1675
1704
|
/* @__PURE__ */ jsx10(Box10, { width: 16, children: /* @__PURE__ */ jsx10(Text10, { bold: true, color: discount > 0 ? "cyan" : void 0, dimColor: discount === 0, children: impact.shieldName }) }),
|
|
1676
1705
|
/* @__PURE__ */ jsx10(Box10, { width: 20, children: /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: `catches ${impact.totalCatches} ${noun}` }) }),
|
|
1677
|
-
|
|
1678
|
-
Text10,
|
|
1679
|
-
{
|
|
1680
|
-
bold: true,
|
|
1681
|
-
color: "green",
|
|
1682
|
-
children: `\u2192 +${bonus} pts (${blastScore} \u2192 ${blastScore + bonus})`
|
|
1683
|
-
}
|
|
1684
|
-
) : null
|
|
1706
|
+
isOn ? /* @__PURE__ */ jsx10(Text10, { bold: true, color: "green", children: `\u2713 enabled` }) : discount > 0 ? /* @__PURE__ */ jsx10(Text10, { bold: true, color: "green", children: `\u2192 blocks these reads in-path` }) : null
|
|
1685
1707
|
] }, impact.shieldName);
|
|
1686
1708
|
}),
|
|
1709
|
+
zeroHitEnabled.length > 0 ? /* @__PURE__ */ jsx10(Box10, { flexDirection: "column", children: /* @__PURE__ */ jsx10(Text10, { dimColor: true, wrap: "truncate-end", children: "\u2713 active: " + zeroHitEnabled.join(" \xB7 ") + " (no hits in this history)" }) }) : null,
|
|
1687
1710
|
zeroHitBuiltins.length > 0 ? /* @__PURE__ */ jsx10(Box10, { flexDirection: "column", children: /* @__PURE__ */ jsx10(Text10, { dimColor: true, wrap: "truncate-end", children: zeroHitBuiltins.join(" \xB7 ") + " (no hits \u2014 install proactively)" }) }) : null,
|
|
1688
|
-
topRec ? /* @__PURE__ */ jsx10(Box10, { children: /* @__PURE__ */ jsx10(Text10, { color: "cyan", bold: true, children: `\u2192 node9 shield enable ${topRec.shieldName} (start here \u2014
|
|
1711
|
+
topRec ? /* @__PURE__ */ jsx10(Box10, { children: /* @__PURE__ */ jsx10(Text10, { color: "cyan", bold: true, children: `\u2192 node9 shield enable ${topRec.shieldName} (start here \u2014 widest coverage)` }) }) : allCovered ? /* @__PURE__ */ jsx10(Box10, { children: /* @__PURE__ */ jsx10(Text10, { color: "green", bold: true, children: "\u2713 recommended shields are enabled" }) }) : null
|
|
1689
1712
|
] });
|
|
1690
1713
|
}
|
|
1691
1714
|
|
|
@@ -1708,7 +1731,7 @@ function StaticScorecard({ input, rangeLabel, now }) {
|
|
|
1708
1731
|
parts.push(`${leakCount} secret${leakCount !== 1 ? "s" : ""} leaked`);
|
|
1709
1732
|
}
|
|
1710
1733
|
if (blockedCount > 0) {
|
|
1711
|
-
parts.push(`${blockedCount} op${blockedCount !== 1 ? "s" : ""} blocked`);
|
|
1734
|
+
parts.push(`${blockedCount} op${blockedCount !== 1 ? "s" : ""} would be blocked`);
|
|
1712
1735
|
}
|
|
1713
1736
|
return `Critical (${parts.join(" + ")})`;
|
|
1714
1737
|
})();
|
|
@@ -1723,14 +1746,27 @@ function StaticScorecard({ input, rangeLabel, now }) {
|
|
|
1723
1746
|
/* @__PURE__ */ jsx11(SeverityBand, { label: criticalLabel, width }),
|
|
1724
1747
|
/* @__PURE__ */ jsxs11(Box11, { flexDirection: "row", gap: 1, children: [
|
|
1725
1748
|
/* @__PURE__ */ jsx11(LeaksPanel, { summary, width: halfWidth, now }),
|
|
1726
|
-
/* @__PURE__ */ jsx11(
|
|
1749
|
+
/* @__PURE__ */ jsx11(
|
|
1750
|
+
BlockedPanel,
|
|
1751
|
+
{
|
|
1752
|
+
summary,
|
|
1753
|
+
width: halfWidth,
|
|
1754
|
+
enabledShields: input.enabledShields
|
|
1755
|
+
}
|
|
1756
|
+
)
|
|
1727
1757
|
] })
|
|
1728
1758
|
] }) : null,
|
|
1729
1759
|
input.blastExposures > 0 ? /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
1730
1760
|
/* @__PURE__ */ jsx11(
|
|
1731
1761
|
SeverityBand,
|
|
1732
1762
|
{
|
|
1733
|
-
label:
|
|
1763
|
+
label: (() => {
|
|
1764
|
+
const paths = input.blast.reachable.length;
|
|
1765
|
+
const envs = input.blast.envFindings.length;
|
|
1766
|
+
const pathPart = `${paths} path${paths !== 1 ? "s" : ""}`;
|
|
1767
|
+
const envPart = envs > 0 ? ` + ${envs} env var${envs !== 1 ? "s" : ""}` : "";
|
|
1768
|
+
return `High (${pathPart}${envPart} reachable)`;
|
|
1769
|
+
})(),
|
|
1734
1770
|
width
|
|
1735
1771
|
}
|
|
1736
1772
|
),
|
|
@@ -1747,23 +1783,33 @@ function StaticScorecard({ input, rangeLabel, now }) {
|
|
|
1747
1783
|
const reviewCount = input.reviewCount;
|
|
1748
1784
|
const loopCount = input.scan.loopFindings.length;
|
|
1749
1785
|
if (reviewCount === 0 && loopCount === 0) return null;
|
|
1750
|
-
const { wastePct } = computeLoopWaste(
|
|
1786
|
+
const { wastePct, wastedCalls } = computeLoopWaste(
|
|
1787
|
+
input.scan.loopFindings,
|
|
1788
|
+
input.scan.totalToolCalls
|
|
1789
|
+
);
|
|
1751
1790
|
const parts = [];
|
|
1752
1791
|
if (reviewCount > 0) parts.push(`${reviewCount} op${reviewCount !== 1 ? "s" : ""} flagged`);
|
|
1753
1792
|
if (loopCount > 0)
|
|
1754
1793
|
parts.push(
|
|
1755
|
-
`${loopCount} loop${loopCount !== 1 ? "s" : ""}${
|
|
1794
|
+
`${loopCount} loop${loopCount !== 1 ? "s" : ""}${wastedCalls > 0 ? ` \xB7 ${wastedCalls} wasted calls (${wastePct}% of all calls)` : ""}`
|
|
1756
1795
|
);
|
|
1757
1796
|
return /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
1758
1797
|
/* @__PURE__ */ jsx11(SeverityBand, { label: `Medium (${parts.join(" \xB7 ")})`, width }),
|
|
1759
1798
|
/* @__PURE__ */ jsxs11(Box11, { flexDirection: "row", gap: 1, children: [
|
|
1760
|
-
/* @__PURE__ */ jsx11(
|
|
1799
|
+
/* @__PURE__ */ jsx11(
|
|
1800
|
+
ReviewQueuePanel,
|
|
1801
|
+
{
|
|
1802
|
+
summary: input.summary,
|
|
1803
|
+
width: halfWidth,
|
|
1804
|
+
enabledShields: input.enabledShields
|
|
1805
|
+
}
|
|
1806
|
+
),
|
|
1761
1807
|
/* @__PURE__ */ jsx11(AgentLoopsPanel, { loopFindings: input.scan.loopFindings, width: halfWidth })
|
|
1762
1808
|
] })
|
|
1763
1809
|
] });
|
|
1764
1810
|
})(),
|
|
1765
1811
|
/* @__PURE__ */ jsx11(SeverityBand, { label: "Recommended action", width }),
|
|
1766
|
-
/* @__PURE__ */ jsx11(ShieldsPanel, { summary: input.summary,
|
|
1812
|
+
/* @__PURE__ */ jsx11(ShieldsPanel, { summary: input.summary, width, enabledShields: input.enabledShields })
|
|
1767
1813
|
] });
|
|
1768
1814
|
}
|
|
1769
1815
|
function renderScanScorecardInk(input, rangeLabel) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node9/proxy",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "The Sudo Command for AI Agents. Execution Security for Claude Code, Codex, Gemini, Cursor, Opencode, Pi, and any MCP server.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|