@node9/policy-engine 2.14.0 → 2.14.2

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,41 @@ 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
+ interface PatternShape {
211
+ /** Flags MEASURED to consume the next word as a value. */
212
+ takesValue: Set<string>;
213
+ /**
214
+ * Flags MEASURED to consume NOTHING. Needed POSITIVELY, which is the lesson of
215
+ * /code-review round 2: the first cut excused "the first positional whose
216
+ * preceding flag is not known to consume", so an UNLISTED value-taking flag
217
+ * handed its own operand to the excuse. `grep --include-from KEY needle
218
+ * notes.txt` opened KEY under ugrep and read ALLOW. The comment that shipped
219
+ * with round 1 -- "a flag MISSING from the table only leaves a false positive"
220
+ * -- was wrong, and wrong in the unsafe direction.
221
+ *
222
+ * So the flag before a candidate word has THREE states, not two:
223
+ * in noValue -> the next word really is the first positional: excusable
224
+ * in takesValue -> that word is the flag's value: skip it and keep looking
225
+ * UNKNOWN -> excuse NOTHING in this command
226
+ * Unknown is the safe state: it leaves a false positive, never a bypass. That
227
+ * is what makes this table's incompleteness safe, which no flag list can be on
228
+ * its own -- and it has to be, because `grep` is not one program (GNU grep,
229
+ * ugrep, busybox) and the engine cannot know which one will run.
230
+ */
231
+ noValue: Set<string>;
232
+ /** Flags whose operand IS the search pattern. */
233
+ patternFlags: Set<string>;
234
+ /** Flags after which NO positional pattern is expected (pattern from a file,
235
+ * or a listing mode). */
236
+ noPatternFlags: Set<string>;
237
+ }
238
+ /** Exported so the spec DERIVES its control rows from the table rather than
239
+ * hand-writing them: a flag added here gains a row for free. */
240
+ declare const PATTERN_VERB_NAMES: string[];
241
+ declare const patternShapeOf: (verb: string) => PatternShape | undefined;
242
+ /** JAIL-10's table, exported for the same reason: the spec derives the split
243
+ * between "operand is a FILE the verb opens" and "operand is an argument". */
244
+ declare const fileOperandFlagsOf: (verb: string) => Set<string> | undefined;
210
245
  /** How a copy verb's arguments are read. */
211
246
  interface CopyShape {
212
247
  /**
@@ -224,6 +259,15 @@ interface CopyShape {
224
259
  targetDirFlag?: boolean;
225
260
  /** Flags whose operand is NEVER a source: a short LETTER ('i') or a long name ('--exclude'). */
226
261
  skipFlags?: string[];
262
+ /**
263
+ * Short LETTERS this verb's getopt treats as taking an argument. Needed to read
264
+ * a bundle the way getopt does: the FIRST such letter swallows the rest of the
265
+ * token, so `-St` is `-S t` (suffix "t") and NOT `--target-directory`.
266
+ * /code-review round 7 measured the cost of guessing: `cp -St ~/.ssh/id_rsa
267
+ * /tmp/stolen` copies the key on real coreutils 9.4 and produced no finding,
268
+ * because a `t` anywhere in the bundle was read as the target-directory flag.
269
+ */
270
+ valueLetters?: string[];
227
271
  }
228
272
  declare const COPY_VERBS: Record<string, CopyShape>;
