@node9/policy-engine 2.37.1 → 2.38.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 +161 -14
- package/dist/index.d.ts +161 -14
- package/dist/index.js +1551 -423
- package/dist/index.mjs +1536 -422
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -13,6 +13,13 @@ interface SmartCondition {
|
|
|
13
13
|
op: 'matches' | 'notMatches' | 'contains' | 'notContains' | 'exists' | 'notExists' | 'matchesGlob' | 'notMatchesGlob';
|
|
14
14
|
value?: string;
|
|
15
15
|
flags?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Which reading of a `command` field the regex ops test. Absent: the whole
|
|
18
|
+
* command text. 'access': the command as a file-access rule sees it, without
|
|
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).
|
|
21
|
+
*/
|
|
22
|
+
reading?: 'access';
|
|
16
23
|
}
|
|
17
24
|
/**
|
|
18
25
|
* A user-defined or shield-defined rule. The matcher applies it to a
|
|
@@ -26,6 +33,20 @@ interface SmartCondition {
|
|
|
26
33
|
interface SmartRule {
|
|
27
34
|
name?: string;
|
|
28
35
|
tool: string;
|
|
36
|
+
/**
|
|
37
|
+
* Glob (case-insensitive) the call's MCP server label must match: the
|
|
38
|
+
* gateway's resolved label, or `<server>` from a `mcp__<server>__<tool>`
|
|
39
|
+
* name. A call with no label (a shell command, a bare tool name) never
|
|
40
|
+
* matches a rule that sets this. Lets an app's shield say "only Stripe's
|
|
41
|
+
* create_refund", not every server's (node9Firewall#390).
|
|
42
|
+
*/
|
|
43
|
+
server?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Glob the call's MCP server label must NOT match. A call with no label
|
|
46
|
+
* passes. The general action checks use it to stay off a server an app
|
|
47
|
+
* shield claims, so turning that shield off makes the app quiet.
|
|
48
|
+
*/
|
|
49
|
+
notServer?: string;
|
|
29
50
|
conditions: SmartCondition[];
|
|
30
51
|
conditionMode?: 'all' | 'any';
|
|
31
52
|
verdict: 'allow' | 'review' | 'block';
|
|
@@ -257,7 +278,7 @@ declare const VERDICTS: readonly Verdict[];
|
|
|
257
278
|
declare const CHECK_VERDICT_RANK: Record<Verdict, number>;
|
|
258
279
|
declare function isVerdict(v: unknown): v is Verdict;
|
|
259
280
|
/** Groups are by what the user fears, not by the mechanism that catches it. */
|
|
260
|
-
type CheckGroup = 'commands' | 'data' | 'network' | 'files' | 'behavior' | 'loading';
|
|
281
|
+
type CheckGroup = 'commands' | 'data' | 'network' | 'files' | 'behavior' | 'loading' | 'actions';
|
|
261
282
|
declare const CHECK_GROUPS: readonly {
|
|
262
283
|
id: CheckGroup;
|
|
263
284
|
title: string;
|
|
@@ -433,11 +454,29 @@ interface FileAccessContext {
|
|
|
433
454
|
accesses?: FileAccess[];
|
|
434
455
|
}
|
|
435
456
|
|
|
457
|
+
type InlineCodeCategory = 'deletes' | 'writes-outside' | 'sends' | 'listens' | 'runs-commands' | 'reads-protected' | 'builds-code' | 'permissions' | 'monitors' | 'amplifies';
|
|
458
|
+
|
|
436
459
|
/**
|
|
437
460
|
* The POSIX reading of a command. Kept as the single-string API every existing
|
|
438
461
|
* caller (canonical.ts, the detectors, `explain`) already depends on.
|
|
439
462
|
*/
|
|
440
463
|
declare function normalizeCommandForPolicy(command: string): string;
|
|
464
|
+
/**
|
|
465
|
+
* The command as a file-access rule sees it (node9Firewall#385). A jail of
|
|
466
|
+
* /usr or /bin must not meet `#!/usr/bin/env bash` or `/usr/bin/python3 app.py`:
|
|
467
|
+
* the interpreter line names the program that runs the script and the program
|
|
468
|
+
* path names what runs; neither is a file the command reads. So the clean
|
|
469
|
+
* interpreter line on the first line is dropped, and the program word of each
|
|
470
|
+
* command (after `sudo`, `env` and the other wrappers) is cut to its name.
|
|
471
|
+
* Every argument and redirect stays, so `cat /usr/share/x`, `bash /etc/x.sh`
|
|
472
|
+
* (the script is read) and `wc < /etc/hosts` still meet the jail.
|
|
473
|
+
*
|
|
474
|
+
* Only a program in a system program directory, or a relative one, is cut
|
|
475
|
+
* (PROGRAM_DIR): a script run from a jailed directory keeps its path and still
|
|
476
|
+
* meets the jail. An unparsable command is returned unchanged (the strict
|
|
477
|
+
* direction for a jail).
|
|
478
|
+
*/
|
|
479
|
+
declare function fileAccessView(command: string): string;
|
|
441
480
|
/**
|
|
442
481
|
* AST-based detection of dangerous shell execution patterns.
|
|
443
482
|
*
|
|
@@ -559,10 +598,31 @@ declare function unwrapCommandHead(words: (string | null)[], stopAtFind?: boolea
|
|
|
559
598
|
/**
|
|
560
599
|
* AST-aware inline-execution detector. Returns true when the command runs code
|
|
561
600
|
* supplied on the command line, via stdin, or via a pipe into a bare
|
|
562
|
-
* interpreter. Structural, so it is not fooled by
|
|
563
|
-
* bundles, or wrapper nesting. Pure.
|
|
601
|
+
* interpreter, whatever the code does. Structural, so it is not fooled by
|
|
602
|
+
* quoting, escapes, option bundles, or wrapper nesting. Pure. Strict mode asks
|
|
603
|
+
* on this; every other mode asks on inlineExecReview.
|
|
564
604
|
*/
|
|
565
605
|
declare function detectInlineExec(command: string): boolean;
|
|
606
|
+
/** Why a command's inline code needs a review: what it does, in which language. */
|
|
607
|
+
interface InlineExecReview {
|
|
608
|
+
outcome: 'dangerous' | 'unreadable';
|
|
609
|
+
interp: string;
|
|
610
|
+
/** "deletes files", "reads its code from a pipe" ... */
|
|
611
|
+
what: string;
|
|
612
|
+
evidence?: string;
|
|
613
|
+
category?: InlineCodeCategory;
|
|
614
|
+
}
|
|
615
|
+
/** What the approval prompt says about an inline-code review. */
|
|
616
|
+
declare function inlineExecDescription(r: InlineExecReview | null | undefined): string;
|
|
617
|
+
/** The approval prompt's reason for an inline-code review. */
|
|
618
|
+
declare function inlineExecReason(r: InlineExecReview): string;
|
|
619
|
+
/**
|
|
620
|
+
* Does the inline code in this command need a review (node9Firewall#385)? Null
|
|
621
|
+
* when every inline call is readable code that does nothing dangerous; else the
|
|
622
|
+
* first dangerous finding, or the first unreadable one when none is dangerous.
|
|
623
|
+
* A command with no inline code returns null.
|
|
624
|
+
*/
|
|
625
|
+
declare function inlineExecReview(command: string): InlineExecReview | null;
|
|
566
626
|
/**
|
|
567
627
|
* True when `path` is under $HOME (~ or absolute /home/* or /root) AND not in
|
|
568
628
|
* the tool-managed cache allow-list. Used to gate `rm -rf` on home paths.
|
|
@@ -773,6 +833,9 @@ interface PolicyConfig {
|
|
|
773
833
|
* shape by hand; the catalog then answers from those knobs.
|
|
774
834
|
*/
|
|
775
835
|
checks?: Record<string, string>;
|
|
836
|
+
/** Where each `checks` value came from (the host's resolution). A pinned,
|
|
837
|
+
* cloud-mandated pack rule follows only a `workspace` value (fw#390). */
|
|
838
|
+
checkSources?: Record<string, 'local' | 'project' | 'workspace'>;
|
|
776
839
|
};
|
|
777
840
|
settings: {
|
|
778
841
|
mode: string;
|
|
@@ -805,6 +868,13 @@ interface PolicyContext extends FileAccessContext {
|
|
|
805
868
|
* trusted host code; absent means the engine scans.
|
|
806
869
|
*/
|
|
807
870
|
argumentScan?: DlpMatch | null;
|
|
871
|
+
/**
|
|
872
|
+
* The MCP server label the host resolved for this call (the gateway's
|
|
873
|
+
* `resolveServerLabel`, the hook's `mcp__<server>__` prefix). Absent: the
|
|
874
|
+
* engine derives it from a namespaced tool name. Scopes rules that set
|
|
875
|
+
* `server` / `notServer` (node9Firewall#390).
|
|
876
|
+
*/
|
|
877
|
+
mcpServer?: string;
|
|
808
878
|
}
|
|
809
879
|
type ProvenanceTrust = 'system' | 'managed' | 'user' | 'suspect' | 'unknown';
|
|
810
880
|
interface ProvenanceLookup {
|
|
@@ -1351,6 +1421,18 @@ declare function classifyShellExposure(command: string): ShellExposure;
|
|
|
1351
1421
|
* vice-versa so authoring is forgiving.
|
|
1352
1422
|
*/
|
|
1353
1423
|
declare function matchesPattern(text: string, patterns: string[] | string): boolean;
|
|
1424
|
+
/** `<server>` from a `mcp__<server>__<tool>` name: the hook's spelling. Same
|
|
1425
|
+
* pattern as the gateway's extractMcpServer. */
|
|
1426
|
+
declare function mcpServerFromToolName(toolName: string): string | undefined;
|
|
1427
|
+
/**
|
|
1428
|
+
* Whether a rule's server scope admits a call (node9Firewall#390). `server`
|
|
1429
|
+
* needs a label that matches; `notServer` refuses a label that matches and
|
|
1430
|
+
* admits a call with none.
|
|
1431
|
+
*/
|
|
1432
|
+
declare function ruleServerMatches(rule: {
|
|
1433
|
+
server?: string;
|
|
1434
|
+
notServer?: string;
|
|
1435
|
+
}, serverLabel: string | undefined): boolean;
|
|
1354
1436
|
/**
|
|
1355
1437
|
* Reads `obj.a.b.c` style nested keys. Returns null when any segment is
|
|
1356
1438
|
* missing, the parent isn't an object, or the path attempts to walk the
|
|
@@ -1402,6 +1484,43 @@ declare function stripControlChars(s: string): string;
|
|
|
1402
1484
|
*/
|
|
1403
1485
|
declare function safeMessage(value: unknown, max?: number): string;
|
|
1404
1486
|
|
|
1487
|
+
interface ApprovalRow {
|
|
1488
|
+
/** The rule or label the review carried (`shield:stripe:review-refund`, or
|
|
1489
|
+
* `Smart Rule: shield:stripe:review-refund`). */
|
|
1490
|
+
ruleName: string;
|
|
1491
|
+
decision: 'approved' | 'denied';
|
|
1492
|
+
sessionId?: string;
|
|
1493
|
+
/** The MCP server label, when the call came through one. */
|
|
1494
|
+
server?: string;
|
|
1495
|
+
}
|
|
1496
|
+
type Suggestion = {
|
|
1497
|
+
kind: 'quiet-rule';
|
|
1498
|
+
ruleName: string;
|
|
1499
|
+
shield: string;
|
|
1500
|
+
/** The rule's part after the shield (`review-refund`). */
|
|
1501
|
+
rule: string;
|
|
1502
|
+
/** Its pack row in the checks catalog (`packs.stripe.refund`). */
|
|
1503
|
+
checkId: string;
|
|
1504
|
+
approvals: number;
|
|
1505
|
+
sessions: number;
|
|
1506
|
+
} | {
|
|
1507
|
+
kind: 'link-server';
|
|
1508
|
+
server: string;
|
|
1509
|
+
/** The general check that asked (`actions.money`). */
|
|
1510
|
+
checkId: string;
|
|
1511
|
+
approvals: number;
|
|
1512
|
+
sessions: number;
|
|
1513
|
+
};
|
|
1514
|
+
interface SuggestOptions {
|
|
1515
|
+
minApprovals?: number;
|
|
1516
|
+
minSessions?: number;
|
|
1517
|
+
}
|
|
1518
|
+
/** `Smart Rule: shield:x:y` and the other wrapping labels -> `shield:x:y`;
|
|
1519
|
+
* anything else is returned as it is. The catalog's own reading, so a rule
|
|
1520
|
+
* name that only contains a shield-like part is not taken for one. */
|
|
1521
|
+
declare function unwrapRuleLabel(label: string): string;
|
|
1522
|
+
declare function suggestFromApprovals(rows: readonly ApprovalRow[], opts?: SuggestOptions): Suggestion[];
|
|
1523
|
+
|
|
1405
1524
|
interface ShieldDefinition {
|
|
1406
1525
|
name: string;
|
|
1407
1526
|
description: string;
|
|
@@ -1433,16 +1552,44 @@ declare function validateOverrides(raw: unknown): {
|
|
|
1433
1552
|
warnings: string[];
|
|
1434
1553
|
};
|
|
1435
1554
|
/**
|
|
1436
|
-
* The
|
|
1555
|
+
* The shields shipped with node9. User shields installed at
|
|
1437
1556
|
* ~/.node9/shields/*.json are merged on top of these by the host.
|
|
1438
1557
|
*/
|
|
1439
1558
|
declare const BUILTIN_SHIELDS: Record<string, ShieldDefinition>;
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1559
|
+
|
|
1560
|
+
type ActionTemplateName = 'finance' | 'identity' | 'publishing';
|
|
1561
|
+
declare const ACTION_TEMPLATES: Readonly<Record<ActionTemplateName, readonly SmartRule[]>>;
|
|
1562
|
+
/** The general check each template feeds, and the word its rules carry. */
|
|
1563
|
+
declare const ACTION_CHECKS: Readonly<Record<ActionTemplateName, {
|
|
1564
|
+
checkId: string;
|
|
1565
|
+
slug: string;
|
|
1566
|
+
label: string;
|
|
1567
|
+
}>>;
|
|
1568
|
+
interface AppShieldSpec {
|
|
1569
|
+
name: string;
|
|
1570
|
+
label: string;
|
|
1571
|
+
description: string;
|
|
1572
|
+
template: ActionTemplateName;
|
|
1573
|
+
/** Glob for the app's MCP server label (case-insensitive). */
|
|
1574
|
+
server: string;
|
|
1575
|
+
/** The app's other doors, as bash rules (the code door is a session script
|
|
1576
|
+
* judged as a Bash command, so it is a bash rule too). */
|
|
1577
|
+
doors: SmartRule[];
|
|
1578
|
+
/** Tools of the vendor's own MCP server that the template's names miss
|
|
1579
|
+
* (Square's single make_api_request); scoped to the server like the
|
|
1580
|
+
* template's. */
|
|
1581
|
+
mcpTools?: SmartRule[];
|
|
1582
|
+
}
|
|
1583
|
+
declare const APP_SHIELD_SPECS: readonly AppShieldSpec[];
|
|
1584
|
+
/** The app shields' names. node9 turns one on when it finds the app; a history
|
|
1585
|
+
* scan with no hit for it does not pitch it. */
|
|
1586
|
+
declare const APP_SHIELD_NAMES: ReadonlySet<string>;
|
|
1587
|
+
/** Every MCP server an app shield claims, as one glob: `{*stripe*,*paypal*}`. */
|
|
1588
|
+
declare const APP_SERVER_GLOB: string;
|
|
1589
|
+
declare const GENERAL_ACTION_RULES: readonly SmartRule[];
|
|
1590
|
+
/** The three shields 2.37.0 shipped and this release replaces, with what to
|
|
1591
|
+
* use instead. `node9 shield enable finance` answers with this. */
|
|
1592
|
+
declare const REPLACED_SHIELDS: Readonly<Record<string, string>>;
|
|
1446
1593
|
|
|
1447
1594
|
interface ToolCallRecord {
|
|
1448
1595
|
/** tool name */
|
|
@@ -2063,7 +2210,7 @@ declare const LONG_OUTPUT_THRESHOLD_BYTES: number;
|
|
|
2063
2210
|
* and fails CI when the hash drifts without a version bump — forgetting
|
|
2064
2211
|
* is loud, not silent.
|
|
2065
2212
|
*/
|
|
2066
|
-
declare const CANONICAL_EXTRACTOR_VERSION = "canonical-
|
|
2213
|
+
declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v30";
|
|
2067
2214
|
/**
|
|
2068
2215
|
* SHA-256 prefix of the detector-source files
|
|
2069
2216
|
* (canonical.ts + pii.ts + destructive-regex.ts).
|
|
@@ -2074,7 +2221,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v29";
|
|
|
2074
2221
|
* files changed, this hash must change too, and you must consciously
|
|
2075
2222
|
* decide whether to bump CANONICAL_EXTRACTOR_VERSION."
|
|
2076
2223
|
*/
|
|
2077
|
-
declare const CANONICAL_EXTRACTOR_HASH = "
|
|
2224
|
+
declare const CANONICAL_EXTRACTOR_HASH = "d55f1f9e5bee7e41";
|
|
2078
2225
|
declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
|
|
2079
2226
|
declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
|
|
2080
2227
|
/**
|
|
@@ -2186,5 +2333,5 @@ declare function scanArgumentSecrets(args: unknown): DlpMatch | null;
|
|
|
2186
2333
|
/** Engine version stamped on audit entries for future drift detection. */
|
|
2187
2334
|
declare const ENGINE_VERSION = "1.4.0";
|
|
2188
2335
|
|
|
2189
|
-
export {
|
|
2190
|
-
export type { 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, InjectionConfidence, InjectionContext, InjectionMatch, InspectionInput, InspectionLayers, LegacyPolicyKnobs, LoopWindowEvaluation, 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, ToolCallEntry, ToolCallRecord, ToolInspection, ToolInspectionEntry, TuningField, Verdict };
|
|
2336
|
+
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, LONG_OUTPUT_THRESHOLD_BYTES, LOOP_MAX_RECORDS, LOOP_THRESHOLD_FOR_WASTE, MAP_GOVERNED, MAX_BLAST_PATH, MAX_DESTINATIONS, 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, analyzeFsOperation, 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, gitRepoPath, hashDestination, hostMatches, incompleteFileVerdict, inlineExecDescription, inlineExecReason, inlineExecReview, inspectArgumentSecrets, inspectionEntry, inspectionLayers, isAgentInstructionPath, isBashTool, isDestructiveToolName, isHashedEntry, isIgnoredTool, isInside, isKnobGoverned, isLegacySystemPath, isLockedCheck, isLoopbackHost, isMaskedKind, isPasswordHashPath, isPrivateHost, isProtectedHomePath, isShellShapedTool, isShieldVerdict, isStrictGatedTier, isVerdict, 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, ruleServerMatches, safeMessage, sampleCopyCommand, scanArgs, scanArgumentSecrets, scanInjection, 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 };
|
|
2337
|
+
export type { ActionTemplateName, 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, InjectionConfidence, InjectionContext, InjectionMatch, InlineExecReview, InspectionInput, InspectionLayers, LegacyPolicyKnobs, LoopWindowEvaluation, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,13 @@ interface SmartCondition {
|
|
|
13
13
|
op: 'matches' | 'notMatches' | 'contains' | 'notContains' | 'exists' | 'notExists' | 'matchesGlob' | 'notMatchesGlob';
|
|
14
14
|
value?: string;
|
|
15
15
|
flags?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Which reading of a `command` field the regex ops test. Absent: the whole
|
|
18
|
+
* command text. 'access': the command as a file-access rule sees it, without
|
|
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).
|
|
21
|
+
*/
|
|
22
|
+
reading?: 'access';
|
|
16
23
|
}
|
|
17
24
|
/**
|
|
18
25
|
* A user-defined or shield-defined rule. The matcher applies it to a
|
|
@@ -26,6 +33,20 @@ interface SmartCondition {
|
|
|
26
33
|
interface SmartRule {
|
|
27
34
|
name?: string;
|
|
28
35
|
tool: string;
|
|
36
|
+
/**
|
|
37
|
+
* Glob (case-insensitive) the call's MCP server label must match: the
|
|
38
|
+
* gateway's resolved label, or `<server>` from a `mcp__<server>__<tool>`
|
|
39
|
+
* name. A call with no label (a shell command, a bare tool name) never
|
|
40
|
+
* matches a rule that sets this. Lets an app's shield say "only Stripe's
|
|
41
|
+
* create_refund", not every server's (node9Firewall#390).
|
|
42
|
+
*/
|
|
43
|
+
server?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Glob the call's MCP server label must NOT match. A call with no label
|
|
46
|
+
* passes. The general action checks use it to stay off a server an app
|
|
47
|
+
* shield claims, so turning that shield off makes the app quiet.
|
|
48
|
+
*/
|
|
49
|
+
notServer?: string;
|
|
29
50
|
conditions: SmartCondition[];
|
|
30
51
|
conditionMode?: 'all' | 'any';
|
|
31
52
|
verdict: 'allow' | 'review' | 'block';
|
|
@@ -257,7 +278,7 @@ declare const VERDICTS: readonly Verdict[];
|
|
|
257
278
|
declare const CHECK_VERDICT_RANK: Record<Verdict, number>;
|
|
258
279
|
declare function isVerdict(v: unknown): v is Verdict;
|
|
259
280
|
/** Groups are by what the user fears, not by the mechanism that catches it. */
|
|
260
|
-
type CheckGroup = 'commands' | 'data' | 'network' | 'files' | 'behavior' | 'loading';
|
|
281
|
+
type CheckGroup = 'commands' | 'data' | 'network' | 'files' | 'behavior' | 'loading' | 'actions';
|
|
261
282
|
declare const CHECK_GROUPS: readonly {
|
|
262
283
|
id: CheckGroup;
|
|
263
284
|
title: string;
|
|
@@ -433,11 +454,29 @@ interface FileAccessContext {
|
|
|
433
454
|
accesses?: FileAccess[];
|
|
434
455
|
}
|
|
435
456
|
|
|
457
|
+
type InlineCodeCategory = 'deletes' | 'writes-outside' | 'sends' | 'listens' | 'runs-commands' | 'reads-protected' | 'builds-code' | 'permissions' | 'monitors' | 'amplifies';
|
|
458
|
+
|
|
436
459
|
/**
|
|
437
460
|
* The POSIX reading of a command. Kept as the single-string API every existing
|
|
438
461
|
* caller (canonical.ts, the detectors, `explain`) already depends on.
|
|
439
462
|
*/
|
|
440
463
|
declare function normalizeCommandForPolicy(command: string): string;
|
|
464
|
+
/**
|
|
465
|
+
* The command as a file-access rule sees it (node9Firewall#385). A jail of
|
|
466
|
+
* /usr or /bin must not meet `#!/usr/bin/env bash` or `/usr/bin/python3 app.py`:
|
|
467
|
+
* the interpreter line names the program that runs the script and the program
|
|
468
|
+
* path names what runs; neither is a file the command reads. So the clean
|
|
469
|
+
* interpreter line on the first line is dropped, and the program word of each
|
|
470
|
+
* command (after `sudo`, `env` and the other wrappers) is cut to its name.
|
|
471
|
+
* Every argument and redirect stays, so `cat /usr/share/x`, `bash /etc/x.sh`
|
|
472
|
+
* (the script is read) and `wc < /etc/hosts` still meet the jail.
|
|
473
|
+
*
|
|
474
|
+
* Only a program in a system program directory, or a relative one, is cut
|
|
475
|
+
* (PROGRAM_DIR): a script run from a jailed directory keeps its path and still
|
|
476
|
+
* meets the jail. An unparsable command is returned unchanged (the strict
|
|
477
|
+
* direction for a jail).
|
|
478
|
+
*/
|
|
479
|
+
declare function fileAccessView(command: string): string;
|
|
441
480
|
/**
|
|
442
481
|
* AST-based detection of dangerous shell execution patterns.
|
|
443
482
|
*
|
|
@@ -559,10 +598,31 @@ declare function unwrapCommandHead(words: (string | null)[], stopAtFind?: boolea
|
|
|
559
598
|
/**
|
|
560
599
|
* AST-aware inline-execution detector. Returns true when the command runs code
|
|
561
600
|
* supplied on the command line, via stdin, or via a pipe into a bare
|
|
562
|
-
* interpreter. Structural, so it is not fooled by
|
|
563
|
-
* bundles, or wrapper nesting. Pure.
|
|
601
|
+
* interpreter, whatever the code does. Structural, so it is not fooled by
|
|
602
|
+
* quoting, escapes, option bundles, or wrapper nesting. Pure. Strict mode asks
|
|
603
|
+
* on this; every other mode asks on inlineExecReview.
|
|
564
604
|
*/
|
|
565
605
|
declare function detectInlineExec(command: string): boolean;
|
|
606
|
+
/** Why a command's inline code needs a review: what it does, in which language. */
|
|
607
|
+
interface InlineExecReview {
|
|
608
|
+
outcome: 'dangerous' | 'unreadable';
|
|
609
|
+
interp: string;
|
|
610
|
+
/** "deletes files", "reads its code from a pipe" ... */
|
|
611
|
+
what: string;
|
|
612
|
+
evidence?: string;
|
|
613
|
+
category?: InlineCodeCategory;
|
|
614
|
+
}
|
|
615
|
+
/** What the approval prompt says about an inline-code review. */
|
|
616
|
+
declare function inlineExecDescription(r: InlineExecReview | null | undefined): string;
|
|
617
|
+
/** The approval prompt's reason for an inline-code review. */
|
|
618
|
+
declare function inlineExecReason(r: InlineExecReview): string;
|
|
619
|
+
/**
|
|
620
|
+
* Does the inline code in this command need a review (node9Firewall#385)? Null
|
|
621
|
+
* when every inline call is readable code that does nothing dangerous; else the
|
|
622
|
+
* first dangerous finding, or the first unreadable one when none is dangerous.
|
|
623
|
+
* A command with no inline code returns null.
|
|
624
|
+
*/
|
|
625
|
+
declare function inlineExecReview(command: string): InlineExecReview | null;
|
|
566
626
|
/**
|
|
567
627
|
* True when `path` is under $HOME (~ or absolute /home/* or /root) AND not in
|
|
568
628
|
* the tool-managed cache allow-list. Used to gate `rm -rf` on home paths.
|
|
@@ -773,6 +833,9 @@ interface PolicyConfig {
|
|
|
773
833
|
* shape by hand; the catalog then answers from those knobs.
|
|
774
834
|
*/
|
|
775
835
|
checks?: Record<string, string>;
|
|
836
|
+
/** Where each `checks` value came from (the host's resolution). A pinned,
|
|
837
|
+
* cloud-mandated pack rule follows only a `workspace` value (fw#390). */
|
|
838
|
+
checkSources?: Record<string, 'local' | 'project' | 'workspace'>;
|
|
776
839
|
};
|
|
777
840
|
settings: {
|
|
778
841
|
mode: string;
|
|
@@ -805,6 +868,13 @@ interface PolicyContext extends FileAccessContext {
|
|
|
805
868
|
* trusted host code; absent means the engine scans.
|
|
806
869
|
*/
|
|
807
870
|
argumentScan?: DlpMatch | null;
|
|
871
|
+
/**
|
|
872
|
+
* The MCP server label the host resolved for this call (the gateway's
|
|
873
|
+
* `resolveServerLabel`, the hook's `mcp__<server>__` prefix). Absent: the
|
|
874
|
+
* engine derives it from a namespaced tool name. Scopes rules that set
|
|
875
|
+
* `server` / `notServer` (node9Firewall#390).
|
|
876
|
+
*/
|
|
877
|
+
mcpServer?: string;
|
|
808
878
|
}
|
|
809
879
|
type ProvenanceTrust = 'system' | 'managed' | 'user' | 'suspect' | 'unknown';
|
|
810
880
|
interface ProvenanceLookup {
|
|
@@ -1351,6 +1421,18 @@ declare function classifyShellExposure(command: string): ShellExposure;
|
|
|
1351
1421
|
* vice-versa so authoring is forgiving.
|
|
1352
1422
|
*/
|
|
1353
1423
|
declare function matchesPattern(text: string, patterns: string[] | string): boolean;
|
|
1424
|
+
/** `<server>` from a `mcp__<server>__<tool>` name: the hook's spelling. Same
|
|
1425
|
+
* pattern as the gateway's extractMcpServer. */
|
|
1426
|
+
declare function mcpServerFromToolName(toolName: string): string | undefined;
|
|
1427
|
+
/**
|
|
1428
|
+
* Whether a rule's server scope admits a call (node9Firewall#390). `server`
|
|
1429
|
+
* needs a label that matches; `notServer` refuses a label that matches and
|
|
1430
|
+
* admits a call with none.
|
|
1431
|
+
*/
|
|
1432
|
+
declare function ruleServerMatches(rule: {
|
|
1433
|
+
server?: string;
|
|
1434
|
+
notServer?: string;
|
|
1435
|
+
}, serverLabel: string | undefined): boolean;
|
|
1354
1436
|
/**
|
|
1355
1437
|
* Reads `obj.a.b.c` style nested keys. Returns null when any segment is
|
|
1356
1438
|
* missing, the parent isn't an object, or the path attempts to walk the
|
|
@@ -1402,6 +1484,43 @@ declare function stripControlChars(s: string): string;
|
|
|
1402
1484
|
*/
|
|
1403
1485
|
declare function safeMessage(value: unknown, max?: number): string;
|
|
1404
1486
|
|
|
1487
|
+
interface ApprovalRow {
|
|
1488
|
+
/** The rule or label the review carried (`shield:stripe:review-refund`, or
|
|
1489
|
+
* `Smart Rule: shield:stripe:review-refund`). */
|
|
1490
|
+
ruleName: string;
|
|
1491
|
+
decision: 'approved' | 'denied';
|
|
1492
|
+
sessionId?: string;
|
|
1493
|
+
/** The MCP server label, when the call came through one. */
|
|
1494
|
+
server?: string;
|
|
1495
|
+
}
|
|
1496
|
+
type Suggestion = {
|
|
1497
|
+
kind: 'quiet-rule';
|
|
1498
|
+
ruleName: string;
|
|
1499
|
+
shield: string;
|
|
1500
|
+
/** The rule's part after the shield (`review-refund`). */
|
|
1501
|
+
rule: string;
|
|
1502
|
+
/** Its pack row in the checks catalog (`packs.stripe.refund`). */
|
|
1503
|
+
checkId: string;
|
|
1504
|
+
approvals: number;
|
|
1505
|
+
sessions: number;
|
|
1506
|
+
} | {
|
|
1507
|
+
kind: 'link-server';
|
|
1508
|
+
server: string;
|
|
1509
|
+
/** The general check that asked (`actions.money`). */
|
|
1510
|
+
checkId: string;
|
|
1511
|
+
approvals: number;
|
|
1512
|
+
sessions: number;
|
|
1513
|
+
};
|
|
1514
|
+
interface SuggestOptions {
|
|
1515
|
+
minApprovals?: number;
|
|
1516
|
+
minSessions?: number;
|
|
1517
|
+
}
|
|
1518
|
+
/** `Smart Rule: shield:x:y` and the other wrapping labels -> `shield:x:y`;
|
|
1519
|
+
* anything else is returned as it is. The catalog's own reading, so a rule
|
|
1520
|
+
* name that only contains a shield-like part is not taken for one. */
|
|
1521
|
+
declare function unwrapRuleLabel(label: string): string;
|
|
1522
|
+
declare function suggestFromApprovals(rows: readonly ApprovalRow[], opts?: SuggestOptions): Suggestion[];
|
|
1523
|
+
|
|
1405
1524
|
interface ShieldDefinition {
|
|
1406
1525
|
name: string;
|
|
1407
1526
|
description: string;
|
|
@@ -1433,16 +1552,44 @@ declare function validateOverrides(raw: unknown): {
|
|
|
1433
1552
|
warnings: string[];
|
|
1434
1553
|
};
|
|
1435
1554
|
/**
|
|
1436
|
-
* The
|
|
1555
|
+
* The shields shipped with node9. User shields installed at
|
|
1437
1556
|
* ~/.node9/shields/*.json are merged on top of these by the host.
|
|
1438
1557
|
*/
|
|
1439
1558
|
declare const BUILTIN_SHIELDS: Record<string, ShieldDefinition>;
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1559
|
+
|
|
1560
|
+
type ActionTemplateName = 'finance' | 'identity' | 'publishing';
|
|
1561
|
+
declare const ACTION_TEMPLATES: Readonly<Record<ActionTemplateName, readonly SmartRule[]>>;
|
|
1562
|
+
/** The general check each template feeds, and the word its rules carry. */
|
|
1563
|
+
declare const ACTION_CHECKS: Readonly<Record<ActionTemplateName, {
|
|
1564
|
+
checkId: string;
|
|
1565
|
+
slug: string;
|
|
1566
|
+
label: string;
|
|
1567
|
+
}>>;
|
|
1568
|
+
interface AppShieldSpec {
|
|
1569
|
+
name: string;
|
|
1570
|
+
label: string;
|
|
1571
|
+
description: string;
|
|
1572
|
+
template: ActionTemplateName;
|
|
1573
|
+
/** Glob for the app's MCP server label (case-insensitive). */
|
|
1574
|
+
server: string;
|
|
1575
|
+
/** The app's other doors, as bash rules (the code door is a session script
|
|
1576
|
+
* judged as a Bash command, so it is a bash rule too). */
|
|
1577
|
+
doors: SmartRule[];
|
|
1578
|
+
/** Tools of the vendor's own MCP server that the template's names miss
|
|
1579
|
+
* (Square's single make_api_request); scoped to the server like the
|
|
1580
|
+
* template's. */
|
|
1581
|
+
mcpTools?: SmartRule[];
|
|
1582
|
+
}
|
|
1583
|
+
declare const APP_SHIELD_SPECS: readonly AppShieldSpec[];
|
|
1584
|
+
/** The app shields' names. node9 turns one on when it finds the app; a history
|
|
1585
|
+
* scan with no hit for it does not pitch it. */
|
|
1586
|
+
declare const APP_SHIELD_NAMES: ReadonlySet<string>;
|
|
1587
|
+
/** Every MCP server an app shield claims, as one glob: `{*stripe*,*paypal*}`. */
|
|
1588
|
+
declare const APP_SERVER_GLOB: string;
|
|
1589
|
+
declare const GENERAL_ACTION_RULES: readonly SmartRule[];
|
|
1590
|
+
/** The three shields 2.37.0 shipped and this release replaces, with what to
|
|
1591
|
+
* use instead. `node9 shield enable finance` answers with this. */
|
|
1592
|
+
declare const REPLACED_SHIELDS: Readonly<Record<string, string>>;
|
|
1446
1593
|
|
|
1447
1594
|
interface ToolCallRecord {
|
|
1448
1595
|
/** tool name */
|
|
@@ -2063,7 +2210,7 @@ declare const LONG_OUTPUT_THRESHOLD_BYTES: number;
|
|
|
2063
2210
|
* and fails CI when the hash drifts without a version bump — forgetting
|
|
2064
2211
|
* is loud, not silent.
|
|
2065
2212
|
*/
|
|
2066
|
-
declare const CANONICAL_EXTRACTOR_VERSION = "canonical-
|
|
2213
|
+
declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v30";
|
|
2067
2214
|
/**
|
|
2068
2215
|
* SHA-256 prefix of the detector-source files
|
|
2069
2216
|
* (canonical.ts + pii.ts + destructive-regex.ts).
|
|
@@ -2074,7 +2221,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v29";
|
|
|
2074
2221
|
* files changed, this hash must change too, and you must consciously
|
|
2075
2222
|
* decide whether to bump CANONICAL_EXTRACTOR_VERSION."
|
|
2076
2223
|
*/
|
|
2077
|
-
declare const CANONICAL_EXTRACTOR_HASH = "
|
|
2224
|
+
declare const CANONICAL_EXTRACTOR_HASH = "d55f1f9e5bee7e41";
|
|
2078
2225
|
declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
|
|
2079
2226
|
declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
|
|
2080
2227
|
/**
|
|
@@ -2186,5 +2333,5 @@ declare function scanArgumentSecrets(args: unknown): DlpMatch | null;
|
|
|
2186
2333
|
/** Engine version stamped on audit entries for future drift detection. */
|
|
2187
2334
|
declare const ENGINE_VERSION = "1.4.0";
|
|
2188
2335
|
|
|
2189
|
-
export {
|
|
2190
|
-
export type { 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, InjectionConfidence, InjectionContext, InjectionMatch, InspectionInput, InspectionLayers, LegacyPolicyKnobs, LoopWindowEvaluation, 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, ToolCallEntry, ToolCallRecord, ToolInspection, ToolInspectionEntry, TuningField, Verdict };
|
|
2336
|
+
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, LONG_OUTPUT_THRESHOLD_BYTES, LOOP_MAX_RECORDS, LOOP_THRESHOLD_FOR_WASTE, MAP_GOVERNED, MAX_BLAST_PATH, MAX_DESTINATIONS, 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, analyzeFsOperation, 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, gitRepoPath, hashDestination, hostMatches, incompleteFileVerdict, inlineExecDescription, inlineExecReason, inlineExecReview, inspectArgumentSecrets, inspectionEntry, inspectionLayers, isAgentInstructionPath, isBashTool, isDestructiveToolName, isHashedEntry, isIgnoredTool, isInside, isKnobGoverned, isLegacySystemPath, isLockedCheck, isLoopbackHost, isMaskedKind, isPasswordHashPath, isPrivateHost, isProtectedHomePath, isShellShapedTool, isShieldVerdict, isStrictGatedTier, isVerdict, 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, ruleServerMatches, safeMessage, sampleCopyCommand, scanArgs, scanArgumentSecrets, scanInjection, 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 };
|
|
2337
|
+
export type { ActionTemplateName, 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, InjectionConfidence, InjectionContext, InjectionMatch, InlineExecReview, InspectionInput, InspectionLayers, LegacyPolicyKnobs, LoopWindowEvaluation, 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 };
|