@node9/policy-engine 2.42.0 → 2.43.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 +112 -54
- package/dist/index.d.ts +112 -54
- package/dist/index.js +1572 -77
- package/dist/index.mjs +1566 -77
- package/package.json +1 -1
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)
|
|
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,10 @@ 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;
|
|
896
919
|
}
|
|
897
920
|
interface PolicyVerdict {
|
|
898
921
|
decision: 'allow' | 'review' | 'block';
|
|
@@ -1159,6 +1182,41 @@ declare function analyzeGit(command: string): GitAnalysis;
|
|
|
1159
1182
|
/** The git invocations a command makes, resolved. Exposed for the explain trace and tests. */
|
|
1160
1183
|
declare function gitInvocations(command: string): GitInvocation[];
|
|
1161
1184
|
|
|
1185
|
+
type OutboundCheckId = 'commands.reverse-shell' | 'data.env-exfil';
|
|
1186
|
+
interface OutboundFinding {
|
|
1187
|
+
checkId: OutboundCheckId;
|
|
1188
|
+
/** The rule name the audit log and the catalog's legacy table know. */
|
|
1189
|
+
ruleName: 'block-reverse-shell' | 'review-env-exfil';
|
|
1190
|
+
reason: string;
|
|
1191
|
+
description: string;
|
|
1192
|
+
/** data.env-exfil only: the hosts the environment is sent to, or null when
|
|
1193
|
+
* one sender's destination cannot be read (a dynamic or dotless host, a
|
|
1194
|
+
* sender whose destination argument is unknown). A trusted-host exemption
|
|
1195
|
+
* needs every one of them. */
|
|
1196
|
+
destinations?: string[] | null;
|
|
1197
|
+
}
|
|
1198
|
+
interface OutboundAnalysis {
|
|
1199
|
+
/** False when mvdan-sh could not parse the command: nothing was judged. */
|
|
1200
|
+
parsed: boolean;
|
|
1201
|
+
findings: OutboundFinding[];
|
|
1202
|
+
}
|
|
1203
|
+
declare function analyzeOutbound(command: string): OutboundAnalysis;
|
|
1204
|
+
|
|
1205
|
+
interface RegistryOverride {
|
|
1206
|
+
/** The front-end: npm, pnpm, yarn, bun, npx, pip, uv, pipx, pipenv. */
|
|
1207
|
+
manager: string;
|
|
1208
|
+
/** The flag or variable that named it, for the reason. */
|
|
1209
|
+
via: string;
|
|
1210
|
+
/** The URL as written. */
|
|
1211
|
+
url: string;
|
|
1212
|
+
/** Its host, lowercased, without the port. */
|
|
1213
|
+
host: string;
|
|
1214
|
+
}
|
|
1215
|
+
declare function isPublicRegistryHost(host: string): boolean;
|
|
1216
|
+
/** The host of an http(s) URL, or null. A `name=url` uv index keeps its URL. */
|
|
1217
|
+
declare function registryHost(value: string): string | null;
|
|
1218
|
+
declare function extractRegistryOverrides(command: string): RegistryOverride[];
|
|
1219
|
+
|
|
1162
1220
|
/**
|
|
1163
1221
|
* The OSV ecosystem name, verbatim: it is the index directory, the bucket path
|
|
1164
1222
|
* of the OSV archive and the `ecosystem` of the online query at once. `VSCode`
|
|
@@ -1651,7 +1709,7 @@ declare function validateOverrides(raw: unknown): {
|
|
|
1651
1709
|
*/
|
|
1652
1710
|
declare const BUILTIN_SHIELDS: Record<string, ShieldDefinition>;
|
|
1653
1711
|
|
|
1654
|
-
type ActionTemplateName = 'finance' | 'identity' | 'publishing';
|
|
1712
|
+
type ActionTemplateName = 'finance' | 'identity' | 'publishing' | 'settings' | 'branches';
|
|
1655
1713
|
declare const ACTION_TEMPLATES: Readonly<Record<ActionTemplateName, readonly SmartRule[]>>;
|
|
1656
1714
|
/** The general check each template feeds, and the word its rules carry. */
|
|
1657
1715
|
declare const ACTION_CHECKS: Readonly<Record<ActionTemplateName, {
|
|
@@ -2132,7 +2190,7 @@ type PiiPattern = 'Email' | 'SSN' | 'Phone' | 'Credit Card' | 'IBAN' | 'Bank Rou
|
|
|
2132
2190
|
* Detect PII patterns in a string. Returns a deduplicated list — one entry
|
|
2133
2191
|
* per distinct pattern type, never multiple "Email" findings from one input.
|
|
2134
2192
|
*/
|
|
2135
|
-
declare function detectPii(text: string): PiiPattern[];
|
|
2193
|
+
declare function detectPii(text: string, labelContext?: string): PiiPattern[];
|
|
2136
2194
|
declare const REALTIME_PII_PATTERNS: readonly PiiPattern[];
|
|
2137
2195
|
/** Every string leaf of a tool call's arguments, joined by newlines, bounded. */
|
|
2138
2196
|
declare function argumentLeavesText(args: unknown, limit?: number): string;
|
|
@@ -2315,7 +2373,7 @@ declare const LONG_OUTPUT_THRESHOLD_BYTES: number;
|
|
|
2315
2373
|
* and fails CI when the hash drifts without a version bump — forgetting
|
|
2316
2374
|
* is loud, not silent.
|
|
2317
2375
|
*/
|
|
2318
|
-
declare const CANONICAL_EXTRACTOR_VERSION = "canonical-
|
|
2376
|
+
declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v34";
|
|
2319
2377
|
/**
|
|
2320
2378
|
* SHA-256 prefix of the detector-source files
|
|
2321
2379
|
* (canonical.ts + pii.ts + destructive-regex.ts).
|
|
@@ -2326,7 +2384,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v32";
|
|
|
2326
2384
|
* files changed, this hash must change too, and you must consciously
|
|
2327
2385
|
* decide whether to bump CANONICAL_EXTRACTOR_VERSION."
|
|
2328
2386
|
*/
|
|
2329
|
-
declare const CANONICAL_EXTRACTOR_HASH = "
|
|
2387
|
+
declare const CANONICAL_EXTRACTOR_HASH = "45158fa38836036f";
|
|
2330
2388
|
declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
|
|
2331
2389
|
declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
|
|
2332
2390
|
/**
|
|
@@ -2438,5 +2496,5 @@ declare function scanArgumentSecrets(args: unknown): DlpMatch | null;
|
|
|
2438
2496
|
/** Engine version stamped on audit entries for future drift detection. */
|
|
2439
2497
|
declare const ENGINE_VERSION = "1.4.0";
|
|
2440
2498
|
|
|
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 };
|
|
2499
|
+
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 };
|
|
2500
|
+
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)
|
|
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,10 @@ 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;
|
|
896
919
|
}
|
|
897
920
|
interface PolicyVerdict {
|
|
898
921
|
decision: 'allow' | 'review' | 'block';
|
|
@@ -1159,6 +1182,41 @@ declare function analyzeGit(command: string): GitAnalysis;
|
|
|
1159
1182
|
/** The git invocations a command makes, resolved. Exposed for the explain trace and tests. */
|
|
1160
1183
|
declare function gitInvocations(command: string): GitInvocation[];
|
|
1161
1184
|
|
|
1185
|
+
type OutboundCheckId = 'commands.reverse-shell' | 'data.env-exfil';
|
|
1186
|
+
interface OutboundFinding {
|
|
1187
|
+
checkId: OutboundCheckId;
|
|
1188
|
+
/** The rule name the audit log and the catalog's legacy table know. */
|
|
1189
|
+
ruleName: 'block-reverse-shell' | 'review-env-exfil';
|
|
1190
|
+
reason: string;
|
|
1191
|
+
description: string;
|
|
1192
|
+
/** data.env-exfil only: the hosts the environment is sent to, or null when
|
|
1193
|
+
* one sender's destination cannot be read (a dynamic or dotless host, a
|
|
1194
|
+
* sender whose destination argument is unknown). A trusted-host exemption
|
|
1195
|
+
* needs every one of them. */
|
|
1196
|
+
destinations?: string[] | null;
|
|
1197
|
+
}
|
|
1198
|
+
interface OutboundAnalysis {
|
|
1199
|
+
/** False when mvdan-sh could not parse the command: nothing was judged. */
|
|
1200
|
+
parsed: boolean;
|
|
1201
|
+
findings: OutboundFinding[];
|
|
1202
|
+
}
|
|
1203
|
+
declare function analyzeOutbound(command: string): OutboundAnalysis;
|
|
1204
|
+
|
|
1205
|
+
interface RegistryOverride {
|
|
1206
|
+
/** The front-end: npm, pnpm, yarn, bun, npx, pip, uv, pipx, pipenv. */
|
|
1207
|
+
manager: string;
|
|
1208
|
+
/** The flag or variable that named it, for the reason. */
|
|
1209
|
+
via: string;
|
|
1210
|
+
/** The URL as written. */
|
|
1211
|
+
url: string;
|
|
1212
|
+
/** Its host, lowercased, without the port. */
|
|
1213
|
+
host: string;
|
|
1214
|
+
}
|
|
1215
|
+
declare function isPublicRegistryHost(host: string): boolean;
|
|
1216
|
+
/** The host of an http(s) URL, or null. A `name=url` uv index keeps its URL. */
|
|
1217
|
+
declare function registryHost(value: string): string | null;
|
|
1218
|
+
declare function extractRegistryOverrides(command: string): RegistryOverride[];
|
|
1219
|
+
|
|
1162
1220
|
/**
|
|
1163
1221
|
* The OSV ecosystem name, verbatim: it is the index directory, the bucket path
|
|
1164
1222
|
* of the OSV archive and the `ecosystem` of the online query at once. `VSCode`
|
|
@@ -1651,7 +1709,7 @@ declare function validateOverrides(raw: unknown): {
|
|
|
1651
1709
|
*/
|
|
1652
1710
|
declare const BUILTIN_SHIELDS: Record<string, ShieldDefinition>;
|
|
1653
1711
|
|
|
1654
|
-
type ActionTemplateName = 'finance' | 'identity' | 'publishing';
|
|
1712
|
+
type ActionTemplateName = 'finance' | 'identity' | 'publishing' | 'settings' | 'branches';
|
|
1655
1713
|
declare const ACTION_TEMPLATES: Readonly<Record<ActionTemplateName, readonly SmartRule[]>>;
|
|
1656
1714
|
/** The general check each template feeds, and the word its rules carry. */
|
|
1657
1715
|
declare const ACTION_CHECKS: Readonly<Record<ActionTemplateName, {
|
|
@@ -2132,7 +2190,7 @@ type PiiPattern = 'Email' | 'SSN' | 'Phone' | 'Credit Card' | 'IBAN' | 'Bank Rou
|
|
|
2132
2190
|
* Detect PII patterns in a string. Returns a deduplicated list — one entry
|
|
2133
2191
|
* per distinct pattern type, never multiple "Email" findings from one input.
|
|
2134
2192
|
*/
|
|
2135
|
-
declare function detectPii(text: string): PiiPattern[];
|
|
2193
|
+
declare function detectPii(text: string, labelContext?: string): PiiPattern[];
|
|
2136
2194
|
declare const REALTIME_PII_PATTERNS: readonly PiiPattern[];
|
|
2137
2195
|
/** Every string leaf of a tool call's arguments, joined by newlines, bounded. */
|
|
2138
2196
|
declare function argumentLeavesText(args: unknown, limit?: number): string;
|
|
@@ -2315,7 +2373,7 @@ declare const LONG_OUTPUT_THRESHOLD_BYTES: number;
|
|
|
2315
2373
|
* and fails CI when the hash drifts without a version bump — forgetting
|
|
2316
2374
|
* is loud, not silent.
|
|
2317
2375
|
*/
|
|
2318
|
-
declare const CANONICAL_EXTRACTOR_VERSION = "canonical-
|
|
2376
|
+
declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v34";
|
|
2319
2377
|
/**
|
|
2320
2378
|
* SHA-256 prefix of the detector-source files
|
|
2321
2379
|
* (canonical.ts + pii.ts + destructive-regex.ts).
|
|
@@ -2326,7 +2384,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v32";
|
|
|
2326
2384
|
* files changed, this hash must change too, and you must consciously
|
|
2327
2385
|
* decide whether to bump CANONICAL_EXTRACTOR_VERSION."
|
|
2328
2386
|
*/
|
|
2329
|
-
declare const CANONICAL_EXTRACTOR_HASH = "
|
|
2387
|
+
declare const CANONICAL_EXTRACTOR_HASH = "45158fa38836036f";
|
|
2330
2388
|
declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
|
|
2331
2389
|
declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
|
|
2332
2390
|
/**
|
|
@@ -2438,5 +2496,5 @@ declare function scanArgumentSecrets(args: unknown): DlpMatch | null;
|
|
|
2438
2496
|
/** Engine version stamped on audit entries for future drift detection. */
|
|
2439
2497
|
declare const ENGINE_VERSION = "1.4.0";
|
|
2440
2498
|
|
|
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 };
|
|
2499
|
+
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 };
|
|
2500
|
+
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 };
|