229
273
  interface FsOpVerdict {
@@ -603,6 +647,27 @@ declare function validateRegex(pattern: string): string | null;
603
647
  */
604
648
  declare function getCompiledRegex(pattern: string, flags?: string): RegExp | null;
605
649
 
650
+ /** See TERMINAL_ESCAPE_RE. Keeps tab, newline and carriage return. */
651
+ declare function stripTerminalEscapes(s: string): string;
652
+ /** See CONTROL_CHAR_RE. Removes every C0 control and DEL, whitespace included. */
653
+ declare function stripControlChars(s: string): string;
654
+ /**
655
+ * One safe line, for any string that came from outside this process before it
656
+ * reaches a terminal or a log file.
657
+ *
658
+ * node9's terminal output IS the user's trust signal: a "connected and
659
+ * governed" line is what tells someone the machine is protected. A response
660
+ * field carrying CR plus SGR codes can paint a line that looks exactly like
661
+ * one of ours, and a newline in a value written to hook-debug.log forges a
662
+ * second journal entry. So: escape sequences removed, all whitespace collapsed
663
+ * to single spaces (one value can never become two lines), and a length cap so
664
+ * a hostile or broken peer cannot flood the log.
665
+ *
666
+ * Accepts unknown because most call sites hold a caught `error` or an optional
667
+ * response field.
668
+ */
669
+ declare function safeMessage(value: unknown, max?: number): string;
670
+
606
671
  interface ShieldDefinition {
607
672
  name: string;
608
673
  description: string;
@@ -1014,6 +1079,11 @@ interface BlastSummary {
1014
1079
  /** Number of env vars flagged as credentials. No keys included. */
1015
1080
  envExposureCount: number;
1016
1081
  }
1082
+ /**
1083
+ * Longest path `truncateBlastPath` will look at, tail-anchored. PATH_MAX is
1084
+ * 4096 on Linux, so anything past this is not a path we could have read.
1085
+ */
1086
+ declare const MAX_BLAST_PATH = 4096;
1017
1087
  /**
1018
1088
  * Sanitise a sensitive path for transmission. Keeps only the trailing 2
1019
1089
  * segments — enough to identify the kind of file ("~/.aws/credentials"
@@ -1251,7 +1321,7 @@ declare const LONG_OUTPUT_THRESHOLD_BYTES: number;
1251
1321
  * and fails CI when the hash drifts without a version bump — forgetting
1252
1322
  * is loud, not silent.
1253
1323
  */
1254
- declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v14";
1324
+ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v15";
1255
1325
  /**
1256
1326
  * SHA-256 prefix of the detector-source files
1257
1327
  * (canonical.ts + pii.ts + destructive-regex.ts).
@@ -1262,7 +1332,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v14";
1262
1332
  * files changed, this hash must change too, and you must consciously
1263
1333
  * decide whether to bump CANONICAL_EXTRACTOR_VERSION."
1264
1334
  */
1265
- declare const CANONICAL_EXTRACTOR_HASH = "8b5729fe236a195b";
1335
+ declare const CANONICAL_EXTRACTOR_HASH = "2823cd6a54a1fca7";
1266
1336
  declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
1267
1337
  declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
1268
1338
  /**
@@ -1382,4 +1452,4 @@ declare function ssrfDestinationFloor(toolName: string, args: unknown, opts?: {
1382
1452
  /** Engine version stamped on audit entries for future drift detection. */
1383
1453
  declare const ENGINE_VERSION = "1.4.0";
1384
1454
 
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 };
1455
+ 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, MAX_BLAST_PATH, NET_BINARIES, PATTERN_VERB_NAMES, 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, fileOperandFlagsOf, getCompiledRegex, getNestedValue, hostMatches, isBashTool, isIgnoredTool, isPrivateHost, isProtectedHomePath, isShellShapedTool, isShieldVerdict, isStrictGatedTier, matchCanary, matchCanaryArgs, matchSensitivePath, matchesPattern, narrativeRuleLabel, normalizeCommandForPolicy, normalizeIpLiteral, parseAllSshHostsFromCommand, parseDestHost, patternShapeOf, positionedArgs, previewArgs, redactText, resolvePinned, safeMessage, sampleCopyCommand, scanArgs, scanInjection, scanText, sensitivePathMatch, ssrfDestinationFloor, ssrfFloor, ssrfReason, stripControlChars, stripTerminalEscapes, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, unwrapCommandHead, validateOverrides, validateRegex, validateShieldDefinition };
package/dist/index.d.ts CHANGED
@@ -207,6 +207,41 @@ 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
+ interface PatternShape {
211
+ /** Flags MEASURED to consume the next word as a value. */
212
+ takesValue: Set<string>;
213
+ /**
214
+ * Flags MEASURED to consume NOTHING. Needed POSITIVELY, which is the lesson of
215
+ * /code-review round 2: the first cut excused "the first positional whose
216
+ * preceding flag is not known to consume", so an UNLISTED value-taking flag
217
+ * handed its own operand to the excuse. `grep --include-from KEY needle
218
+ * notes.txt` opened KEY under ugrep and read ALLOW. The comment that shipped
219
+ * with round 1 -- "a flag MISSING from the table only leaves a false positive"
220
+ * -- was wrong, and wrong in the unsafe direction.
221
+ *
222
+ * So the flag before a candidate word has THREE states, not two:
223
+ * in noValue -> the next word really is the first positional: excusable
224
+ * in takesValue -> that word is the flag's value: skip it and keep looking
225
+ * UNKNOWN -> excuse NOTHING in this command
226
+ * Unknown is the safe state: it leaves a false positive, never a bypass. That
227
+ * is what makes this table's incompleteness safe, which no flag list can be on
228
+ * its own -- and it has to be, because `grep` is not one program (GNU grep,
229
+ * ugrep, busybox) and the engine cannot know which one will run.
230
+ */
231
+ noValue: Set<string>;
232
+ /** Flags whose operand IS the search pattern. */
233
+ patternFlags: Set<string>;
234
+ /** Flags after which NO positional pattern is expected (pattern from a file,
235
+ * or a listing mode). */
236
+ noPatternFlags: Set<string>;
237
+ }
238
+ /** Exported so the spec DERIVES its control rows from the table rather than
239
+ * hand-writing them: a flag added here gains a row for free. */
240
+ declare const PATTERN_VERB_NAMES: string[];
241
+ declare const patternShapeOf: (verb: string) => PatternShape | undefined;
242
+ /** JAIL-10's table, exported for the same reason: the spec derives the split
243
+ * between "operand is a FILE the verb opens" and "operand is an argument". */
244
+ declare const fileOperandFlagsOf: (verb: string) => Set<string> | undefined;
210
245
  /** How a copy verb's arguments are read. */
