@clear-capabilities/agentic-security-scanner 0.121.0 → 0.122.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.
@@ -1 +1 @@
1
- 058bfb1a08d130e2e5f07a456b303b52a9874c5d2b679f89408d7e4446e1f214 agentic-security.mjs
1
+ 3249693b62570256c597f206447598e9ed6b618032f0d0a5a25dbbf62d53afc8 agentic-security.mjs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clear-capabilities/agentic-security-scanner",
3
- "version": "0.121.0",
3
+ "version": "0.122.0",
4
4
  "description": "Scanner engine for the agentic-security Claude Code plugin — SAST, SCA (function-level reachability + CISA KEV), secrets, IaC, prompt-injection, MCP/agent-tool audit, auth/authZ deep analysis, attack chains, PoC generation, business logic, toxic-combinations scoring, SBOM, SARIF ingest, pipeline integrity, compliance attestation, and more.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/mcp/tools.js CHANGED
@@ -18,7 +18,7 @@ import * as path from 'node:path';
18
18
  import * as crypto from 'node:crypto';
19
19
  import { applyFix as applyFixHistory, fixAcceptanceRate } from '../posture/fix-history.js';
20
20
  import { verifyLastScan } from '../posture/integrity.js';
21
- import { analyzeTranscript, formatCacheReport } from '../posture/cache-economics.js';
21
+ import { analyzeTranscript, formatCacheReport, renderCacheStatusLine } from '../posture/cache-economics.js';
22
22
  import { redactString, redactFinding } from './redact.js';
23
23
 
24
24
  // Lazy-loaded: these transitively pull in npm packages (fast-glob,
@@ -1043,6 +1043,7 @@ export const query_cache_telemetry = {
1043
1043
  metrics: result.metrics,
1044
1044
  leaks: result.leaks,
1045
1045
  report: formatCacheReport(result),
1046
+ statusline: renderCacheStatusLine(result.metrics),
1046
1047
  };
1047
1048
  },
1048
1049
  };
@@ -203,6 +203,14 @@ const CAUSE_LABEL = {
203
203
  'prefix-change': 'prefix changed (system prompt / tools / context edit)',
204
204
  };
205
205
 
206
+ // F6 — one-line HUD for a Claude Code statusLine command (mirrors
207
+ // watch-mode.js renderStatusLine). Takes the metrics from computeCacheEconomics.
208
+ export function renderCacheStatusLine(metrics) {
209
+ if (!metrics || !metrics.turns) return 'agentic-security: no session cost yet';
210
+ const hit = Math.round(metrics.cacheHitRatio * 100);
211
+ return `agentic-security: ${money(metrics.actualUsd)} · ${hit}% cached · ${money(metrics.costPerTurnUsd)}/turn`;
212
+ }
213
+
206
214
  export function formatCacheReport(result) {
207
215
  if (!result.ok) {
208
216
  return result.reason === 'no-transcript'