@node9/policy-engine 2.42.0 → 2.43.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.
package/dist/index.d.mts CHANGED
@@ -17,7 +17,9 @@ interface SmartCondition {
17
17
  * Which reading of a `command` field the regex ops test. Absent: the whole
18
18
  * command text. 'access': the command as a file-access rule sees it, without
19
19
  * a script's interpreter line and with the program each command runs cut to
20
- * its name (fileAccessView). Set by the jail's path rules (fw#385).
20
+ * its name (fileAccessView), and with the code body of a stdin interpreter
21
+ * kept (node9Firewall#414). Set by the jail's path rules (fw#385) and the
22
+ * project-jail shield's bash rules.
21
23
  */
22
24
  reading?: 'access';
23
25
  }
@@ -129,6 +131,70 @@ interface RiskMetadata {
129
131
  exposureDestinations?: string[];
130
132
  }
131
133
 
134
+ declare const SYSTEM_AUTH_FILES: readonly ["/etc/passwd", "/etc/shadow", "/etc/group", "/etc/gshadow", "/etc/sudoers"];
135
+ declare const SYSTEM_AUTH_DIRS: readonly ["/etc/security", "/etc/pam.d", "/etc/sudoers.d"];
136
+ declare const STARTUP_NAMES: readonly [".bashrc", ".zshrc", ".profile", ".bash_profile"];
137
+ /**
138
+ * Files inside a project that run code or instruct the agent (fw#318 P4,
139
+ * design 6). A write there after the session read outside content is held:
140
+ * it is how an injected instruction persists past the session. Relative to
141
+ * the project root; a directory entry covers everything under it.
142
+ */
143
+ declare const AGENT_INSTRUCTION_FILES: readonly [".gitlab-ci.yml", "CLAUDE.md", "AGENTS.md", ".cursorrules", ".mcp.json", ".vscode/settings.json", "package.json"];
144
+ declare const AGENT_INSTRUCTION_DIRS: readonly [".github/workflows", ".claude", ".cursor", ".git/hooks", ".husky"];
145
+ /** Is `absPath` one of the agent-instruction files of the project at `root`? */
146
+ declare function isAgentInstructionPath(absPath: string, root: string): boolean;
147
+ /** `isInside(root, p)`: `p` is `root` or below it, lexically. */
148
+ declare function isInside(root: string, p: string): boolean;
149
+ declare function isPasswordHashPath(p: string): boolean;
150
+ /** Compatibility only: old callers do not tell DLP whether they read or write. */
151
+ declare function isLegacySystemPath(p: string): boolean;
152
+ /** Pure lexical normalization; host physical resolution keeps the original path. */
153
+ declare function normalizeFilePath(p: string, cwd?: string, home?: string): string;
154
+ interface FileAccess {
155
+ operation: 'read' | 'write' | 'remove' | 'create';
156
+ path: string;
157
+ cwd?: string;
158
+ /** A read whose content leaves the machine as a request body or an upload. */
159
+ upload?: true;
160
+ /** A directory listing (`ls`, `tree`, find's start points): the entry names, not a file's content. */
161
+ listing?: true;
162
+ /** Unquoted shell pattern. Quoted metacharacters are escaped in this value. */
163
+ glob?: string;
164
+ /** The pattern is find's, not the shell's: `*` also selects dotfiles. */
165
+ dotGlob?: boolean;
166
+ followFinal: boolean;
167
+ recursive?: boolean;
168
+ /** A write that adds to the file (`>>`, `tee -a`): its content stays. */
169
+ append?: true;
170
+ /** This basename-joined candidate applies only if this operand is a directory. */
171
+ directoryTarget?: string;
172
+ candidates?: string[];
173
+ resolution?: 'resolved' | 'missing' | 'failed' | 'lexical';
174
+ }
175
+ interface FileAccessContext {
176
+ cwd?: string;
177
+ homeDirs?: string[];
178
+ accesses?: FileAccess[];
179
+ }
180
+
181
+ interface DerivedWrite {
182
+ /** The file read, as the command spells it. */
183
+ source: string;
184
+ /** The file written from it, as the command spells it. */
185
+ target: string;
186
+ /** The source is gone after the command (`mv`): its record moves rather than copies. */
187
+ move: boolean;
188
+ }
189
+ /** The text of each pipeline of the command: one `cmd | cmd` chain, or one simple command. */
190
+ declare function pipelineTexts(command: string): string[];
191
+ /**
192
+ * The (source, target) pairs of a command: every write of a pipeline is
193
+ * derived from every read of the same pipeline. A listing (`ls`) and an
194
+ * upload (`curl -F file=@K`) are not sources: nothing is written from them.
195
+ */
196
+ declare function derivedWrites(command: string, context?: FileAccessContext): DerivedWrite[];
197
+
132
198
  type ToolInspectionEntry = string | {
133
199
  kind: 'shell';
134
200
  field: string;
@@ -410,53 +476,6 @@ declare function checkValue(settings: CatalogSettings, id: string): Verdict;
410
476
  * stores this on its config so every reader sees the same answers. */
411
477
  declare function resolveCheckMap(settings: CatalogSettings): Record<string, Verdict>;
412
478
 
413
- declare const SYSTEM_AUTH_FILES: readonly ["/etc/passwd", "/etc/shadow", "/etc/group", "/etc/gshadow", "/etc/sudoers"];
414
- declare const SYSTEM_AUTH_DIRS: readonly ["/etc/security", "/etc/pam.d", "/etc/sudoers.d"];
415
- declare const STARTUP_NAMES: readonly [".bashrc", ".zshrc", ".profile", ".bash_profile"];
416
- /**
417
- * Files inside a project that run code or instruct the agent (fw#318 P4,
418
- * design 6). A write there after the session read outside content is held:
419
- * it is how an injected instruction persists past the session. Relative to
420
- * the project root; a directory entry covers everything under it.
421
- */
422
- declare const AGENT_INSTRUCTION_FILES: readonly [".gitlab-ci.yml", "CLAUDE.md", "AGENTS.md", ".cursorrules", ".mcp.json", ".vscode/settings.json", "package.json"];
423
- declare const AGENT_INSTRUCTION_DIRS: readonly [".github/workflows", ".claude", ".cursor", ".git/hooks", ".husky"];
424
- /** Is `absPath` one of the agent-instruction files of the project at `root`? */
425
- declare function isAgentInstructionPath(absPath: string, root: string): boolean;
426
- /** `isInside(root, p)`: `p` is `root` or below it, lexically. */
427
- declare function isInside(root: string, p: string): boolean;
428
- declare function isPasswordHashPath(p: string): boolean;
429
- /** Compatibility only: old callers do not tell DLP whether they read or write. */
430
- declare function isLegacySystemPath(p: string): boolean;
431
- /** Pure lexical normalization; host physical resolution keeps the original path. */
432
- declare function normalizeFilePath(p: string, cwd?: string, home?: string): string;
433
- interface FileAccess {
434
- operation: 'read' | 'write' | 'remove' | 'create';
435
- path: string;
436
- cwd?: string;
437
- /** A read whose content leaves the machine as a request body or an upload. */
438
- upload?: true;
439
- /** A directory listing (`ls`, `tree`, find's start points): the entry names, not a file's content. */
440
- listing?: true;
441
- /** Unquoted shell pattern. Quoted metacharacters are escaped in this value. */
442
- glob?: string;
443
- /** The pattern is find's, not the shell's: `*` also selects dotfiles. */
444
- dotGlob?: boolean;
445
- followFinal: boolean;
446
- recursive?: boolean;
447
- /** A write that adds to the file (`>>`, `tee -a`): its content stays. */
448
- append?: true;
449
- /** This basename-joined candidate applies only if this operand is a directory. */
450
- directoryTarget?: string;
451
- candidates?: string[];
452
- resolution?: 'resolved' | 'missing' | 'failed' | 'lexical';
453
- }
454
- interface FileAccessContext {
455
- cwd?: string;
456
- homeDirs?: string[];
457
- accesses?: FileAccess[];
458
- }
459
-
460
479
  type InlineCodeCategory = 'deletes' | 'writes-outside' | 'sends' | 'listens' | 'runs-commands' | 'reads-protected' | 'builds-code' | 'permissions' | 'monitors' | 'amplifies';
461
480
 
462
481
  /**
@@ -893,6 +912,14 @@ interface PolicyHostHooks {
893
912
  /** The agent settings file at `absPath` as it is on disk now (a regular
894
913
  * file within the host's size cap), or null (node9Firewall#413 part 4). */
895
914
  readAgentSettings?: (absPath: string) => string | null;
915
+ /** True when the user's own npm, yarn, bun, pip or uv configuration names
916
+ * this registry host (node9Firewall#415 item 4). Absent: only the public
917
+ * registries and the machine itself count as configured. */
918
+ isConfiguredRegistry?: (host: string, cwd?: string) => boolean;
919
+ /** True when `dir` (relative to `cwd`) is the top of a git work tree: it
920
+ * holds a `.git` entry. Decides `git -C <dir> add .` (node9Firewall#413).
921
+ * Absent, or no cwd: the stage-all finding stands. */
922
+ isGitWorkTreeTop?: (dir: string, cwd: string) => boolean;
896
923
  }
897
924
  interface PolicyVerdict {
898
925
  decision: 'allow' | 'review' | 'block';
@@ -1133,6 +1160,15 @@ interface GitFinding {
1133
1160
  description: string;
1134
1161
  /** The invocation as resolved, for the reason and the explain trace. */
1135
1162
  shown: string;
1163
+ /**
1164
+ * A stage-all finding that holds only if this directory (as written after
1165
+ * `-C`, relative to where the command runs) is the top of a work tree:
1166
+ * `git -C sub add .` stages `sub` alone, `git -C myapp add .` run from the
1167
+ * folder above the repository stages all of it. The command cannot tell
1168
+ * them apart; a host that knows the working directory asks the disk, and
1169
+ * without an answer the finding stands (node9Firewall#413).
1170
+ */
1171
+ ifWorkTreeTop?: string;
1136
1172
  }
1137
1173
  interface GitAnalysis {
1138
1174
  /** False when mvdan-sh could not parse the command: nothing was judged. */
@@ -1151,6 +1187,8 @@ interface GitInvocation {
1151
1187
  env: Map<string, string | null>;
1152
1188
  /** How the call was written, for the reason. */
1153
1189
  shown: string;
1190
+ /** Each `-C <path>` given before the subcommand, in order; null marks a dynamic word. */
1191
+ chdir?: (string | null)[];
1154
1192
  }
1155
1193
  /**
1156
1194
  * Every git finding in a shell command. Cached by the raw text; pure.
@@ -1159,6 +1197,41 @@ declare function analyzeGit(command: string): GitAnalysis;
1159
1197
  /** The git invocations a command makes, resolved. Exposed for the explain trace and tests. */
1160
1198
  declare function gitInvocations(command: string): GitInvocation[];
1161
1199
 
1200
+ type OutboundCheckId = 'commands.reverse-shell' | 'data.env-exfil';
1201
+ interface OutboundFinding {
1202
+ checkId: OutboundCheckId;
1203
+ /** The rule name the audit log and the catalog's legacy table know. */
1204
+ ruleName: 'block-reverse-shell' | 'review-env-exfil';
1205
+ reason: string;
1206
+ description: string;
1207
+ /** data.env-exfil only: the hosts the environment is sent to, or null when
1208
+ * one sender's destination cannot be read (a dynamic or dotless host, a
1209
+ * sender whose destination argument is unknown). A trusted-host exemption
1210
+ * needs every one of them. */
1211
+ destinations?: string[] | null;
1212
+ }
1213
+ interface OutboundAnalysis {
1214
+ /** False when mvdan-sh could not parse the command: nothing was judged. */
1215
+ parsed: boolean;
1216
+ findings: OutboundFinding[];
1217
+ }
1218
+ declare function analyzeOutbound(command: string): OutboundAnalysis;
1219
+
1220
+ interface RegistryOverride {
1221
+ /** The front-end: npm, pnpm, yarn, bun, npx, pip, uv, pipx, pipenv. */
1222
+ manager: string;
1223
+ /** The flag or variable that named it, for the reason. */
1224
+ via: string;
1225
+ /** The URL as written. */
1226
+ url: string;
1227
+ /** Its host, lowercased, without the port. */
1228
+ host: string;
1229
+ }
1230
+ declare function isPublicRegistryHost(host: string): boolean;
1231
+ /** The host of an http(s) URL, or null. A `name=url` uv index keeps its URL. */
1232
+ declare function registryHost(value: string): string | null;
1233
+ declare function extractRegistryOverrides(command: string): RegistryOverride[];
1234
+
1162
1235
  /**
1163
1236
  * The OSV ecosystem name, verbatim: it is the index directory, the bucket path
1164
1237
  * of the OSV archive and the `ecosystem` of the online query at once. `VSCode`
@@ -1651,7 +1724,7 @@ declare function validateOverrides(raw: unknown): {
1651
1724
  */
1652
1725
  declare const BUILTIN_SHIELDS: Record<string, ShieldDefinition>;
1653
1726
 
1654
- type ActionTemplateName = 'finance' | 'identity' | 'publishing';
1727
+ type ActionTemplateName = 'finance' | 'identity' | 'publishing' | 'settings' | 'branches';
1655
1728
  declare const ACTION_TEMPLATES: Readonly<Record<ActionTemplateName, readonly SmartRule[]>>;
1656
1729
  /** The general check each template feeds, and the word its rules carry. */
1657
1730
  declare const ACTION_CHECKS: Readonly<Record<ActionTemplateName, {
@@ -2132,7 +2205,7 @@ type PiiPattern = 'Email' | 'SSN' | 'Phone' | 'Credit Card' | 'IBAN' | 'Bank Rou
2132
2205
  * Detect PII patterns in a string. Returns a deduplicated list — one entry
2133
2206
  * per distinct pattern type, never multiple "Email" findings from one input.
2134
2207
  */
2135
- declare function detectPii(text: string): PiiPattern[];
2208
+ declare function detectPii(text: string, labelContext?: string): PiiPattern[];
2136
2209
  declare const REALTIME_PII_PATTERNS: readonly PiiPattern[];
2137
2210
  /** Every string leaf of a tool call's arguments, joined by newlines, bounded. */
2138
2211
  declare function argumentLeavesText(args: unknown, limit?: number): string;
@@ -2315,7 +2388,7 @@ declare const LONG_OUTPUT_THRESHOLD_BYTES: number;
2315
2388
  * and fails CI when the hash drifts without a version bump — forgetting
2316
2389
  * is loud, not silent.
2317
2390
  */
2318
- declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v32";
2391
+ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v35";
2319
2392
  /**
2320
2393
  * SHA-256 prefix of the detector-source files
2321
2394
  * (canonical.ts + pii.ts + destructive-regex.ts).
@@ -2326,7 +2399,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v32";
2326
2399
  * files changed, this hash must change too, and you must consciously
2327
2400
  * decide whether to bump CANONICAL_EXTRACTOR_VERSION."
2328
2401
  */
2329
- declare const CANONICAL_EXTRACTOR_HASH = "bf14326b92bf1718";
2402
+ declare const CANONICAL_EXTRACTOR_HASH = "3b56e19906016767";
2330
2403
  declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
2331
2404
  declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
2332
2405
  /**
@@ -2438,5 +2511,5 @@ declare function scanArgumentSecrets(args: unknown): DlpMatch | null;
2438
2511
  /** Engine version stamped on audit entries for future drift detection. */
2439
2512
  declare const ENGINE_VERSION = "1.4.0";
2440
2513
 
2441
- export { ACTION_CHECKS, ACTION_TEMPLATES, AGENT_INSTRUCTION_DIRS, AGENT_INSTRUCTION_FILES, APP_SERVER_GLOB, APP_SHIELD_NAMES, APP_SHIELD_SPECS, ARGUMENT_SCAN_LIMITS, AST_FS_REGEX_RULES, BASH_TOOL_NAMES, BUILTIN_DANGEROUS_WORDS, BUILTIN_SHIELDS, CANARY_MIN_LENGTH, CANONICAL_EXTRACTOR_HASH, CANONICAL_EXTRACTOR_VERSION, CHECKS, CHECK_BY_ID, CHECK_GROUPS, CHECK_TEXT, CHECK_VERDICT_RANK, COMMAND_WRAPPERS, CONFIGURABLE_CHECK_IDS, COPY_VERBS, COST_PER_LOOP_ITER_USD, DEFAULT_EGRESS_ALLOWLIST, DESTINATION_ARGS, DESTRUCTIVE_OP_RE, DLP_PATTERNS, DLP_SCAN_LIMITS, ENGINE_VERSION, FILE_TOOLS, FLAGS_WITH_VALUES, FS_READ_TOOLS, GENERAL_ACTION_RULES, KNOB_GOVERNED, LEVELS, LONG_OUTPUT_THRESHOLD_BYTES, LOOP_MAX_RECORDS, LOOP_THRESHOLD_FOR_WASTE, MAP_GOVERNED, MAX_BLAST_PATH, MAX_DESTINATIONS, MODE_VALUES, NET_BINARIES, PATTERN_VERB_NAMES, PRIVILEGE_ESCALATION_RE, REALTIME_PII_PATTERNS, REPLACED_SHIELDS, SCAN_SIGNAL_WEIGHTS, SENSITIVE_PATH_RE, SENSITIVE_PATH_REGEXES, SSRF_MAX_HOST, STARTUP_NAMES, SYSTEM_AUTH_DIRS, SYSTEM_AUTH_FILES, TUNING_FIELDS, VERDICTS, agentFileKind, analyzeFsOperation, analyzeGit, analyzePipeChain, analyzeShellCommand, argumentLeavesText, catalogSettingsFromConfig, checkDangerousSql, checkIdForCheckedBy, checkIdForRule, checkToLegacyPolicy, checkValue, checksFromLegacyPolicy, classifyAuditEntry, classifyRuleSeverity, classifyScanSignal, classifyShellExposure, classifySsrf, collectFileAccesses, computeAgentDeviceScore, computeArgsHash, computeBlendedSecurityScore, computeScanScore, computeSecurityScore, configurableValues, decodeEmbeddedBase64, decodeEmbeddedHex, dedupeCanonicalFindings, destinationDomain, destinationKind, destinationValue, detectArgsPii, detectDangerousEval, detectDangerousShellExec, detectInlineExec, detectPii, entryDisplay, evaluateEgress, evaluateLoopWindow, evaluatePolicy, evaluateProtectedFileAccess, evaluateSmartConditions, extractAllSshHosts, extractArgDestinations, extractCanonicalFindings, extractContentDestinations, extractNetworkTargets, extractPackageInstalls, extractPositionalArgs, extractSessionLevelFindings, extractShellDestTokens, extractShellDestinations, extractToolDestinations, fileAccessView, fileOperandFlagsOf, fileToolOperation, foldHomoglyphs, getCheck, getCompiledRegex, getNestedValue, gitInvocations, gitRepoPath, hashDestination, hostMatches, incompleteFileVerdict, inlineExecDescription, inlineExecReason, inlineExecReview, inspectArgumentSecrets, inspectionEntry, inspectionLayers, isAgentInstructionPath, isBashTool, isBlockAll, isDestructiveToolName, isHashedEntry, isIgnoredTool, isInside, isKnobGoverned, isLegacySystemPath, isLockedCheck, isLoopbackHost, isMaskedKind, isModeValue, isPasswordHashPath, isPrivateHost, isProtectedHomePath, isRecordOnly, isShellShapedTool, isShieldVerdict, isStrictGatedTier, isVerdict, knobStatedChecks, levelCheckValue, levelChecks, levelOf, levelPackageSignals, maskDestination, maskPersonalData, maskPersonalValue, matchCanary, matchCanaryArgs, matchSensitivePath, matchesPattern, matchesTrustedEntry, matchesTrustedList, mcpServerFromToolName, narrativeRuleLabel, normalizeCommandForPolicy, normalizeDestination, normalizeFilePath, normalizeForScan, normalizeIpLiteral, normalizePyPiName, normalizeRecipient, normalizeTrustedEntry, parseAllSshHostsFromCommand, parseDestHost, patternShapeOf, positionedArgs, previewArgs, redactText, resolveAllChecks, resolveCheck, resolveCheckMap, resolvePinned, resolveShellInput, reviewsEveryInline, ruleServerMatches, safeMessage, sampleCopyCommand, scanArgs, scanArgumentSecrets, scanInjection, scanInstructionWrite, scanText, scanViews, sensitivePathMatch, shellRuleArgs, shellScriptOperands, ssrfCheckId, ssrfDestinationFloor, ssrfExemptMatches, ssrfFloor, ssrfReason, stripControlChars, stripInvisible, stripTerminalEscapes, suggestFromApprovals, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, trustedEntryOf, tuningFromLegacyPolicy, tuningToLegacyPolicy, unwrapCommandHead, unwrapRuleLabel, validateOverrides, validateRegex, validateShieldDefinition };
2442
- export type { ActionTemplateName, AgentFileKind, ApprovalRow, ArgumentInspectionResult, AuditEntryForClassify, BlastEnvFinding, BlastFinding, BlastResult, BlastSummary, CanaryHit, CanaryValue, CanaryView, CanonicalAgent, CanonicalFinding, CanonicalFindingType, CanonicalSourceType, CatalogSettings, CheckDef, CheckGroup, CheckSource, CheckText, Destination, DestinationKind, DlpMatch, EgressPolicy, EgressVerdict, ExtractContext, FileAccess, FileAccessContext, FsOpVerdict, GitAnalysis, GitFinding, GitInvocation, InjectionConfidence, InjectionContext, InjectionMatch, InlineExecReview, InspectionInput, InspectionLayers, LegacyPolicyKnobs, Level, LoopWindowEvaluation, ModeValue, PackageEcosystem, PackageInstallRequest, PiiPattern, PipeChainAnalysis, PolicyConfig, PolicyContext, PolicyHostHooks, PolicyVerdict, PositionedArg, ProtectedFileVerdict, ProvenanceLookup, ProvenanceTrust, ResolvedCheck, RiskMetadata, ScanFinding, ScanSignals, ScanSummary, ScanView, ScoreTier, SessionExtractContext, SessionToolCall, Severity, ShellCommandAnalysis, ShellDestToken, ShellDestination, ShellExposure, ShellInputResolution, ShieldDefinition, ShieldOverrides, ShieldVerdict, SmartCondition, SmartRule, SsrfFloorOptions, SsrfMatch, SsrfTier, SsrfVerdict, SuggestOptions, Suggestion, ToolCallEntry, ToolCallRecord, ToolInspection, ToolInspectionEntry, TuningField, Verdict };
2514
+ export { ACTION_CHECKS, ACTION_TEMPLATES, AGENT_INSTRUCTION_DIRS, AGENT_INSTRUCTION_FILES, APP_SERVER_GLOB, APP_SHIELD_NAMES, APP_SHIELD_SPECS, ARGUMENT_SCAN_LIMITS, AST_FS_REGEX_RULES, BASH_TOOL_NAMES, BUILTIN_DANGEROUS_WORDS, BUILTIN_SHIELDS, CANARY_MIN_LENGTH, CANONICAL_EXTRACTOR_HASH, CANONICAL_EXTRACTOR_VERSION, CHECKS, CHECK_BY_ID, CHECK_GROUPS, CHECK_TEXT, CHECK_VERDICT_RANK, COMMAND_WRAPPERS, CONFIGURABLE_CHECK_IDS, COPY_VERBS, COST_PER_LOOP_ITER_USD, DEFAULT_EGRESS_ALLOWLIST, DESTINATION_ARGS, DESTRUCTIVE_OP_RE, DLP_PATTERNS, DLP_SCAN_LIMITS, ENGINE_VERSION, FILE_TOOLS, FLAGS_WITH_VALUES, FS_READ_TOOLS, GENERAL_ACTION_RULES, KNOB_GOVERNED, LEVELS, LONG_OUTPUT_THRESHOLD_BYTES, LOOP_MAX_RECORDS, LOOP_THRESHOLD_FOR_WASTE, MAP_GOVERNED, MAX_BLAST_PATH, MAX_DESTINATIONS, MODE_VALUES, NET_BINARIES, PATTERN_VERB_NAMES, PRIVILEGE_ESCALATION_RE, REALTIME_PII_PATTERNS, REPLACED_SHIELDS, SCAN_SIGNAL_WEIGHTS, SENSITIVE_PATH_RE, SENSITIVE_PATH_REGEXES, SSRF_MAX_HOST, STARTUP_NAMES, SYSTEM_AUTH_DIRS, SYSTEM_AUTH_FILES, TUNING_FIELDS, VERDICTS, agentFileKind, analyzeFsOperation, analyzeGit, analyzeOutbound, analyzePipeChain, analyzeShellCommand, argumentLeavesText, catalogSettingsFromConfig, checkDangerousSql, checkIdForCheckedBy, checkIdForRule, checkToLegacyPolicy, checkValue, checksFromLegacyPolicy, classifyAuditEntry, classifyRuleSeverity, classifyScanSignal, classifyShellExposure, classifySsrf, collectFileAccesses, computeAgentDeviceScore, computeArgsHash, computeBlendedSecurityScore, computeScanScore, computeSecurityScore, configurableValues, decodeEmbeddedBase64, decodeEmbeddedHex, dedupeCanonicalFindings, derivedWrites, destinationDomain, destinationKind, destinationValue, detectArgsPii, detectDangerousEval, detectDangerousShellExec, detectInlineExec, detectPii, entryDisplay, evaluateEgress, evaluateLoopWindow, evaluatePolicy, evaluateProtectedFileAccess, evaluateSmartConditions, extractAllSshHosts, extractArgDestinations, extractCanonicalFindings, extractContentDestinations, extractNetworkTargets, extractPackageInstalls, extractPositionalArgs, extractRegistryOverrides, extractSessionLevelFindings, extractShellDestTokens, extractShellDestinations, extractToolDestinations, fileAccessView, fileOperandFlagsOf, fileToolOperation, foldHomoglyphs, getCheck, getCompiledRegex, getNestedValue, gitInvocations, gitRepoPath, hashDestination, hostMatches, incompleteFileVerdict, inlineExecDescription, inlineExecReason, inlineExecReview, inspectArgumentSecrets, inspectionEntry, inspectionLayers, isAgentInstructionPath, isBashTool, isBlockAll, isDestructiveToolName, isHashedEntry, isIgnoredTool, isInside, isKnobGoverned, isLegacySystemPath, isLockedCheck, isLoopbackHost, isMaskedKind, isModeValue, isPasswordHashPath, isPrivateHost, isProtectedHomePath, isPublicRegistryHost, isRecordOnly, isShellShapedTool, isShieldVerdict, isStrictGatedTier, isVerdict, knobStatedChecks, levelCheckValue, levelChecks, levelOf, levelPackageSignals, maskDestination, maskPersonalData, maskPersonalValue, matchCanary, matchCanaryArgs, matchSensitivePath, matchesPattern, matchesTrustedEntry, matchesTrustedList, mcpServerFromToolName, narrativeRuleLabel, normalizeCommandForPolicy, normalizeDestination, normalizeFilePath, normalizeForScan, normalizeIpLiteral, normalizePyPiName, normalizeRecipient, normalizeTrustedEntry, parseAllSshHostsFromCommand, parseDestHost, patternShapeOf, pipelineTexts, positionedArgs, previewArgs, redactText, registryHost, resolveAllChecks, resolveCheck, resolveCheckMap, resolvePinned, resolveShellInput, reviewsEveryInline, ruleServerMatches, safeMessage, sampleCopyCommand, scanArgs, scanArgumentSecrets, scanInjection, scanInstructionWrite, scanText, scanViews, sensitivePathMatch, shellRuleArgs, shellScriptOperands, ssrfCheckId, ssrfDestinationFloor, ssrfExemptMatches, ssrfFloor, ssrfReason, stripControlChars, stripInvisible, stripTerminalEscapes, suggestFromApprovals, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, trustedEntryOf, tuningFromLegacyPolicy, tuningToLegacyPolicy, unwrapCommandHead, unwrapRuleLabel, validateOverrides, validateRegex, validateShieldDefinition };
2515
+ export type { ActionTemplateName, AgentFileKind, ApprovalRow, ArgumentInspectionResult, AuditEntryForClassify, BlastEnvFinding, BlastFinding, BlastResult, BlastSummary, CanaryHit, CanaryValue, CanaryView, CanonicalAgent, CanonicalFinding, CanonicalFindingType, CanonicalSourceType, CatalogSettings, CheckDef, CheckGroup, CheckSource, CheckText, DerivedWrite, Destination, DestinationKind, DlpMatch, EgressPolicy, EgressVerdict, ExtractContext, FileAccess, FileAccessContext, FsOpVerdict, GitAnalysis, GitFinding, GitInvocation, InjectionConfidence, InjectionContext, InjectionMatch, InlineExecReview, InspectionInput, InspectionLayers, LegacyPolicyKnobs, Level, LoopWindowEvaluation, ModeValue, OutboundAnalysis, OutboundCheckId, OutboundFinding, PackageEcosystem, PackageInstallRequest, PiiPattern, PipeChainAnalysis, PolicyConfig, PolicyContext, PolicyHostHooks, PolicyVerdict, PositionedArg, ProtectedFileVerdict, ProvenanceLookup, ProvenanceTrust, RegistryOverride, ResolvedCheck, RiskMetadata, ScanFinding, ScanSignals, ScanSummary, ScanView, ScoreTier, SessionExtractContext, SessionToolCall, Severity, ShellCommandAnalysis, ShellDestToken, ShellDestination, ShellExposure, ShellInputResolution, ShieldDefinition, ShieldOverrides, ShieldVerdict, SmartCondition, SmartRule, SsrfFloorOptions, SsrfMatch, SsrfTier, SsrfVerdict, SuggestOptions, Suggestion, ToolCallEntry, ToolCallRecord, ToolInspection, ToolInspectionEntry, TuningField, Verdict };
package/dist/index.d.ts CHANGED
@@ -17,7 +17,9 @@ interface SmartCondition {
17
17
  * Which reading of a `command` field the regex ops test. Absent: the whole
18
18
  * command text. 'access': the command as a file-access rule sees it, without
19
19
  * a script's interpreter line and with the program each command runs cut to
20
- * its name (fileAccessView). Set by the jail's path rules (fw#385).
20
+ * its name (fileAccessView), and with the code body of a stdin interpreter
21
+ * kept (node9Firewall#414). Set by the jail's path rules (fw#385) and the
22
+ * project-jail shield's bash rules.
21
23
  */
22
24
  reading?: 'access';
23
25
  }
@@ -129,6 +131,70 @@ interface RiskMetadata {
129
131
  exposureDestinations?: string[];
130
132
  }
131
133
 
134
+ declare const SYSTEM_AUTH_FILES: readonly ["/etc/passwd", "/etc/shadow", "/etc/group", "/etc/gshadow", "/etc/sudoers"];
135
+ declare const SYSTEM_AUTH_DIRS: readonly ["/etc/security", "/etc/pam.d", "/etc/sudoers.d"];
136
+ declare const STARTUP_NAMES: readonly [".bashrc", ".zshrc", ".profile", ".bash_profile"];
137
+ /**
138
+ * Files inside a project that run code or instruct the agent (fw#318 P4,
139
+ * design 6). A write there after the session read outside content is held:
140
+ * it is how an injected instruction persists past the session. Relative to
141
+ * the project root; a directory entry covers everything under it.
142
+ */
143
+ declare const AGENT_INSTRUCTION_FILES: readonly [".gitlab-ci.yml", "CLAUDE.md", "AGENTS.md", ".cursorrules", ".mcp.json", ".vscode/settings.json", "package.json"];
144
+ declare const AGENT_INSTRUCTION_DIRS: readonly [".github/workflows", ".claude", ".cursor", ".git/hooks", ".husky"];
145
+ /** Is `absPath` one of the agent-instruction files of the project at `root`? */
146
+ declare function isAgentInstructionPath(absPath: string, root: string): boolean;
147
+ /** `isInside(root, p)`: `p` is `root` or below it, lexically. */
148
+ declare function isInside(root: string, p: string): boolean;
149
+ declare function isPasswordHashPath(p: string): boolean;
150
+ /** Compatibility only: old callers do not tell DLP whether they read or write. */
151
+ declare function isLegacySystemPath(p: string): boolean;
152
+ /** Pure lexical normalization; host physical resolution keeps the original path. */
153
+ declare function normalizeFilePath(p: string, cwd?: string, home?: string): string;
154
+ interface FileAccess {
155
+ operation: 'read' | 'write' | 'remove' | 'create';
156
+ path: string;
157
+ cwd?: string;
158
+ /** A read whose content leaves the machine as a request body or an upload. */
159
+ upload?: true;
160
+ /** A directory listing (`ls`, `tree`, find's start points): the entry names, not a file's content. */
161
+ listing?: true;
162
+ /** Unquoted shell pattern. Quoted metacharacters are escaped in this value. */
163
+ glob?: string;
164
+ /** The pattern is find's, not the shell's: `*` also selects dotfiles. */
165
+ dotGlob?: boolean;
166
+ followFinal: boolean;
167
+ recursive?: boolean;
168
+ /** A write that adds to the file (`>>`, `tee -a`): its content stays. */
169
+ append?: true;
170
+ /** This basename-joined candidate applies only if this operand is a directory. */
171
+ directoryTarget?: string;
172
+ candidates?: string[];
173
+ resolution?: 'resolved' | 'missing' | 'failed' | 'lexical';
174
+ }
175
+ interface FileAccessContext {
176
+ cwd?: string;
177
+ homeDirs?: string[];
178
+ accesses?: FileAccess[];
179
+ }
180
+
181
+ interface DerivedWrite {
182
+ /** The file read, as the command spells it. */
183
+ source: string;
184
+ /** The file written from it, as the command spells it. */
185
+ target: string;
186
+ /** The source is gone after the command (`mv`): its record moves rather than copies. */
187
+ move: boolean;
188
+ }
189
+ /** The text of each pipeline of the command: one `cmd | cmd` chain, or one simple command. */
190
+ declare function pipelineTexts(command: string): string[];
191
+ /**
192
+ * The (source, target) pairs of a command: every write of a pipeline is
193
+ * derived from every read of the same pipeline. A listing (`ls`) and an
194
+ * upload (`curl -F file=@K`) are not sources: nothing is written from them.
195
+ */
196
+ declare function derivedWrites(command: string, context?: FileAccessContext): DerivedWrite[];
197
+
132
198
  type ToolInspectionEntry = string | {
133
199
  kind: 'shell';
134
200
  field: string;
@@ -410,53 +476,6 @@ declare function checkValue(settings: CatalogSettings, id: string): Verdict;
410
476
  * stores this on its config so every reader sees the same answers. */
411
477
  declare function resolveCheckMap(settings: CatalogSettings): Record<string, Verdict>;
412
478
 
413
- declare const SYSTEM_AUTH_FILES: readonly ["/etc/passwd", "/etc/shadow", "/etc/group", "/etc/gshadow", "/etc/sudoers"];
414
- declare const SYSTEM_AUTH_DIRS: readonly ["/etc/security", "/etc/pam.d", "/etc/sudoers.d"];
415
- declare const STARTUP_NAMES: readonly [".bashrc", ".zshrc", ".profile", ".bash_profile"];
416
- /**
417
- * Files inside a project that run code or instruct the agent (fw#318 P4,
418
- * design 6). A write there after the session read outside content is held:
419
- * it is how an injected instruction persists past the session. Relative to
420
- * the project root; a directory entry covers everything under it.
421
- */
422
- declare const AGENT_INSTRUCTION_FILES: readonly [".gitlab-ci.yml", "CLAUDE.md", "AGENTS.md", ".cursorrules", ".mcp.json", ".vscode/settings.json", "package.json"];
423
- declare const AGENT_INSTRUCTION_DIRS: readonly [".github/workflows", ".claude", ".cursor", ".git/hooks", ".husky"];
424
- /** Is `absPath` one of the agent-instruction files of the project at `root`? */
425
- declare function isAgentInstructionPath(absPath: string, root: string): boolean;
426
- /** `isInside(root, p)`: `p` is `root` or below it, lexically. */
427
- declare function isInside(root: string, p: string): boolean;
428
- declare function isPasswordHashPath(p: string): boolean;
429
- /** Compatibility only: old callers do not tell DLP whether they read or write. */
430
- declare function isLegacySystemPath(p: string): boolean;
431
- /** Pure lexical normalization; host physical resolution keeps the original path. */
432
- declare function normalizeFilePath(p: string, cwd?: string, home?: string): string;
433
- interface FileAccess {
434
- operation: 'read' | 'write' | 'remove' | 'create';
435
- path: string;
436
- cwd?: string;
437
- /** A read whose content leaves the machine as a request body or an upload. */
438
- upload?: true;
439
- /** A directory listing (`ls`, `tree`, find's start points): the entry names, not a file's content. */
440
- listing?: true;
441
- /** Unquoted shell pattern. Quoted metacharacters are escaped in this value. */
442
- glob?: string;
443
- /** The pattern is find's, not the shell's: `*` also selects dotfiles. */
444
- dotGlob?: boolean;
445
- followFinal: boolean;
446
- recursive?: boolean;
447
- /** A write that adds to the file (`>>`, `tee -a`): its content stays. */
448
- append?: true;
449
- /** This basename-joined candidate applies only if this operand is a directory. */
450
- directoryTarget?: string;
451
- candidates?: string[];
452
- resolution?: 'resolved' | 'missing' | 'failed' | 'lexical';
453
- }
454
- interface FileAccessContext {
455
- cwd?: string;
456
- homeDirs?: string[];
457
- accesses?: FileAccess[];
458
- }
459
-
460
479
  type InlineCodeCategory = 'deletes' | 'writes-outside' | 'sends' | 'listens' | 'runs-commands' | 'reads-protected' | 'builds-code' | 'permissions' | 'monitors' | 'amplifies';
461
480
 
462
481
  /**
@@ -893,6 +912,14 @@ interface PolicyHostHooks {
893
912
  /** The agent settings file at `absPath` as it is on disk now (a regular
894
913
  * file within the host's size cap), or null (node9Firewall#413 part 4). */
895
914
  readAgentSettings?: (absPath: string) => string | null;
915
+ /** True when the user's own npm, yarn, bun, pip or uv configuration names
916
+ * this registry host (node9Firewall#415 item 4). Absent: only the public
917
+ * registries and the machine itself count as configured. */
918
+ isConfiguredRegistry?: (host: string, cwd?: string) => boolean;
919
+ /** True when `dir` (relative to `cwd`) is the top of a git work tree: it
920
+ * holds a `.git` entry. Decides `git -C <dir> add .` (node9Firewall#413).
921
+ * Absent, or no cwd: the stage-all finding stands. */
922
+ isGitWorkTreeTop?: (dir: string, cwd: string) => boolean;
896
923
  }
897
924
  interface PolicyVerdict {
898
925
  decision: 'allow' | 'review' | 'block';
@@ -1133,6 +1160,15 @@ interface GitFinding {
1133
1160
  description: string;
1134
1161
  /** The invocation as resolved, for the reason and the explain trace. */
1135
1162
  shown: string;
1163
+ /**
1164
+ * A stage-all finding that holds only if this directory (as written after
1165
+ * `-C`, relative to where the command runs) is the top of a work tree:
1166
+ * `git -C sub add .` stages `sub` alone, `git -C myapp add .` run from the
1167
+ * folder above the repository stages all of it. The command cannot tell
1168
+ * them apart; a host that knows the working directory asks the disk, and
1169
+ * without an answer the finding stands (node9Firewall#413).
1170
+ */
1171
+ ifWorkTreeTop?: string;
1136
1172
  }
1137
1173
  interface GitAnalysis {
1138
1174
  /** False when mvdan-sh could not parse the command: nothing was judged. */
@@ -1151,6 +1187,8 @@ interface GitInvocation {
1151
1187
  env: Map<string, string | null>;
1152
1188
  /** How the call was written, for the reason. */
1153
1189
  shown: string;
1190
+ /** Each `-C <path>` given before the subcommand, in order; null marks a dynamic word. */
1191
+ chdir?: (string | null)[];
1154
1192
  }
1155
1193
  /**
1156
1194
  * Every git finding in a shell command. Cached by the raw text; pure.
@@ -1159,6 +1197,41 @@ declare function analyzeGit(command: string): GitAnalysis;
1159
1197
  /** The git invocations a command makes, resolved. Exposed for the explain trace and tests. */
1160
1198
  declare function gitInvocations(command: string): GitInvocation[];
1161
1199
 
1200
+ type OutboundCheckId = 'commands.reverse-shell' | 'data.env-exfil';
1201
+ interface OutboundFinding {
1202
+ checkId: OutboundCheckId;
1203
+ /** The rule name the audit log and the catalog's legacy table know. */
1204
+ ruleName: 'block-reverse-shell' | 'review-env-exfil';
1205
+ reason: string;
1206
+ description: string;
1207
+ /** data.env-exfil only: the hosts the environment is sent to, or null when
1208
+ * one sender's destination cannot be read (a dynamic or dotless host, a
1209
+ * sender whose destination argument is unknown). A trusted-host exemption
1210
+ * needs every one of them. */
1211
+ destinations?: string[] | null;
1212
+ }
1213
+ interface OutboundAnalysis {
1214
+ /** False when mvdan-sh could not parse the command: nothing was judged. */
1215
+ parsed: boolean;
1216
+ findings: OutboundFinding[];
1217
+ }
1218
+ declare function analyzeOutbound(command: string): OutboundAnalysis;
1219
+
1220
+ interface RegistryOverride {
1221
+ /** The front-end: npm, pnpm, yarn, bun, npx, pip, uv, pipx, pipenv. */
1222
+ manager: string;
1223
+ /** The flag or variable that named it, for the reason. */
1224
+ via: string;
1225
+ /** The URL as written. */
1226
+ url: string;
1227
+ /** Its host, lowercased, without the port. */
1228
+ host: string;
1229
+ }
1230
+ declare function isPublicRegistryHost(host: string): boolean;
1231
+ /** The host of an http(s) URL, or null. A `name=url` uv index keeps its URL. */
1232
+ declare function registryHost(value: string): string | null;
1233
+ declare function extractRegistryOverrides(command: string): RegistryOverride[];
1234
+
1162
1235
  /**
1163
1236
  * The OSV ecosystem name, verbatim: it is the index directory, the bucket path
1164
1237
  * of the OSV archive and the `ecosystem` of the online query at once. `VSCode`
@@ -1651,7 +1724,7 @@ declare function validateOverrides(raw: unknown): {
1651
1724
  */
1652
1725
  declare const BUILTIN_SHIELDS: Record<string, ShieldDefinition>;
1653
1726
 
1654
- type ActionTemplateName = 'finance' | 'identity' | 'publishing';
1727
+ type ActionTemplateName = 'finance' | 'identity' | 'publishing' | 'settings' | 'branches';
1655
1728
  declare const ACTION_TEMPLATES: Readonly<Record<ActionTemplateName, readonly SmartRule[]>>;
1656
1729
  /** The general check each template feeds, and the word its rules carry. */
1657
1730
  declare const ACTION_CHECKS: Readonly<Record<ActionTemplateName, {
@@ -2132,7 +2205,7 @@ type PiiPattern = 'Email' | 'SSN' | 'Phone' | 'Credit Card' | 'IBAN' | 'Bank Rou
2132
2205
  * Detect PII patterns in a string. Returns a deduplicated list — one entry
2133
2206
  * per distinct pattern type, never multiple "Email" findings from one input.
2134
2207
  */
2135
- declare function detectPii(text: string): PiiPattern[];
2208
+ declare function detectPii(text: string, labelContext?: string): PiiPattern[];
2136
2209
  declare const REALTIME_PII_PATTERNS: readonly PiiPattern[];
2137
2210
  /** Every string leaf of a tool call's arguments, joined by newlines, bounded. */
2138
2211
  declare function argumentLeavesText(args: unknown, limit?: number): string;
@@ -2315,7 +2388,7 @@ declare const LONG_OUTPUT_THRESHOLD_BYTES: number;
2315
2388
  * and fails CI when the hash drifts without a version bump — forgetting
2316
2389
  * is loud, not silent.
2317
2390
  */
2318
- declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v32";
2391
+ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v35";
2319
2392
  /**
2320
2393
  * SHA-256 prefix of the detector-source files
2321
2394
  * (canonical.ts + pii.ts + destructive-regex.ts).
@@ -2326,7 +2399,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v32";
2326
2399
  * files changed, this hash must change too, and you must consciously
2327
2400
  * decide whether to bump CANONICAL_EXTRACTOR_VERSION."
2328
2401
  */
2329
- declare const CANONICAL_EXTRACTOR_HASH = "bf14326b92bf1718";
2402
+ declare const CANONICAL_EXTRACTOR_HASH = "3b56e19906016767";
2330
2403
  declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
2331
2404
  declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
2332
2405
  /**
@@ -2438,5 +2511,5 @@ declare function scanArgumentSecrets(args: unknown): DlpMatch | null;
2438
2511
  /** Engine version stamped on audit entries for future drift detection. */
2439
2512
  declare const ENGINE_VERSION = "1.4.0";
2440
2513
 
2441
- export { ACTION_CHECKS, ACTION_TEMPLATES, AGENT_INSTRUCTION_DIRS, AGENT_INSTRUCTION_FILES, APP_SERVER_GLOB, APP_SHIELD_NAMES, APP_SHIELD_SPECS, ARGUMENT_SCAN_LIMITS, AST_FS_REGEX_RULES, BASH_TOOL_NAMES, BUILTIN_DANGEROUS_WORDS, BUILTIN_SHIELDS, CANARY_MIN_LENGTH, CANONICAL_EXTRACTOR_HASH, CANONICAL_EXTRACTOR_VERSION, CHECKS, CHECK_BY_ID, CHECK_GROUPS, CHECK_TEXT, CHECK_VERDICT_RANK, COMMAND_WRAPPERS, CONFIGURABLE_CHECK_IDS, COPY_VERBS, COST_PER_LOOP_ITER_USD, DEFAULT_EGRESS_ALLOWLIST, DESTINATION_ARGS, DESTRUCTIVE_OP_RE, DLP_PATTERNS, DLP_SCAN_LIMITS, ENGINE_VERSION, FILE_TOOLS, FLAGS_WITH_VALUES, FS_READ_TOOLS, GENERAL_ACTION_RULES, KNOB_GOVERNED, LEVELS, LONG_OUTPUT_THRESHOLD_BYTES, LOOP_MAX_RECORDS, LOOP_THRESHOLD_FOR_WASTE, MAP_GOVERNED, MAX_BLAST_PATH, MAX_DESTINATIONS, MODE_VALUES, NET_BINARIES, PATTERN_VERB_NAMES, PRIVILEGE_ESCALATION_RE, REALTIME_PII_PATTERNS, REPLACED_SHIELDS, SCAN_SIGNAL_WEIGHTS, SENSITIVE_PATH_RE, SENSITIVE_PATH_REGEXES, SSRF_MAX_HOST, STARTUP_NAMES, SYSTEM_AUTH_DIRS, SYSTEM_AUTH_FILES, TUNING_FIELDS, VERDICTS, agentFileKind, analyzeFsOperation, analyzeGit, analyzePipeChain, analyzeShellCommand, argumentLeavesText, catalogSettingsFromConfig, checkDangerousSql, checkIdForCheckedBy, checkIdForRule, checkToLegacyPolicy, checkValue, checksFromLegacyPolicy, classifyAuditEntry, classifyRuleSeverity, classifyScanSignal, classifyShellExposure, classifySsrf, collectFileAccesses, computeAgentDeviceScore, computeArgsHash, computeBlendedSecurityScore, computeScanScore, computeSecurityScore, configurableValues, decodeEmbeddedBase64, decodeEmbeddedHex, dedupeCanonicalFindings, destinationDomain, destinationKind, destinationValue, detectArgsPii, detectDangerousEval, detectDangerousShellExec, detectInlineExec, detectPii, entryDisplay, evaluateEgress, evaluateLoopWindow, evaluatePolicy, evaluateProtectedFileAccess, evaluateSmartConditions, extractAllSshHosts, extractArgDestinations, extractCanonicalFindings, extractContentDestinations, extractNetworkTargets, extractPackageInstalls, extractPositionalArgs, extractSessionLevelFindings, extractShellDestTokens, extractShellDestinations, extractToolDestinations, fileAccessView, fileOperandFlagsOf, fileToolOperation, foldHomoglyphs, getCheck, getCompiledRegex, getNestedValue, gitInvocations, gitRepoPath, hashDestination, hostMatches, incompleteFileVerdict, inlineExecDescription, inlineExecReason, inlineExecReview, inspectArgumentSecrets, inspectionEntry, inspectionLayers, isAgentInstructionPath, isBashTool, isBlockAll, isDestructiveToolName, isHashedEntry, isIgnoredTool, isInside, isKnobGoverned, isLegacySystemPath, isLockedCheck, isLoopbackHost, isMaskedKind, isModeValue, isPasswordHashPath, isPrivateHost, isProtectedHomePath, isRecordOnly, isShellShapedTool, isShieldVerdict, isStrictGatedTier, isVerdict, knobStatedChecks, levelCheckValue, levelChecks, levelOf, levelPackageSignals, maskDestination, maskPersonalData, maskPersonalValue, matchCanary, matchCanaryArgs, matchSensitivePath, matchesPattern, matchesTrustedEntry, matchesTrustedList, mcpServerFromToolName, narrativeRuleLabel, normalizeCommandForPolicy, normalizeDestination, normalizeFilePath, normalizeForScan, normalizeIpLiteral, normalizePyPiName, normalizeRecipient, normalizeTrustedEntry, parseAllSshHostsFromCommand, parseDestHost, patternShapeOf, positionedArgs, previewArgs, redactText, resolveAllChecks, resolveCheck, resolveCheckMap, resolvePinned, resolveShellInput, reviewsEveryInline, ruleServerMatches, safeMessage, sampleCopyCommand, scanArgs, scanArgumentSecrets, scanInjection, scanInstructionWrite, scanText, scanViews, sensitivePathMatch, shellRuleArgs, shellScriptOperands, ssrfCheckId, ssrfDestinationFloor, ssrfExemptMatches, ssrfFloor, ssrfReason, stripControlChars, stripInvisible, stripTerminalEscapes, suggestFromApprovals, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, trustedEntryOf, tuningFromLegacyPolicy, tuningToLegacyPolicy, unwrapCommandHead, unwrapRuleLabel, validateOverrides, validateRegex, validateShieldDefinition };
2442
- export type { ActionTemplateName, AgentFileKind, ApprovalRow, ArgumentInspectionResult, AuditEntryForClassify, BlastEnvFinding, BlastFinding, BlastResult, BlastSummary, CanaryHit, CanaryValue, CanaryView, CanonicalAgent, CanonicalFinding, CanonicalFindingType, CanonicalSourceType, CatalogSettings, CheckDef, CheckGroup, CheckSource, CheckText, Destination, DestinationKind, DlpMatch, EgressPolicy, EgressVerdict, ExtractContext, FileAccess, FileAccessContext, FsOpVerdict, GitAnalysis, GitFinding, GitInvocation, InjectionConfidence, InjectionContext, InjectionMatch, InlineExecReview, InspectionInput, InspectionLayers, LegacyPolicyKnobs, Level, LoopWindowEvaluation, ModeValue, PackageEcosystem, PackageInstallRequest, PiiPattern, PipeChainAnalysis, PolicyConfig, PolicyContext, PolicyHostHooks, PolicyVerdict, PositionedArg, ProtectedFileVerdict, ProvenanceLookup, ProvenanceTrust, ResolvedCheck, RiskMetadata, ScanFinding, ScanSignals, ScanSummary, ScanView, ScoreTier, SessionExtractContext, SessionToolCall, Severity, ShellCommandAnalysis, ShellDestToken, ShellDestination, ShellExposure, ShellInputResolution, ShieldDefinition, ShieldOverrides, ShieldVerdict, SmartCondition, SmartRule, SsrfFloorOptions, SsrfMatch, SsrfTier, SsrfVerdict, SuggestOptions, Suggestion, ToolCallEntry, ToolCallRecord, ToolInspection, ToolInspectionEntry, TuningField, Verdict };
2514
+ export { ACTION_CHECKS, ACTION_TEMPLATES, AGENT_INSTRUCTION_DIRS, AGENT_INSTRUCTION_FILES, APP_SERVER_GLOB, APP_SHIELD_NAMES, APP_SHIELD_SPECS, ARGUMENT_SCAN_LIMITS, AST_FS_REGEX_RULES, BASH_TOOL_NAMES, BUILTIN_DANGEROUS_WORDS, BUILTIN_SHIELDS, CANARY_MIN_LENGTH, CANONICAL_EXTRACTOR_HASH, CANONICAL_EXTRACTOR_VERSION, CHECKS, CHECK_BY_ID, CHECK_GROUPS, CHECK_TEXT, CHECK_VERDICT_RANK, COMMAND_WRAPPERS, CONFIGURABLE_CHECK_IDS, COPY_VERBS, COST_PER_LOOP_ITER_USD, DEFAULT_EGRESS_ALLOWLIST, DESTINATION_ARGS, DESTRUCTIVE_OP_RE, DLP_PATTERNS, DLP_SCAN_LIMITS, ENGINE_VERSION, FILE_TOOLS, FLAGS_WITH_VALUES, FS_READ_TOOLS, GENERAL_ACTION_RULES, KNOB_GOVERNED, LEVELS, LONG_OUTPUT_THRESHOLD_BYTES, LOOP_MAX_RECORDS, LOOP_THRESHOLD_FOR_WASTE, MAP_GOVERNED, MAX_BLAST_PATH, MAX_DESTINATIONS, MODE_VALUES, NET_BINARIES, PATTERN_VERB_NAMES, PRIVILEGE_ESCALATION_RE, REALTIME_PII_PATTERNS, REPLACED_SHIELDS, SCAN_SIGNAL_WEIGHTS, SENSITIVE_PATH_RE, SENSITIVE_PATH_REGEXES, SSRF_MAX_HOST, STARTUP_NAMES, SYSTEM_AUTH_DIRS, SYSTEM_AUTH_FILES, TUNING_FIELDS, VERDICTS, agentFileKind, analyzeFsOperation, analyzeGit, analyzeOutbound, analyzePipeChain, analyzeShellCommand, argumentLeavesText, catalogSettingsFromConfig, checkDangerousSql, checkIdForCheckedBy, checkIdForRule, checkToLegacyPolicy, checkValue, checksFromLegacyPolicy, classifyAuditEntry, classifyRuleSeverity, classifyScanSignal, classifyShellExposure, classifySsrf, collectFileAccesses, computeAgentDeviceScore, computeArgsHash, computeBlendedSecurityScore, computeScanScore, computeSecurityScore, configurableValues, decodeEmbeddedBase64, decodeEmbeddedHex, dedupeCanonicalFindings, derivedWrites, destinationDomain, destinationKind, destinationValue, detectArgsPii, detectDangerousEval, detectDangerousShellExec, detectInlineExec, detectPii, entryDisplay, evaluateEgress, evaluateLoopWindow, evaluatePolicy, evaluateProtectedFileAccess, evaluateSmartConditions, extractAllSshHosts, extractArgDestinations, extractCanonicalFindings, extractContentDestinations, extractNetworkTargets, extractPackageInstalls, extractPositionalArgs, extractRegistryOverrides, extractSessionLevelFindings, extractShellDestTokens, extractShellDestinations, extractToolDestinations, fileAccessView, fileOperandFlagsOf, fileToolOperation, foldHomoglyphs, getCheck, getCompiledRegex, getNestedValue, gitInvocations, gitRepoPath, hashDestination, hostMatches, incompleteFileVerdict, inlineExecDescription, inlineExecReason, inlineExecReview, inspectArgumentSecrets, inspectionEntry, inspectionLayers, isAgentInstructionPath, isBashTool, isBlockAll, isDestructiveToolName, isHashedEntry, isIgnoredTool, isInside, isKnobGoverned, isLegacySystemPath, isLockedCheck, isLoopbackHost, isMaskedKind, isModeValue, isPasswordHashPath, isPrivateHost, isProtectedHomePath, isPublicRegistryHost, isRecordOnly, isShellShapedTool, isShieldVerdict, isStrictGatedTier, isVerdict, knobStatedChecks, levelCheckValue, levelChecks, levelOf, levelPackageSignals, maskDestination, maskPersonalData, maskPersonalValue, matchCanary, matchCanaryArgs, matchSensitivePath, matchesPattern, matchesTrustedEntry, matchesTrustedList, mcpServerFromToolName, narrativeRuleLabel, normalizeCommandForPolicy, normalizeDestination, normalizeFilePath, normalizeForScan, normalizeIpLiteral, normalizePyPiName, normalizeRecipient, normalizeTrustedEntry, parseAllSshHostsFromCommand, parseDestHost, patternShapeOf, pipelineTexts, positionedArgs, previewArgs, redactText, registryHost, resolveAllChecks, resolveCheck, resolveCheckMap, resolvePinned, resolveShellInput, reviewsEveryInline, ruleServerMatches, safeMessage, sampleCopyCommand, scanArgs, scanArgumentSecrets, scanInjection, scanInstructionWrite, scanText, scanViews, sensitivePathMatch, shellRuleArgs, shellScriptOperands, ssrfCheckId, ssrfDestinationFloor, ssrfExemptMatches, ssrfFloor, ssrfReason, stripControlChars, stripInvisible, stripTerminalEscapes, suggestFromApprovals, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, trustedEntryOf, tuningFromLegacyPolicy, tuningToLegacyPolicy, unwrapCommandHead, unwrapRuleLabel, validateOverrides, validateRegex, validateShieldDefinition };
2515
+ export type { ActionTemplateName, AgentFileKind, ApprovalRow, ArgumentInspectionResult, AuditEntryForClassify, BlastEnvFinding, BlastFinding, BlastResult, BlastSummary, CanaryHit, CanaryValue, CanaryView, CanonicalAgent, CanonicalFinding, CanonicalFindingType, CanonicalSourceType, CatalogSettings, CheckDef, CheckGroup, CheckSource, CheckText, DerivedWrite, Destination, DestinationKind, DlpMatch, EgressPolicy, EgressVerdict, ExtractContext, FileAccess, FileAccessContext, FsOpVerdict, GitAnalysis, GitFinding, GitInvocation, InjectionConfidence, InjectionContext, InjectionMatch, InlineExecReview, InspectionInput, InspectionLayers, LegacyPolicyKnobs, Level, LoopWindowEvaluation, ModeValue, OutboundAnalysis, OutboundCheckId, OutboundFinding, PackageEcosystem, PackageInstallRequest, PiiPattern, PipeChainAnalysis, PolicyConfig, PolicyContext, PolicyHostHooks, PolicyVerdict, PositionedArg, ProtectedFileVerdict, ProvenanceLookup, ProvenanceTrust, RegistryOverride, ResolvedCheck, RiskMetadata, ScanFinding, ScanSignals, ScanSummary, ScanView, ScoreTier, SessionExtractContext, SessionToolCall, Severity, ShellCommandAnalysis, ShellDestToken, ShellDestination, ShellExposure, ShellInputResolution, ShieldDefinition, ShieldOverrides, ShieldVerdict, SmartCondition, SmartRule, SsrfFloorOptions, SsrfMatch, SsrfTier, SsrfVerdict, SuggestOptions, Suggestion, ToolCallEntry, ToolCallRecord, ToolInspection, ToolInspectionEntry, TuningField, Verdict };