211
246
  interface CopyShape {
212
247
  /**
@@ -224,6 +259,15 @@ interface CopyShape {
224
259
  targetDirFlag?: boolean;
225
260
  /** Flags whose operand is NEVER a source: a short LETTER ('i') or a long name ('--exclude'). */
226
261
  skipFlags?: string[];
262
+ /**
263
+ * Short LETTERS this verb's getopt treats as taking an argument. Needed to read
264
+ * a bundle the way getopt does: the FIRST such letter swallows the rest of the
265
+ * token, so `-St` is `-S t` (suffix "t") and NOT `--target-directory`.
266
+ * /code-review round 7 measured the cost of guessing: `cp -St ~/.ssh/id_rsa
267
+ * /tmp/stolen` copies the key on real coreutils 9.4 and produced no finding,
268
+ * because a `t` anywhere in the bundle was read as the target-directory flag.
269
+ */
270
+ valueLetters?: string[];
227
271
  }
228
272
  declare const COPY_VERBS: Record<string, CopyShape>;
229
273
  interface FsOpVerdict {
@@ -603,6 +647,27 @@ declare function validateRegex(pattern: string): string | null;
603
647
  */
604
648
  declare function getCompiledRegex(pattern: string, flags?: string): RegExp | null;
605
649
 
650
+ /** See TERMINAL_ESCAPE_RE. Keeps tab, newline and carriage return. */
651
+ declare function stripTerminalEscapes(s: string): string;
652
+ /** See CONTROL_CHAR_RE. Removes every C0 control and DEL, whitespace included. */
653
+ declare function stripControlChars(s: string): string;
654
+ /**
655
+ * One safe line, for any string that came from outside this process before it
656
+ * reaches a terminal or a log file.
657
+ *
658
+ * node9's terminal output IS the user's trust signal: a "connected and
659
+ * governed" line is what tells someone the machine is protected. A response
660
+ * field carrying CR plus SGR codes can paint a line that looks exactly like
661
+ * one of ours, and a newline in a value written to hook-debug.log forges a
662
+ * second journal entry. So: escape sequences removed, all whitespace collapsed
663
+ * to single spaces (one value can never become two lines), and a length cap so
664
+ * a hostile or broken peer cannot flood the log.
665
+ *
666
+ * Accepts unknown because most call sites hold a caught `error` or an optional
667
+ * response field.
668
+ */
669
+ declare function safeMessage(value: unknown, max?: number): string;
670
+
606
671
  interface ShieldDefinition {
607
672
  name: string;
608
673
  description: string;
@@ -1014,6 +1079,11 @@ interface BlastSummary {
1014
1079
  /** Number of env vars flagged as credentials. No keys included. */
1015
1080
  envExposureCount: number;
1016
1081
  }
1082
+ /**
1083
+ * Longest path `truncateBlastPath` will look at, tail-anchored. PATH_MAX is
1084
+ * 4096 on Linux, so anything past this is not a path we could have read.
1085
+ */
1086
+ declare const MAX_BLAST_PATH = 4096;
1017
1087
  /**
1018
1088
  * Sanitise a sensitive path for transmission. Keeps only the trailing 2
1019
1089
  * segments — enough to identify the kind of file ("~/.aws/credentials"
@@ -1251,7 +1321,7 @@ declare const LONG_OUTPUT_THRESHOLD_BYTES: number;
1251
1321
  * and fails CI when the hash drifts without a version bump — forgetting
1252
1322
  * is loud, not silent.
1253
1323
  */
1254
- declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v14";
1324
+ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v15";
1255
1325
  /**
1256
1326
  * SHA-256 prefix of the detector-source files
1257
1327
  * (canonical.ts + pii.ts + destructive-regex.ts).
@@ -1262,7 +1332,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v14";
1262
1332
  * files changed, this hash must change too, and you must consciously
1263
1333
  * decide whether to bump CANONICAL_EXTRACTOR_VERSION."
1264
1334
  */
1265
- declare const CANONICAL_EXTRACTOR_HASH = "8b5729fe236a195b";
1335
+ declare const CANONICAL_EXTRACTOR_HASH = "2823cd6a54a1fca7";
1266
1336
  declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
1267
1337
  declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
1268
1338
  /**
@@ -1382,4 +1452,4 @@ declare function ssrfDestinationFloor(toolName: string, args: unknown, opts?: {
1382
1452
  /** Engine version stamped on audit entries for future drift detection. */
1383
1453
  declare const ENGINE_VERSION = "1.4.0";
1384
1454
 
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 };
1455
+ 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, MAX_BLAST_PATH, NET_BINARIES, PATTERN_VERB_NAMES, 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, fileOperandFlagsOf, getCompiledRegex, getNestedValue, hostMatches, isBashTool, isIgnoredTool, isPrivateHost, isProtectedHomePath, isShellShapedTool, isShieldVerdict, isStrictGatedTier, matchCanary, matchCanaryArgs, matchSensitivePath, matchesPattern, narrativeRuleLabel, normalizeCommandForPolicy, normalizeIpLiteral, parseAllSshHostsFromCommand, parseDestHost, patternShapeOf, positionedArgs, previewArgs, redactText, resolvePinned, safeMessage, sampleCopyCommand, scanArgs, scanInjection, scanText, sensitivePathMatch, ssrfDestinationFloor, ssrfFloor, ssrfReason, stripControlChars, stripTerminalEscapes, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, unwrapCommandHead, validateOverrides, validateRegex, validateShieldDefinition };