@node9/policy-engine 2.13.0 → 2.14.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/index.d.mts CHANGED
@@ -207,6 +207,25 @@ declare function detectDangerousShellExec(command: string): 'block' | 'review' |
207
207
  /** @deprecated Use detectDangerousShellExec — kept for backwards compatibility */
208
208
  declare const detectDangerousEval: typeof detectDangerousShellExec;
209
209
  declare const FS_READ_TOOLS: Set<string>;
210
+ /** How a copy verb's arguments are read. */
211
+ interface CopyShape {
212
+ /**
213
+ * allButLast cp SRC... DEST (GNU -t moves DEST into a flag: every slot is a source)
214
+ * first ln TARGET LINK
215
+ * all gzip -c FILE
216
+ * archive tar/zip/ar/7z: the inputs after the archive slot, in a WRITING mode
217
+ * flagOperand the source is a flag's operand: az ... upload -f SRC / --file SRC
218
+ */
219
+ source: 'allButLast' | 'first' | 'all' | 'archive' | 'flagOperand';
220
+ archive?: 'tar' | 'zip' | 'ar' | '7z';
221
+ /** flagOperand: the flags (short letter or long name) whose operand is the source. */
222
+ sourceFlags?: string[];
223
+ /** GNU `-t DIR` / `--target-directory`: the destination is in a flag. */
224
+ targetDirFlag?: boolean;
225
+ /** Flags whose operand is NEVER a source: a short LETTER ('i') or a long name ('--exclude'). */
226
+ skipFlags?: string[];
227
+ }
228
+ declare const COPY_VERBS: Record<string, CopyShape>;
210
229
  interface FsOpVerdict {
211
230
  ruleName: string;
212
231
  verdict: 'block' | 'review';
@@ -217,6 +236,7 @@ interface FsOpVerdict {
217
236
  declare const BASH_TOOL_NAMES: Set<string>;
218
237
  declare function isBashTool(toolName: string): boolean;
219
238
  declare const AST_FS_REGEX_RULES: Set<string>;
239
+ declare const COMMAND_WRAPPERS: Set<string>;
220
240
  /**
221
241
  * Does `toolName` carry a shell command? True for BASH_TOOL_NAMES spellings and
222
242
  * for any tool whose toolInspection field is `command` (e.g. `terminal.execute`).
@@ -235,6 +255,11 @@ declare function isShellShapedTool(toolName: string, toolInspection?: Record<str
235
255
  * void them. An absent rule scope matches everything (callers' prior semantics).
236
256
  */
237
257
  declare function toolMatchesRule(toolName: string, ruleTool: string | string[] | undefined, toolInspection?: Record<string, string>): boolean;
258
+ /** Strip leading wrappers/runners from a resolved arg list, returning the index
259
+ * of the real command head. Handles `sudo -u www python3`, `env -u FOO python3`,
260
+ * `timeout 5 python3`, `uv run python`, `conda run -n env python`,
261
+ * `chroot /mnt python3`. */
262
+ declare function unwrapCommandHead(words: (string | null)[]): number;
238
263
  /**
239
264
  * AST-aware inline-execution detector. Returns true when the command runs code
240
265
  * supplied on the command line, via stdin, or via a pipe into a bare
@@ -247,6 +272,29 @@ declare function detectInlineExec(command: string): boolean;
247
272
  * the tool-managed cache allow-list. Used to gate `rm -rf` on home paths.
248
273
  */
249
274
  declare function isProtectedHomePath(rawPath: string): boolean;
275
+ /**
276
+ * Extract literal-text positional arguments from a CallExpr. Skips flags
277
+ * (anything starting with `-`) and ParamExp/CmdSubst (dynamic) parts. Returns
278
+ * the resolved string for each arg that is purely literal text.
279
+ */
280
+ /** A resolved, non-flag argument and where it sits. */
281
+ interface PositionedArg {
282
+ /** The resolved literal. */
283
+ value: string;
284
+ /** 0-based SLOT among non-flag words -- `cp SRC DEST`: SRC is 0, DEST is 1. */
285
+ index: number;
286
+ /** Absolute index in the resolved word list, for explainability. */
287
+ argv: number;
288
+ /** The flag immediately before this word (`ssh -i KEY`: '-i'), else null. */
289
+ afterFlag: string | null;
290
+ }
291
+ /**
292
+ * The positioned non-flag words of `words[from..to)`. A dynamic word (null)
293
+ * occupies no slot AND breaks the flag link -- `-v $SRC KEY` gives KEY no flag,
294
+ * because something unknowable sat between them. Its `.map(a => a.value)` is
295
+ * exactly the pre-stage-3 filter, which jail-position.spec.ts pins.
296
+ */
297
+ declare function positionedArgs(words: (string | null)[], from?: number, to?: number): PositionedArg[];
250
298
  interface ShellDestination {
251
299
  /** Extracted hostname, lowercased (e.g. "evil.com", "10.0.0.5"). */
252
300
  host: string;
@@ -255,6 +303,7 @@ interface ShellDestination {
255
303
  /** The raw argument token the host came from (for UI / audit). */
256
304
  raw: string;
257
305
  }
306
+ declare const NET_BINARIES: Set<string>;
258
307
  /**
259
308
  * Parse a destination host out of a single token. Handles scheme URLs
260
309
  * (`https://h/p`), scheme-less curl targets (`evil.com/p`), `user@host:path`
@@ -288,6 +337,12 @@ interface ShellDestToken {
288
337
  */
289
338
  declare function extractShellDestTokens(command: string): ShellDestToken[];
290
339
  declare function analyzeFsOperation(command: string): FsOpVerdict | null;
340
+ /**
341
+ * One representative command per copy verb, for a gate test that DERIVES its
342
+ * rows from COPY_VERBS instead of keeping a second hand list (the trap the
343
+ * prescreen comment above describes). `src` is the path being copied out.
344
+ */
345
+ declare function sampleCopyCommand(verb: string, src: string): string;
291
346
  interface ShellCommandAnalysis {
292
347
  /** First word of every CallExpr — the command names invoked. */
293
348
  actions: string[];
@@ -1196,7 +1251,7 @@ declare const LONG_OUTPUT_THRESHOLD_BYTES: number;
1196
1251
  * and fails CI when the hash drifts without a version bump — forgetting
1197
1252
  * is loud, not silent.
1198
1253
  */
1199
- declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v10";
1254
+ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v14";
1200
1255
  /**
1201
1256
  * SHA-256 prefix of the detector-source files
1202
1257
  * (canonical.ts + pii.ts + destructive-regex.ts).
@@ -1207,7 +1262,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v10";
1207
1262
  * files changed, this hash must change too, and you must consciously
1208
1263
  * decide whether to bump CANONICAL_EXTRACTOR_VERSION."
1209
1264
  */
1210
- declare const CANONICAL_EXTRACTOR_HASH = "c4edee9dc99eb69a";
1265
+ declare const CANONICAL_EXTRACTOR_HASH = "8b5729fe236a195b";
1211
1266
  declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
1212
1267
  declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
1213
1268
  /**
@@ -1327,4 +1382,4 @@ declare function ssrfDestinationFloor(toolName: string, args: unknown, opts?: {
1327
1382
  /** Engine version stamped on audit entries for future drift detection. */
1328
1383
  declare const ENGINE_VERSION = "1.4.0";
1329
1384
 
1330
- export { AST_FS_REGEX_RULES, type AuditEntryForClassify, BASH_TOOL_NAMES, BUILTIN_SHIELDS, type BlastEnvFinding, type BlastFinding, type BlastResult, type BlastSummary, CANARY_MIN_LENGTH, CANONICAL_EXTRACTOR_HASH, CANONICAL_EXTRACTOR_VERSION, COST_PER_LOOP_ITER_USD, type CanaryHit, type CanaryValue, type CanaryView, type CanonicalAgent, type CanonicalFinding, type CanonicalFindingType, type CanonicalSourceType, DEFAULT_EGRESS_ALLOWLIST, DESTINATION_ARGS, DESTRUCTIVE_OP_RE, DLP_PATTERNS, DLP_SCAN_LIMITS, type DlpMatch, ENGINE_VERSION, type EgressPolicy, type EgressVerdict, type ExtractContext, FILE_TOOLS, FLAGS_WITH_VALUES, FS_READ_TOOLS, type FsOpVerdict, type InjectionConfidence, type InjectionContext, type InjectionMatch, LONG_OUTPUT_THRESHOLD_BYTES, LOOP_MAX_RECORDS, LOOP_THRESHOLD_FOR_WASTE, type LoopWindowEvaluation, PRIVILEGE_ESCALATION_RE, type PiiPattern, type PipeChainAnalysis, type PolicyConfig, type PolicyContext, type PolicyHostHooks, type PolicyVerdict, type ProvenanceLookup, type ProvenanceTrust, REALTIME_PII_PATTERNS, type RiskMetadata, SCAN_SIGNAL_WEIGHTS, SENSITIVE_PATH_RE, SENSITIVE_PATH_REGEXES, SSRF_MAX_HOST, type ScanFinding, type ScanSignals, type ScanSummary, type ScoreTier, type SessionExtractContext, type SessionToolCall, type Severity, type ShellCommandAnalysis, type ShellDestToken, type ShellDestination, type ShieldDefinition, type ShieldOverrides, type ShieldVerdict, type SmartCondition, type SmartRule, type SsrfFloorOptions, type SsrfMatch, type SsrfTier, type SsrfVerdict, type ToolCallEntry, type ToolCallRecord, analyzeFsOperation, analyzePipeChain, analyzeShellCommand, checkDangerousSql, classifyAuditEntry, classifyRuleSeverity, classifyScanSignal, classifySsrf, computeAgentDeviceScore, computeArgsHash, computeBlendedSecurityScore, computeScanScore, computeSecurityScore, dedupeCanonicalFindings, detectArgsPii, detectDangerousEval, detectDangerousShellExec, detectInlineExec, detectPii, evaluateEgress, evaluateLoopWindow, evaluatePolicy, evaluateSmartConditions, extractAllSshHosts, extractCanonicalFindings, extractNetworkTargets, extractPositionalArgs, extractSessionLevelFindings, extractShellDestTokens, extractShellDestinations, getCompiledRegex, getNestedValue, hostMatches, isBashTool, isIgnoredTool, isPrivateHost, isProtectedHomePath, isShellShapedTool, isShieldVerdict, isStrictGatedTier, matchCanary, matchCanaryArgs, matchSensitivePath, matchesPattern, narrativeRuleLabel, normalizeCommandForPolicy, normalizeIpLiteral, parseAllSshHostsFromCommand, parseDestHost, previewArgs, redactText, resolvePinned, scanArgs, scanInjection, scanText, sensitivePathMatch, ssrfDestinationFloor, ssrfFloor, ssrfReason, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, validateOverrides, validateRegex, validateShieldDefinition };
1385
+ export { AST_FS_REGEX_RULES, type AuditEntryForClassify, BASH_TOOL_NAMES, BUILTIN_SHIELDS, type BlastEnvFinding, type BlastFinding, type BlastResult, type BlastSummary, CANARY_MIN_LENGTH, CANONICAL_EXTRACTOR_HASH, CANONICAL_EXTRACTOR_VERSION, COMMAND_WRAPPERS, COPY_VERBS, COST_PER_LOOP_ITER_USD, type CanaryHit, type CanaryValue, type CanaryView, type CanonicalAgent, type CanonicalFinding, type CanonicalFindingType, type CanonicalSourceType, DEFAULT_EGRESS_ALLOWLIST, DESTINATION_ARGS, DESTRUCTIVE_OP_RE, DLP_PATTERNS, DLP_SCAN_LIMITS, type DlpMatch, ENGINE_VERSION, type EgressPolicy, type EgressVerdict, type ExtractContext, FILE_TOOLS, FLAGS_WITH_VALUES, FS_READ_TOOLS, type FsOpVerdict, type InjectionConfidence, type InjectionContext, type InjectionMatch, LONG_OUTPUT_THRESHOLD_BYTES, LOOP_MAX_RECORDS, LOOP_THRESHOLD_FOR_WASTE, type LoopWindowEvaluation, NET_BINARIES, PRIVILEGE_ESCALATION_RE, type PiiPattern, type PipeChainAnalysis, type PolicyConfig, type PolicyContext, type PolicyHostHooks, type PolicyVerdict, type PositionedArg, type ProvenanceLookup, type ProvenanceTrust, REALTIME_PII_PATTERNS, type RiskMetadata, SCAN_SIGNAL_WEIGHTS, SENSITIVE_PATH_RE, SENSITIVE_PATH_REGEXES, SSRF_MAX_HOST, type ScanFinding, type ScanSignals, type ScanSummary, type ScoreTier, type SessionExtractContext, type SessionToolCall, type Severity, type ShellCommandAnalysis, type ShellDestToken, type ShellDestination, type ShieldDefinition, type ShieldOverrides, type ShieldVerdict, type SmartCondition, type SmartRule, type SsrfFloorOptions, type SsrfMatch, type SsrfTier, type SsrfVerdict, type ToolCallEntry, type ToolCallRecord, analyzeFsOperation, analyzePipeChain, analyzeShellCommand, checkDangerousSql, classifyAuditEntry, classifyRuleSeverity, classifyScanSignal, classifySsrf, computeAgentDeviceScore, computeArgsHash, computeBlendedSecurityScore, computeScanScore, computeSecurityScore, dedupeCanonicalFindings, detectArgsPii, detectDangerousEval, detectDangerousShellExec, detectInlineExec, detectPii, evaluateEgress, evaluateLoopWindow, evaluatePolicy, evaluateSmartConditions, extractAllSshHosts, extractCanonicalFindings, extractNetworkTargets, extractPositionalArgs, extractSessionLevelFindings, extractShellDestTokens, extractShellDestinations, getCompiledRegex, getNestedValue, hostMatches, isBashTool, isIgnoredTool, isPrivateHost, isProtectedHomePath, isShellShapedTool, isShieldVerdict, isStrictGatedTier, matchCanary, matchCanaryArgs, matchSensitivePath, matchesPattern, narrativeRuleLabel, normalizeCommandForPolicy, normalizeIpLiteral, parseAllSshHostsFromCommand, parseDestHost, positionedArgs, previewArgs, redactText, resolvePinned, sampleCopyCommand, scanArgs, scanInjection, scanText, sensitivePathMatch, ssrfDestinationFloor, ssrfFloor, ssrfReason, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, unwrapCommandHead, validateOverrides, validateRegex, validateShieldDefinition };
package/dist/index.d.ts CHANGED
@@ -207,6 +207,25 @@ declare function detectDangerousShellExec(command: string): 'block' | 'review' |
207
207
  /** @deprecated Use detectDangerousShellExec — kept for backwards compatibility */
208
208
  declare const detectDangerousEval: typeof detectDangerousShellExec;
209
209
  declare const FS_READ_TOOLS: Set<string>;
210
+ /** How a copy verb's arguments are read. */
211
+ interface CopyShape {
212
+ /**
213
+ * allButLast cp SRC... DEST (GNU -t moves DEST into a flag: every slot is a source)
214
+ * first ln TARGET LINK
215
+ * all gzip -c FILE
216
+ * archive tar/zip/ar/7z: the inputs after the archive slot, in a WRITING mode
217
+ * flagOperand the source is a flag's operand: az ... upload -f SRC / --file SRC
218
+ */
219
+ source: 'allButLast' | 'first' | 'all' | 'archive' | 'flagOperand';
220
+ archive?: 'tar' | 'zip' | 'ar' | '7z';
221
+ /** flagOperand: the flags (short letter or long name) whose operand is the source. */
222
+ sourceFlags?: string[];
223
+ /** GNU `-t DIR` / `--target-directory`: the destination is in a flag. */
224
+ targetDirFlag?: boolean;
225
+ /** Flags whose operand is NEVER a source: a short LETTER ('i') or a long name ('--exclude'). */
226
+ skipFlags?: string[];
227
+ }
228
+ declare const COPY_VERBS: Record<string, CopyShape>;
210
229
  interface FsOpVerdict {
211
230
  ruleName: string;
212
231
  verdict: 'block' | 'review';
@@ -217,6 +236,7 @@ interface FsOpVerdict {
217
236
  declare const BASH_TOOL_NAMES: Set<string>;
218
237
  declare function isBashTool(toolName: string): boolean;
219
238
  declare const AST_FS_REGEX_RULES: Set<string>;
239
+ declare const COMMAND_WRAPPERS: Set<string>;
220
240
  /**
221
241
  * Does `toolName` carry a shell command? True for BASH_TOOL_NAMES spellings and
222
242
  * for any tool whose toolInspection field is `command` (e.g. `terminal.execute`).
@@ -235,6 +255,11 @@ declare function isShellShapedTool(toolName: string, toolInspection?: Record<str
235
255
  * void them. An absent rule scope matches everything (callers' prior semantics).
236
256
  */
237
257
  declare function toolMatchesRule(toolName: string, ruleTool: string | string[] | undefined, toolInspection?: Record<string, string>): boolean;
258
+ /** Strip leading wrappers/runners from a resolved arg list, returning the index
259
+ * of the real command head. Handles `sudo -u www python3`, `env -u FOO python3`,
260
+ * `timeout 5 python3`, `uv run python`, `conda run -n env python`,
261
+ * `chroot /mnt python3`. */
262
+ declare function unwrapCommandHead(words: (string | null)[]): number;
238
263
  /**
239
264
  * AST-aware inline-execution detector. Returns true when the command runs code
240
265
  * supplied on the command line, via stdin, or via a pipe into a bare
@@ -247,6 +272,29 @@ declare function detectInlineExec(command: string): boolean;
247
272
  * the tool-managed cache allow-list. Used to gate `rm -rf` on home paths.
248
273
  */
249
274
  declare function isProtectedHomePath(rawPath: string): boolean;
275
+ /**
276
+ * Extract literal-text positional arguments from a CallExpr. Skips flags
277
+ * (anything starting with `-`) and ParamExp/CmdSubst (dynamic) parts. Returns
278
+ * the resolved string for each arg that is purely literal text.
279
+ */
280
+ /** A resolved, non-flag argument and where it sits. */
281
+ interface PositionedArg {
282
+ /** The resolved literal. */
283
+ value: string;
284
+ /** 0-based SLOT among non-flag words -- `cp SRC DEST`: SRC is 0, DEST is 1. */
285
+ index: number;
286
+ /** Absolute index in the resolved word list, for explainability. */
287
+ argv: number;
288
+ /** The flag immediately before this word (`ssh -i KEY`: '-i'), else null. */
289
+ afterFlag: string | null;
290
+ }
291
+ /**
292
+ * The positioned non-flag words of `words[from..to)`. A dynamic word (null)
293
+ * occupies no slot AND breaks the flag link -- `-v $SRC KEY` gives KEY no flag,
294
+ * because something unknowable sat between them. Its `.map(a => a.value)` is
295
+ * exactly the pre-stage-3 filter, which jail-position.spec.ts pins.
296
+ */
297
+ declare function positionedArgs(words: (string | null)[], from?: number, to?: number): PositionedArg[];
250
298
  interface ShellDestination {
251
299
  /** Extracted hostname, lowercased (e.g. "evil.com", "10.0.0.5"). */
252
300
  host: string;
@@ -255,6 +303,7 @@ interface ShellDestination {
255
303
  /** The raw argument token the host came from (for UI / audit). */
256
304
  raw: string;
257
305
  }
306
+ declare const NET_BINARIES: Set<string>;
258
307
  /**
259
308
  * Parse a destination host out of a single token. Handles scheme URLs
260
309
  * (`https://h/p`), scheme-less curl targets (`evil.com/p`), `user@host:path`
@@ -288,6 +337,12 @@ interface ShellDestToken {
288
337
  */
289
338
  declare function extractShellDestTokens(command: string): ShellDestToken[];
290
339
  declare function analyzeFsOperation(command: string): FsOpVerdict | null;
340
+ /**
341
+ * One representative command per copy verb, for a gate test that DERIVES its
342
+ * rows from COPY_VERBS instead of keeping a second hand list (the trap the
343
+ * prescreen comment above describes). `src` is the path being copied out.
344
+ */
345
+ declare function sampleCopyCommand(verb: string, src: string): string;
291
346
  interface ShellCommandAnalysis {
292
347
  /** First word of every CallExpr — the command names invoked. */
293
348
  actions: string[];
@@ -1196,7 +1251,7 @@ declare const LONG_OUTPUT_THRESHOLD_BYTES: number;
1196
1251
  * and fails CI when the hash drifts without a version bump — forgetting
1197
1252
  * is loud, not silent.
1198
1253
  */
1199
- declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v10";
1254
+ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v14";
1200
1255
  /**
1201
1256
  * SHA-256 prefix of the detector-source files
1202
1257
  * (canonical.ts + pii.ts + destructive-regex.ts).
@@ -1207,7 +1262,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v10";
1207
1262
  * files changed, this hash must change too, and you must consciously
1208
1263
  * decide whether to bump CANONICAL_EXTRACTOR_VERSION."
1209
1264
  */
1210
- declare const CANONICAL_EXTRACTOR_HASH = "c4edee9dc99eb69a";
1265
+ declare const CANONICAL_EXTRACTOR_HASH = "8b5729fe236a195b";
1211
1266
  declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
1212
1267
  declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
1213
1268
  /**
@@ -1327,4 +1382,4 @@ declare function ssrfDestinationFloor(toolName: string, args: unknown, opts?: {
1327
1382
  /** Engine version stamped on audit entries for future drift detection. */
1328
1383
  declare const ENGINE_VERSION = "1.4.0";
1329
1384
 
1330
- export { AST_FS_REGEX_RULES, type AuditEntryForClassify, BASH_TOOL_NAMES, BUILTIN_SHIELDS, type BlastEnvFinding, type BlastFinding, type BlastResult, type BlastSummary, CANARY_MIN_LENGTH, CANONICAL_EXTRACTOR_HASH, CANONICAL_EXTRACTOR_VERSION, COST_PER_LOOP_ITER_USD, type CanaryHit, type CanaryValue, type CanaryView, type CanonicalAgent, type CanonicalFinding, type CanonicalFindingType, type CanonicalSourceType, DEFAULT_EGRESS_ALLOWLIST, DESTINATION_ARGS, DESTRUCTIVE_OP_RE, DLP_PATTERNS, DLP_SCAN_LIMITS, type DlpMatch, ENGINE_VERSION, type EgressPolicy, type EgressVerdict, type ExtractContext, FILE_TOOLS, FLAGS_WITH_VALUES, FS_READ_TOOLS, type FsOpVerdict, type InjectionConfidence, type InjectionContext, type InjectionMatch, LONG_OUTPUT_THRESHOLD_BYTES, LOOP_MAX_RECORDS, LOOP_THRESHOLD_FOR_WASTE, type LoopWindowEvaluation, PRIVILEGE_ESCALATION_RE, type PiiPattern, type PipeChainAnalysis, type PolicyConfig, type PolicyContext, type PolicyHostHooks, type PolicyVerdict, type ProvenanceLookup, type ProvenanceTrust, REALTIME_PII_PATTERNS, type RiskMetadata, SCAN_SIGNAL_WEIGHTS, SENSITIVE_PATH_RE, SENSITIVE_PATH_REGEXES, SSRF_MAX_HOST, type ScanFinding, type ScanSignals, type ScanSummary, type ScoreTier, type SessionExtractContext, type SessionToolCall, type Severity, type ShellCommandAnalysis, type ShellDestToken, type ShellDestination, type ShieldDefinition, type ShieldOverrides, type ShieldVerdict, type SmartCondition, type SmartRule, type SsrfFloorOptions, type SsrfMatch, type SsrfTier, type SsrfVerdict, type ToolCallEntry, type ToolCallRecord, analyzeFsOperation, analyzePipeChain, analyzeShellCommand, checkDangerousSql, classifyAuditEntry, classifyRuleSeverity, classifyScanSignal, classifySsrf, computeAgentDeviceScore, computeArgsHash, computeBlendedSecurityScore, computeScanScore, computeSecurityScore, dedupeCanonicalFindings, detectArgsPii, detectDangerousEval, detectDangerousShellExec, detectInlineExec, detectPii, evaluateEgress, evaluateLoopWindow, evaluatePolicy, evaluateSmartConditions, extractAllSshHosts, extractCanonicalFindings, extractNetworkTargets, extractPositionalArgs, extractSessionLevelFindings, extractShellDestTokens, extractShellDestinations, getCompiledRegex, getNestedValue, hostMatches, isBashTool, isIgnoredTool, isPrivateHost, isProtectedHomePath, isShellShapedTool, isShieldVerdict, isStrictGatedTier, matchCanary, matchCanaryArgs, matchSensitivePath, matchesPattern, narrativeRuleLabel, normalizeCommandForPolicy, normalizeIpLiteral, parseAllSshHostsFromCommand, parseDestHost, previewArgs, redactText, resolvePinned, scanArgs, scanInjection, scanText, sensitivePathMatch, ssrfDestinationFloor, ssrfFloor, ssrfReason, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, validateOverrides, validateRegex, validateShieldDefinition };
1385
+ export { AST_FS_REGEX_RULES, type AuditEntryForClassify, BASH_TOOL_NAMES, BUILTIN_SHIELDS, type BlastEnvFinding, type BlastFinding, type BlastResult, type BlastSummary, CANARY_MIN_LENGTH, CANONICAL_EXTRACTOR_HASH, CANONICAL_EXTRACTOR_VERSION, COMMAND_WRAPPERS, COPY_VERBS, COST_PER_LOOP_ITER_USD, type CanaryHit, type CanaryValue, type CanaryView, type CanonicalAgent, type CanonicalFinding, type CanonicalFindingType, type CanonicalSourceType, DEFAULT_EGRESS_ALLOWLIST, DESTINATION_ARGS, DESTRUCTIVE_OP_RE, DLP_PATTERNS, DLP_SCAN_LIMITS, type DlpMatch, ENGINE_VERSION, type EgressPolicy, type EgressVerdict, type ExtractContext, FILE_TOOLS, FLAGS_WITH_VALUES, FS_READ_TOOLS, type FsOpVerdict, type InjectionConfidence, type InjectionContext, type InjectionMatch, LONG_OUTPUT_THRESHOLD_BYTES, LOOP_MAX_RECORDS, LOOP_THRESHOLD_FOR_WASTE, type LoopWindowEvaluation, NET_BINARIES, PRIVILEGE_ESCALATION_RE, type PiiPattern, type PipeChainAnalysis, type PolicyConfig, type PolicyContext, type PolicyHostHooks, type PolicyVerdict, type PositionedArg, type ProvenanceLookup, type ProvenanceTrust, REALTIME_PII_PATTERNS, type RiskMetadata, SCAN_SIGNAL_WEIGHTS, SENSITIVE_PATH_RE, SENSITIVE_PATH_REGEXES, SSRF_MAX_HOST, type ScanFinding, type ScanSignals, type ScanSummary, type ScoreTier, type SessionExtractContext, type SessionToolCall, type Severity, type ShellCommandAnalysis, type ShellDestToken, type ShellDestination, type ShieldDefinition, type ShieldOverrides, type ShieldVerdict, type SmartCondition, type SmartRule, type SsrfFloorOptions, type SsrfMatch, type SsrfTier, type SsrfVerdict, type ToolCallEntry, type ToolCallRecord, analyzeFsOperation, analyzePipeChain, analyzeShellCommand, checkDangerousSql, classifyAuditEntry, classifyRuleSeverity, classifyScanSignal, classifySsrf, computeAgentDeviceScore, computeArgsHash, computeBlendedSecurityScore, computeScanScore, computeSecurityScore, dedupeCanonicalFindings, detectArgsPii, detectDangerousEval, detectDangerousShellExec, detectInlineExec, detectPii, evaluateEgress, evaluateLoopWindow, evaluatePolicy, evaluateSmartConditions, extractAllSshHosts, extractCanonicalFindings, extractNetworkTargets, extractPositionalArgs, extractSessionLevelFindings, extractShellDestTokens, extractShellDestinations, getCompiledRegex, getNestedValue, hostMatches, isBashTool, isIgnoredTool, isPrivateHost, isProtectedHomePath, isShellShapedTool, isShieldVerdict, isStrictGatedTier, matchCanary, matchCanaryArgs, matchSensitivePath, matchesPattern, narrativeRuleLabel, normalizeCommandForPolicy, normalizeIpLiteral, parseAllSshHostsFromCommand, parseDestHost, positionedArgs, previewArgs, redactText, resolvePinned, sampleCopyCommand, scanArgs, scanInjection, scanText, sensitivePathMatch, ssrfDestinationFloor, ssrfFloor, ssrfReason, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, unwrapCommandHead, validateOverrides, validateRegex, validateShieldDefinition };