@node9/policy-engine 2.36.0 → 2.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +310 -0
- package/dist/index.mjs +309 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1433,10 +1433,16 @@ declare function validateOverrides(raw: unknown): {
|
|
|
1433
1433
|
warnings: string[];
|
|
1434
1434
|
};
|
|
1435
1435
|
/**
|
|
1436
|
-
* The
|
|
1436
|
+
* The 13 shields shipped with node9. User shields installed at
|
|
1437
1437
|
* ~/.node9/shields/*.json are merged on top of these by the host.
|
|
1438
1438
|
*/
|
|
1439
1439
|
declare const BUILTIN_SHIELDS: Record<string, ShieldDefinition>;
|
|
1440
|
+
/**
|
|
1441
|
+
* The category shields for dangerous actions on MCP apps (node9Firewall#385):
|
|
1442
|
+
* enabled from the Apps page for the apps a user connects, not recommended by
|
|
1443
|
+
* a repository or history scan, which has nothing to say about them.
|
|
1444
|
+
*/
|
|
1445
|
+
declare const ACTION_SHIELD_NAMES: ReadonlySet<string>;
|
|
1440
1446
|
|
|
1441
1447
|
interface ToolCallRecord {
|
|
1442
1448
|
/** tool name */
|
|
@@ -2180,5 +2186,5 @@ declare function scanArgumentSecrets(args: unknown): DlpMatch | null;
|
|
|
2180
2186
|
/** Engine version stamped on audit entries for future drift detection. */
|
|
2181
2187
|
declare const ENGINE_VERSION = "1.4.0";
|
|
2182
2188
|
|
|
2183
|
-
export { AGENT_INSTRUCTION_DIRS, AGENT_INSTRUCTION_FILES, 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, 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, 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, fileOperandFlagsOf, fileToolOperation, foldHomoglyphs, getCheck, getCompiledRegex, getNestedValue, gitRepoPath, hashDestination, hostMatches, incompleteFileVerdict, 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, narrativeRuleLabel, normalizeCommandForPolicy, normalizeDestination, normalizeFilePath, normalizeForScan, normalizeIpLiteral, normalizePyPiName, normalizeRecipient, normalizeTrustedEntry, parseAllSshHostsFromCommand, parseDestHost, patternShapeOf, positionedArgs, previewArgs, redactText, resolveAllChecks, resolveCheck, resolveCheckMap, resolvePinned, resolveShellInput, safeMessage, sampleCopyCommand, scanArgs, scanArgumentSecrets, scanInjection, scanText, scanViews, sensitivePathMatch, shellRuleArgs, shellScriptOperands, ssrfCheckId, ssrfDestinationFloor, ssrfExemptMatches, ssrfFloor, ssrfReason, stripControlChars, stripInvisible, stripTerminalEscapes, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, trustedEntryOf, tuningFromLegacyPolicy, tuningToLegacyPolicy, unwrapCommandHead, validateOverrides, validateRegex, validateShieldDefinition };
|
|
2189
|
+
export { ACTION_SHIELD_NAMES, AGENT_INSTRUCTION_DIRS, AGENT_INSTRUCTION_FILES, 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, 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, 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, fileOperandFlagsOf, fileToolOperation, foldHomoglyphs, getCheck, getCompiledRegex, getNestedValue, gitRepoPath, hashDestination, hostMatches, incompleteFileVerdict, 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, narrativeRuleLabel, normalizeCommandForPolicy, normalizeDestination, normalizeFilePath, normalizeForScan, normalizeIpLiteral, normalizePyPiName, normalizeRecipient, normalizeTrustedEntry, parseAllSshHostsFromCommand, parseDestHost, patternShapeOf, positionedArgs, previewArgs, redactText, resolveAllChecks, resolveCheck, resolveCheckMap, resolvePinned, resolveShellInput, safeMessage, sampleCopyCommand, scanArgs, scanArgumentSecrets, scanInjection, scanText, scanViews, sensitivePathMatch, shellRuleArgs, shellScriptOperands, ssrfCheckId, ssrfDestinationFloor, ssrfExemptMatches, ssrfFloor, ssrfReason, stripControlChars, stripInvisible, stripTerminalEscapes, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, trustedEntryOf, tuningFromLegacyPolicy, tuningToLegacyPolicy, unwrapCommandHead, validateOverrides, validateRegex, validateShieldDefinition };
|
|
2184
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1433,10 +1433,16 @@ declare function validateOverrides(raw: unknown): {
|
|
|
1433
1433
|
warnings: string[];
|
|
1434
1434
|
};
|
|
1435
1435
|
/**
|
|
1436
|
-
* The
|
|
1436
|
+
* The 13 shields shipped with node9. User shields installed at
|
|
1437
1437
|
* ~/.node9/shields/*.json are merged on top of these by the host.
|
|
1438
1438
|
*/
|
|
1439
1439
|
declare const BUILTIN_SHIELDS: Record<string, ShieldDefinition>;
|
|
1440
|
+
/**
|
|
1441
|
+
* The category shields for dangerous actions on MCP apps (node9Firewall#385):
|
|
1442
|
+
* enabled from the Apps page for the apps a user connects, not recommended by
|
|
1443
|
+
* a repository or history scan, which has nothing to say about them.
|
|
1444
|
+
*/
|
|
1445
|
+
declare const ACTION_SHIELD_NAMES: ReadonlySet<string>;
|
|
1440
1446
|
|
|
1441
1447
|
interface ToolCallRecord {
|
|
1442
1448
|
/** tool name */
|
|
@@ -2180,5 +2186,5 @@ declare function scanArgumentSecrets(args: unknown): DlpMatch | null;
|
|
|
2180
2186
|
/** Engine version stamped on audit entries for future drift detection. */
|
|
2181
2187
|
declare const ENGINE_VERSION = "1.4.0";
|
|
2182
2188
|
|
|
2183
|
-
export { AGENT_INSTRUCTION_DIRS, AGENT_INSTRUCTION_FILES, 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, 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, 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, fileOperandFlagsOf, fileToolOperation, foldHomoglyphs, getCheck, getCompiledRegex, getNestedValue, gitRepoPath, hashDestination, hostMatches, incompleteFileVerdict, 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, narrativeRuleLabel, normalizeCommandForPolicy, normalizeDestination, normalizeFilePath, normalizeForScan, normalizeIpLiteral, normalizePyPiName, normalizeRecipient, normalizeTrustedEntry, parseAllSshHostsFromCommand, parseDestHost, patternShapeOf, positionedArgs, previewArgs, redactText, resolveAllChecks, resolveCheck, resolveCheckMap, resolvePinned, resolveShellInput, safeMessage, sampleCopyCommand, scanArgs, scanArgumentSecrets, scanInjection, scanText, scanViews, sensitivePathMatch, shellRuleArgs, shellScriptOperands, ssrfCheckId, ssrfDestinationFloor, ssrfExemptMatches, ssrfFloor, ssrfReason, stripControlChars, stripInvisible, stripTerminalEscapes, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, trustedEntryOf, tuningFromLegacyPolicy, tuningToLegacyPolicy, unwrapCommandHead, validateOverrides, validateRegex, validateShieldDefinition };
|
|
2189
|
+
export { ACTION_SHIELD_NAMES, AGENT_INSTRUCTION_DIRS, AGENT_INSTRUCTION_FILES, 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, 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, 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, fileOperandFlagsOf, fileToolOperation, foldHomoglyphs, getCheck, getCompiledRegex, getNestedValue, gitRepoPath, hashDestination, hostMatches, incompleteFileVerdict, 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, narrativeRuleLabel, normalizeCommandForPolicy, normalizeDestination, normalizeFilePath, normalizeForScan, normalizeIpLiteral, normalizePyPiName, normalizeRecipient, normalizeTrustedEntry, parseAllSshHostsFromCommand, parseDestHost, patternShapeOf, positionedArgs, previewArgs, redactText, resolveAllChecks, resolveCheck, resolveCheckMap, resolvePinned, resolveShellInput, safeMessage, sampleCopyCommand, scanArgs, scanArgumentSecrets, scanInjection, scanText, scanViews, sensitivePathMatch, shellRuleArgs, shellScriptOperands, ssrfCheckId, ssrfDestinationFloor, ssrfExemptMatches, ssrfFloor, ssrfReason, stripControlChars, stripInvisible, stripTerminalEscapes, summarizeBlast, summarizeScan, toScanFinding, toolMatchesRule, truncateBlastPath, trustedEntryOf, tuningFromLegacyPolicy, tuningToLegacyPolicy, unwrapCommandHead, validateOverrides, validateRegex, validateShieldDefinition };
|
|
2184
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 };
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
|
+
ACTION_SHIELD_NAMES: () => ACTION_SHIELD_NAMES,
|
|
33
34
|
AGENT_INSTRUCTION_DIRS: () => AGENT_INSTRUCTION_DIRS,
|
|
34
35
|
AGENT_INSTRUCTION_FILES: () => AGENT_INSTRUCTION_FILES,
|
|
35
36
|
ARGUMENT_SCAN_LIMITS: () => ARGUMENT_SCAN_LIMITS,
|
|
@@ -537,6 +538,79 @@ var filesystem_default = {
|
|
|
537
538
|
dangerousWords: ["wipefs"]
|
|
538
539
|
};
|
|
539
540
|
|
|
541
|
+
// src/shields/builtin/finance.json
|
|
542
|
+
var finance_default = {
|
|
543
|
+
name: "finance",
|
|
544
|
+
description: "Asks before money moves through a payment or banking app (refunds, payouts, transfers, charges, invoices), whatever the request said. Reads are never asked about.",
|
|
545
|
+
aliases: ["payments", "money"],
|
|
546
|
+
smartRules: [
|
|
547
|
+
{
|
|
548
|
+
name: "shield:finance:review-refund",
|
|
549
|
+
tool: "{,mcp__*__}{create_refund,refund_payment,refund_charge,refund_order,issue_refund}",
|
|
550
|
+
conditions: [],
|
|
551
|
+
verdict: "review",
|
|
552
|
+
reason: "A refund returns money to a customer. node9 asks before money moves, whatever the request said (Finance shield)."
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
name: "shield:finance:review-payout",
|
|
556
|
+
tool: "{,mcp__*__}{create_payout,send_payout,payout,create_payouts_batch}",
|
|
557
|
+
conditions: [],
|
|
558
|
+
verdict: "review",
|
|
559
|
+
reason: "A payout moves the balance to a bank account. node9 asks before money moves (Finance shield)."
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
name: "shield:finance:review-transfer",
|
|
563
|
+
tool: "{,mcp__*__}{transfer_create,transfer_authorization_create,create_transfer,transfer_money,transfer_funds,send_money,wire_transfer,create_wire,schedule_transaction,update_scheduled_transaction,create_transaction}",
|
|
564
|
+
conditions: [],
|
|
565
|
+
verdict: "review",
|
|
566
|
+
reason: "A transfer moves money between accounts. node9 asks before money moves (Finance shield)."
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
name: "shield:finance:review-charge",
|
|
570
|
+
tool: "{,mcp__*__}{create_payment_intent,confirm_payment_intent,capture_payment_intent,create_charge,create_payment,capture_payment,capture_order,create_order,authorize_order,create_checkout_session}",
|
|
571
|
+
conditions: [],
|
|
572
|
+
verdict: "review",
|
|
573
|
+
reason: "This charges a card or captures a payment. node9 asks before money moves (Finance shield)."
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
name: "shield:finance:review-payment-link",
|
|
577
|
+
tool: "{,mcp__*__}{create_payment_link,create_invoice,finalize_invoice,send_invoice,pay_invoice,create_invoice_item}",
|
|
578
|
+
conditions: [],
|
|
579
|
+
verdict: "review",
|
|
580
|
+
reason: "This bills someone or creates a link that charges a card. node9 asks before money moves (Finance shield)."
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
name: "shield:finance:review-subscription",
|
|
584
|
+
tool: "{,mcp__*__}{create_subscription,cancel_subscription,update_subscription,pause_subscription,resume_subscription}",
|
|
585
|
+
conditions: [],
|
|
586
|
+
verdict: "review",
|
|
587
|
+
reason: "A subscription starts or stops recurring charges. node9 asks before money moves (Finance shield)."
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
name: "shield:finance:review-dispute",
|
|
591
|
+
tool: "{,mcp__*__}{update_dispute,accept_dispute,close_dispute}",
|
|
592
|
+
conditions: [],
|
|
593
|
+
verdict: "review",
|
|
594
|
+
reason: "This answers or concedes a chargeback. node9 asks before money moves (Finance shield)."
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
name: "shield:finance:review-card",
|
|
598
|
+
tool: "{,mcp__*__}{issue_card,create_virtual_card,create_issuing_card,update_card_limit}",
|
|
599
|
+
conditions: [],
|
|
600
|
+
verdict: "review",
|
|
601
|
+
reason: "This issues a card or changes its limit. node9 asks before money moves (Finance shield)."
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
name: "shield:finance:review-withdraw",
|
|
605
|
+
tool: "{,mcp__*__}{withdraw,withdraw_funds,create_withdrawal,request_withdrawal}",
|
|
606
|
+
conditions: [],
|
|
607
|
+
verdict: "review",
|
|
608
|
+
reason: "A withdrawal moves money out. node9 asks before money moves (Finance shield)."
|
|
609
|
+
}
|
|
610
|
+
],
|
|
611
|
+
dangerousWords: []
|
|
612
|
+
};
|
|
613
|
+
|
|
540
614
|
// src/shields/builtin/github.json
|
|
541
615
|
var github_default = {
|
|
542
616
|
name: "github",
|
|
@@ -565,6 +639,58 @@ var github_default = {
|
|
|
565
639
|
dangerousWords: []
|
|
566
640
|
};
|
|
567
641
|
|
|
642
|
+
// src/shields/builtin/identity.json
|
|
643
|
+
var identity_default = {
|
|
644
|
+
name: "identity",
|
|
645
|
+
description: "Asks before a password, a key, a token, a role or a user changes in an identity or admin app, whatever the request said. Reads are never asked about.",
|
|
646
|
+
aliases: ["access", "iam"],
|
|
647
|
+
smartRules: [
|
|
648
|
+
{
|
|
649
|
+
name: "shield:identity:review-password",
|
|
650
|
+
tool: "{,mcp__*__}{change_password,update_password,reset_password,set_password,expire_password,force_password_reset}",
|
|
651
|
+
conditions: [],
|
|
652
|
+
verdict: "review",
|
|
653
|
+
reason: "This changes or resets a password. node9 asks before credentials change, whatever the request said (Identity shield)."
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
name: "shield:identity:review-key",
|
|
657
|
+
tool: "{,mcp__*__}{rotate_key,rotate_api_key,create_api_key,create_token,create_access_token,create_personal_access_token,regenerate_secret,rotate_secret,create_service_account_key,create_credential}",
|
|
658
|
+
conditions: [],
|
|
659
|
+
verdict: "review",
|
|
660
|
+
reason: "This creates or rotates a key, token or secret. node9 asks before credentials change (Identity shield)."
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
name: "shield:identity:review-access",
|
|
664
|
+
tool: "{,mcp__*__}{grant_access,grant_permission,grant_role,revoke_access,revoke_permission,revoke_role,revoke_token,set_permission,set_permissions,set_role,assign_role,update_role,add_permission,remove_permission,attach_policy,detach_policy}",
|
|
665
|
+
conditions: [],
|
|
666
|
+
verdict: "review",
|
|
667
|
+
reason: "This grants or revokes access. node9 asks before access changes (Identity shield)."
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
name: "shield:identity:review-membership",
|
|
671
|
+
tool: "{,mcp__*__}{add_member,remove_member,add_user_to_group,remove_user_from_group,add_collaborator,remove_collaborator,invite_user,invite_member,invite_user_to_slack,invite_users,add_org_member,remove_org_member,add_team_member,remove_team_member}",
|
|
672
|
+
conditions: [],
|
|
673
|
+
verdict: "review",
|
|
674
|
+
reason: "This changes who belongs where. node9 asks before membership changes (Identity shield)."
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
name: "shield:identity:review-user",
|
|
678
|
+
tool: "{,mcp__*__}{create_user,delete_user,deactivate_user,suspend_user,activate_user,unlock_user,make_admin,promote_user,demote_user,update_user_role}",
|
|
679
|
+
conditions: [],
|
|
680
|
+
verdict: "review",
|
|
681
|
+
reason: "This creates, removes or promotes an account. node9 asks before accounts change (Identity shield)."
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
name: "shield:identity:review-mfa",
|
|
685
|
+
tool: "{,mcp__*__}{reset_mfa,reset_factors,disable_mfa,enroll_factor,deactivate_factor}",
|
|
686
|
+
conditions: [],
|
|
687
|
+
verdict: "review",
|
|
688
|
+
reason: "This changes a second factor. node9 asks before credentials change (Identity shield)."
|
|
689
|
+
}
|
|
690
|
+
],
|
|
691
|
+
dangerousWords: []
|
|
692
|
+
};
|
|
693
|
+
|
|
568
694
|
// src/shields/builtin/k8s.json
|
|
569
695
|
var k8s_default = {
|
|
570
696
|
name: "k8s",
|
|
@@ -905,6 +1031,177 @@ var project_jail_default = {
|
|
|
905
1031
|
dangerousWords: []
|
|
906
1032
|
};
|
|
907
1033
|
|
|
1034
|
+
// src/shields/builtin/publishing.json
|
|
1035
|
+
var publishing_default = {
|
|
1036
|
+
name: "publishing",
|
|
1037
|
+
description: "Asks before something goes public or ships outside the organisation (a release, a package, a deploy, a post), whatever the request said. The same switch covers the shell commands that publish.",
|
|
1038
|
+
aliases: ["release", "deploy"],
|
|
1039
|
+
smartRules: [
|
|
1040
|
+
{
|
|
1041
|
+
name: "shield:publishing:review-release",
|
|
1042
|
+
tool: "{,mcp__*__}{create_release,publish_release,create_tag_release,update_release,promote_release}",
|
|
1043
|
+
conditions: [],
|
|
1044
|
+
verdict: "review",
|
|
1045
|
+
reason: "A release ships code to everyone who installs it. node9 asks before publishing, whatever the request said (Publishing shield)."
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
name: "shield:publishing:review-package",
|
|
1049
|
+
tool: "{,mcp__*__}{publish_package,npm_publish,pypi_upload,publish_version,publish_extension}",
|
|
1050
|
+
conditions: [],
|
|
1051
|
+
verdict: "review",
|
|
1052
|
+
reason: "This publishes a package. node9 asks before publishing (Publishing shield)."
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
name: "shield:publishing:review-deploy",
|
|
1056
|
+
tool: "{,mcp__*__}{deploy,create_deployment,deploy_site,promote_deployment,trigger_deploy,deploy_to_production,rollout}",
|
|
1057
|
+
conditions: [],
|
|
1058
|
+
verdict: "review",
|
|
1059
|
+
reason: "This deploys to an environment other people use. node9 asks before publishing (Publishing shield)."
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
name: "shield:publishing:review-post",
|
|
1063
|
+
tool: "{,mcp__*__}{post_tweet,create_tweet,post_webpage,publish_post,create_post,publish_page,send_announcement,post_announcement,create_linkedin_post,schedule_post}",
|
|
1064
|
+
conditions: [],
|
|
1065
|
+
verdict: "review",
|
|
1066
|
+
reason: "This posts outside the organisation. node9 asks before publishing (Publishing shield)."
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
name: "shield:publishing:review-visibility",
|
|
1070
|
+
tool: "{,mcp__*__}{set_visibility,make_public,set_public,publish_repository,change_visibility,update_visibility}",
|
|
1071
|
+
conditions: [],
|
|
1072
|
+
verdict: "review",
|
|
1073
|
+
reason: "This makes something public. node9 asks before publishing (Publishing shield)."
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
name: "shield:publishing:review-npm-publish",
|
|
1077
|
+
tool: "bash",
|
|
1078
|
+
conditions: [
|
|
1079
|
+
{
|
|
1080
|
+
field: "command",
|
|
1081
|
+
op: "matches",
|
|
1082
|
+
value: "(?:^|[^\\w-])(?:npm|pnpm)(?![\\w-])[^;&|]{0,200}?\\s(?:publish)(?![\\w-])",
|
|
1083
|
+
flags: "i"
|
|
1084
|
+
}
|
|
1085
|
+
],
|
|
1086
|
+
verdict: "review",
|
|
1087
|
+
reason: "npm publish ships the package to everyone who installs it. node9 asks before publishing (Publishing shield)."
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
name: "shield:publishing:review-yarn-publish",
|
|
1091
|
+
tool: "bash",
|
|
1092
|
+
conditions: [
|
|
1093
|
+
{
|
|
1094
|
+
field: "command",
|
|
1095
|
+
op: "matches",
|
|
1096
|
+
value: "(?:^|[^\\w-])(?:yarn)(?![\\w-])[^;&|]{0,200}?\\s(?:publish)(?![\\w-])",
|
|
1097
|
+
flags: "i"
|
|
1098
|
+
}
|
|
1099
|
+
],
|
|
1100
|
+
verdict: "review",
|
|
1101
|
+
reason: "yarn publish ships the package to everyone who installs it. node9 asks before publishing (Publishing shield)."
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
name: "shield:publishing:review-twine-upload",
|
|
1105
|
+
tool: "bash",
|
|
1106
|
+
conditions: [
|
|
1107
|
+
{
|
|
1108
|
+
field: "command",
|
|
1109
|
+
op: "matches",
|
|
1110
|
+
value: "(?:^|[^\\w-])(?:twine)(?![\\w-])[^;&|]{0,200}?\\s(?:upload)(?![\\w-])",
|
|
1111
|
+
flags: "i"
|
|
1112
|
+
}
|
|
1113
|
+
],
|
|
1114
|
+
verdict: "review",
|
|
1115
|
+
reason: "twine upload publishes to PyPI. node9 asks before publishing (Publishing shield)."
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
name: "shield:publishing:review-python-publish",
|
|
1119
|
+
tool: "bash",
|
|
1120
|
+
conditions: [
|
|
1121
|
+
{
|
|
1122
|
+
field: "command",
|
|
1123
|
+
op: "matches",
|
|
1124
|
+
value: "(?:^|[^\\w-])(?:poetry|uv|hatch|flit)(?![\\w-])[^;&|]{0,200}?\\s(?:publish)(?![\\w-])",
|
|
1125
|
+
flags: "i"
|
|
1126
|
+
}
|
|
1127
|
+
],
|
|
1128
|
+
verdict: "review",
|
|
1129
|
+
reason: "This publishes the Python package to PyPI. node9 asks before publishing (Publishing shield)."
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
name: "shield:publishing:review-release-tool-publish",
|
|
1133
|
+
tool: "bash",
|
|
1134
|
+
conditions: [
|
|
1135
|
+
{
|
|
1136
|
+
field: "command",
|
|
1137
|
+
op: "matches",
|
|
1138
|
+
value: "(?:^|[^\\w-])(?:lerna|changeset|vsce|ovsx)(?![\\w-])[^;&|]{0,200}?\\s(?:publish)(?![\\w-])",
|
|
1139
|
+
flags: "i"
|
|
1140
|
+
}
|
|
1141
|
+
],
|
|
1142
|
+
verdict: "review",
|
|
1143
|
+
reason: "This publishes packages or an editor extension through a release tool. node9 asks before publishing (Publishing shield)."
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
name: "shield:publishing:review-cargo-publish",
|
|
1147
|
+
tool: "bash",
|
|
1148
|
+
conditions: [
|
|
1149
|
+
{
|
|
1150
|
+
field: "command",
|
|
1151
|
+
op: "matches",
|
|
1152
|
+
value: "(?:^|[^\\w-])(?:cargo)(?![\\w-])[^;&|]{0,200}?\\s(?:publish)(?![\\w-])",
|
|
1153
|
+
flags: "i"
|
|
1154
|
+
}
|
|
1155
|
+
],
|
|
1156
|
+
verdict: "review",
|
|
1157
|
+
reason: "cargo publish ships the crate. node9 asks before publishing (Publishing shield)."
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
name: "shield:publishing:review-gem-push",
|
|
1161
|
+
tool: "bash",
|
|
1162
|
+
conditions: [
|
|
1163
|
+
{
|
|
1164
|
+
field: "command",
|
|
1165
|
+
op: "matches",
|
|
1166
|
+
value: "(?:^|[^\\w-])(?:gem)(?![\\w-])[^;&|]{0,200}?\\s(?:push)(?![\\w-])",
|
|
1167
|
+
flags: "i"
|
|
1168
|
+
}
|
|
1169
|
+
],
|
|
1170
|
+
verdict: "review",
|
|
1171
|
+
reason: "gem push publishes to RubyGems. node9 asks before publishing (Publishing shield)."
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
name: "shield:publishing:review-docker-push",
|
|
1175
|
+
tool: "bash",
|
|
1176
|
+
conditions: [
|
|
1177
|
+
{
|
|
1178
|
+
field: "command",
|
|
1179
|
+
op: "matches",
|
|
1180
|
+
value: "(?:^|[^\\w-])(?:docker|podman)(?![\\w-])[^;&|]{0,200}?\\s(?:push|--push)(?![\\w-])",
|
|
1181
|
+
flags: "i"
|
|
1182
|
+
}
|
|
1183
|
+
],
|
|
1184
|
+
verdict: "review",
|
|
1185
|
+
reason: "docker push publishes the image to a registry. node9 asks before publishing (Publishing shield)."
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
name: "shield:publishing:review-gh-release",
|
|
1189
|
+
tool: "bash",
|
|
1190
|
+
conditions: [
|
|
1191
|
+
{
|
|
1192
|
+
field: "command",
|
|
1193
|
+
op: "matches",
|
|
1194
|
+
value: "(?:^|[^\\w-])(?:gh)(?![\\w-])[^;&|]{0,200}?\\srelease\\s+(?:create|upload|edit)(?![\\w-])",
|
|
1195
|
+
flags: "i"
|
|
1196
|
+
}
|
|
1197
|
+
],
|
|
1198
|
+
verdict: "review",
|
|
1199
|
+
reason: "gh release ships a release on GitHub. node9 asks before publishing (Publishing shield)."
|
|
1200
|
+
}
|
|
1201
|
+
],
|
|
1202
|
+
dangerousWords: []
|
|
1203
|
+
};
|
|
1204
|
+
|
|
908
1205
|
// src/shields/builtin/redis.json
|
|
909
1206
|
var redis_default = {
|
|
910
1207
|
name: "redis",
|
|
@@ -1028,13 +1325,25 @@ var BUILTIN_SHIELDS = {
|
|
|
1028
1325
|
[bash_safe_default.name]: bash_safe_default,
|
|
1029
1326
|
[docker_default.name]: docker_default,
|
|
1030
1327
|
[filesystem_default.name]: filesystem_default,
|
|
1328
|
+
// Dangerous actions as category shields (node9Firewall#385): an MCP app's
|
|
1329
|
+
// money, credential and publishing tools, asked about whatever the request
|
|
1330
|
+
// said. One glob per rule covers the bare name the gateway sends and the
|
|
1331
|
+
// mcp__<server>__ name the agent hook sends.
|
|
1332
|
+
[finance_default.name]: finance_default,
|
|
1031
1333
|
[github_default.name]: github_default,
|
|
1334
|
+
[identity_default.name]: identity_default,
|
|
1032
1335
|
[k8s_default.name]: k8s_default,
|
|
1033
1336
|
[mongodb_default.name]: mongodb_default,
|
|
1034
1337
|
[postgres_default.name]: postgres_default,
|
|
1035
1338
|
[project_jail_default.name]: project_jail_default,
|
|
1339
|
+
[publishing_default.name]: publishing_default,
|
|
1036
1340
|
[redis_default.name]: redis_default
|
|
1037
1341
|
};
|
|
1342
|
+
var ACTION_SHIELD_NAMES = /* @__PURE__ */ new Set([
|
|
1343
|
+
"finance",
|
|
1344
|
+
"identity",
|
|
1345
|
+
"publishing"
|
|
1346
|
+
]);
|
|
1038
1347
|
function assertBuiltinShieldRegexesAreSafe() {
|
|
1039
1348
|
for (const shield of Object.values(BUILTIN_SHIELDS)) {
|
|
1040
1349
|
for (const rule of shield.smartRules) {
|
|
@@ -14783,6 +15092,7 @@ function* stringValues(obj, depth = 0) {
|
|
|
14783
15092
|
var ENGINE_VERSION = "1.4.0";
|
|
14784
15093
|
// Annotate the CommonJS export names for ESM import in node:
|
|
14785
15094
|
0 && (module.exports = {
|
|
15095
|
+
ACTION_SHIELD_NAMES,
|
|
14786
15096
|
AGENT_INSTRUCTION_DIRS,
|
|
14787
15097
|
AGENT_INSTRUCTION_FILES,
|
|
14788
15098
|
ARGUMENT_SCAN_LIMITS,
|
package/dist/index.mjs
CHANGED
|
@@ -313,6 +313,79 @@ var filesystem_default = {
|
|
|
313
313
|
dangerousWords: ["wipefs"]
|
|
314
314
|
};
|
|
315
315
|
|
|
316
|
+
// src/shields/builtin/finance.json
|
|
317
|
+
var finance_default = {
|
|
318
|
+
name: "finance",
|
|
319
|
+
description: "Asks before money moves through a payment or banking app (refunds, payouts, transfers, charges, invoices), whatever the request said. Reads are never asked about.",
|
|
320
|
+
aliases: ["payments", "money"],
|
|
321
|
+
smartRules: [
|
|
322
|
+
{
|
|
323
|
+
name: "shield:finance:review-refund",
|
|
324
|
+
tool: "{,mcp__*__}{create_refund,refund_payment,refund_charge,refund_order,issue_refund}",
|
|
325
|
+
conditions: [],
|
|
326
|
+
verdict: "review",
|
|
327
|
+
reason: "A refund returns money to a customer. node9 asks before money moves, whatever the request said (Finance shield)."
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
name: "shield:finance:review-payout",
|
|
331
|
+
tool: "{,mcp__*__}{create_payout,send_payout,payout,create_payouts_batch}",
|
|
332
|
+
conditions: [],
|
|
333
|
+
verdict: "review",
|
|
334
|
+
reason: "A payout moves the balance to a bank account. node9 asks before money moves (Finance shield)."
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
name: "shield:finance:review-transfer",
|
|
338
|
+
tool: "{,mcp__*__}{transfer_create,transfer_authorization_create,create_transfer,transfer_money,transfer_funds,send_money,wire_transfer,create_wire,schedule_transaction,update_scheduled_transaction,create_transaction}",
|
|
339
|
+
conditions: [],
|
|
340
|
+
verdict: "review",
|
|
341
|
+
reason: "A transfer moves money between accounts. node9 asks before money moves (Finance shield)."
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
name: "shield:finance:review-charge",
|
|
345
|
+
tool: "{,mcp__*__}{create_payment_intent,confirm_payment_intent,capture_payment_intent,create_charge,create_payment,capture_payment,capture_order,create_order,authorize_order,create_checkout_session}",
|
|
346
|
+
conditions: [],
|
|
347
|
+
verdict: "review",
|
|
348
|
+
reason: "This charges a card or captures a payment. node9 asks before money moves (Finance shield)."
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: "shield:finance:review-payment-link",
|
|
352
|
+
tool: "{,mcp__*__}{create_payment_link,create_invoice,finalize_invoice,send_invoice,pay_invoice,create_invoice_item}",
|
|
353
|
+
conditions: [],
|
|
354
|
+
verdict: "review",
|
|
355
|
+
reason: "This bills someone or creates a link that charges a card. node9 asks before money moves (Finance shield)."
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: "shield:finance:review-subscription",
|
|
359
|
+
tool: "{,mcp__*__}{create_subscription,cancel_subscription,update_subscription,pause_subscription,resume_subscription}",
|
|
360
|
+
conditions: [],
|
|
361
|
+
verdict: "review",
|
|
362
|
+
reason: "A subscription starts or stops recurring charges. node9 asks before money moves (Finance shield)."
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
name: "shield:finance:review-dispute",
|
|
366
|
+
tool: "{,mcp__*__}{update_dispute,accept_dispute,close_dispute}",
|
|
367
|
+
conditions: [],
|
|
368
|
+
verdict: "review",
|
|
369
|
+
reason: "This answers or concedes a chargeback. node9 asks before money moves (Finance shield)."
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
name: "shield:finance:review-card",
|
|
373
|
+
tool: "{,mcp__*__}{issue_card,create_virtual_card,create_issuing_card,update_card_limit}",
|
|
374
|
+
conditions: [],
|
|
375
|
+
verdict: "review",
|
|
376
|
+
reason: "This issues a card or changes its limit. node9 asks before money moves (Finance shield)."
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
name: "shield:finance:review-withdraw",
|
|
380
|
+
tool: "{,mcp__*__}{withdraw,withdraw_funds,create_withdrawal,request_withdrawal}",
|
|
381
|
+
conditions: [],
|
|
382
|
+
verdict: "review",
|
|
383
|
+
reason: "A withdrawal moves money out. node9 asks before money moves (Finance shield)."
|
|
384
|
+
}
|
|
385
|
+
],
|
|
386
|
+
dangerousWords: []
|
|
387
|
+
};
|
|
388
|
+
|
|
316
389
|
// src/shields/builtin/github.json
|
|
317
390
|
var github_default = {
|
|
318
391
|
name: "github",
|
|
@@ -341,6 +414,58 @@ var github_default = {
|
|
|
341
414
|
dangerousWords: []
|
|
342
415
|
};
|
|
343
416
|
|
|
417
|
+
// src/shields/builtin/identity.json
|
|
418
|
+
var identity_default = {
|
|
419
|
+
name: "identity",
|
|
420
|
+
description: "Asks before a password, a key, a token, a role or a user changes in an identity or admin app, whatever the request said. Reads are never asked about.",
|
|
421
|
+
aliases: ["access", "iam"],
|
|
422
|
+
smartRules: [
|
|
423
|
+
{
|
|
424
|
+
name: "shield:identity:review-password",
|
|
425
|
+
tool: "{,mcp__*__}{change_password,update_password,reset_password,set_password,expire_password,force_password_reset}",
|
|
426
|
+
conditions: [],
|
|
427
|
+
verdict: "review",
|
|
428
|
+
reason: "This changes or resets a password. node9 asks before credentials change, whatever the request said (Identity shield)."
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
name: "shield:identity:review-key",
|
|
432
|
+
tool: "{,mcp__*__}{rotate_key,rotate_api_key,create_api_key,create_token,create_access_token,create_personal_access_token,regenerate_secret,rotate_secret,create_service_account_key,create_credential}",
|
|
433
|
+
conditions: [],
|
|
434
|
+
verdict: "review",
|
|
435
|
+
reason: "This creates or rotates a key, token or secret. node9 asks before credentials change (Identity shield)."
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
name: "shield:identity:review-access",
|
|
439
|
+
tool: "{,mcp__*__}{grant_access,grant_permission,grant_role,revoke_access,revoke_permission,revoke_role,revoke_token,set_permission,set_permissions,set_role,assign_role,update_role,add_permission,remove_permission,attach_policy,detach_policy}",
|
|
440
|
+
conditions: [],
|
|
441
|
+
verdict: "review",
|
|
442
|
+
reason: "This grants or revokes access. node9 asks before access changes (Identity shield)."
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
name: "shield:identity:review-membership",
|
|
446
|
+
tool: "{,mcp__*__}{add_member,remove_member,add_user_to_group,remove_user_from_group,add_collaborator,remove_collaborator,invite_user,invite_member,invite_user_to_slack,invite_users,add_org_member,remove_org_member,add_team_member,remove_team_member}",
|
|
447
|
+
conditions: [],
|
|
448
|
+
verdict: "review",
|
|
449
|
+
reason: "This changes who belongs where. node9 asks before membership changes (Identity shield)."
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
name: "shield:identity:review-user",
|
|
453
|
+
tool: "{,mcp__*__}{create_user,delete_user,deactivate_user,suspend_user,activate_user,unlock_user,make_admin,promote_user,demote_user,update_user_role}",
|
|
454
|
+
conditions: [],
|
|
455
|
+
verdict: "review",
|
|
456
|
+
reason: "This creates, removes or promotes an account. node9 asks before accounts change (Identity shield)."
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
name: "shield:identity:review-mfa",
|
|
460
|
+
tool: "{,mcp__*__}{reset_mfa,reset_factors,disable_mfa,enroll_factor,deactivate_factor}",
|
|
461
|
+
conditions: [],
|
|
462
|
+
verdict: "review",
|
|
463
|
+
reason: "This changes a second factor. node9 asks before credentials change (Identity shield)."
|
|
464
|
+
}
|
|
465
|
+
],
|
|
466
|
+
dangerousWords: []
|
|
467
|
+
};
|
|
468
|
+
|
|
344
469
|
// src/shields/builtin/k8s.json
|
|
345
470
|
var k8s_default = {
|
|
346
471
|
name: "k8s",
|
|
@@ -681,6 +806,177 @@ var project_jail_default = {
|
|
|
681
806
|
dangerousWords: []
|
|
682
807
|
};
|
|
683
808
|
|
|
809
|
+
// src/shields/builtin/publishing.json
|
|
810
|
+
var publishing_default = {
|
|
811
|
+
name: "publishing",
|
|
812
|
+
description: "Asks before something goes public or ships outside the organisation (a release, a package, a deploy, a post), whatever the request said. The same switch covers the shell commands that publish.",
|
|
813
|
+
aliases: ["release", "deploy"],
|
|
814
|
+
smartRules: [
|
|
815
|
+
{
|
|
816
|
+
name: "shield:publishing:review-release",
|
|
817
|
+
tool: "{,mcp__*__}{create_release,publish_release,create_tag_release,update_release,promote_release}",
|
|
818
|
+
conditions: [],
|
|
819
|
+
verdict: "review",
|
|
820
|
+
reason: "A release ships code to everyone who installs it. node9 asks before publishing, whatever the request said (Publishing shield)."
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
name: "shield:publishing:review-package",
|
|
824
|
+
tool: "{,mcp__*__}{publish_package,npm_publish,pypi_upload,publish_version,publish_extension}",
|
|
825
|
+
conditions: [],
|
|
826
|
+
verdict: "review",
|
|
827
|
+
reason: "This publishes a package. node9 asks before publishing (Publishing shield)."
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
name: "shield:publishing:review-deploy",
|
|
831
|
+
tool: "{,mcp__*__}{deploy,create_deployment,deploy_site,promote_deployment,trigger_deploy,deploy_to_production,rollout}",
|
|
832
|
+
conditions: [],
|
|
833
|
+
verdict: "review",
|
|
834
|
+
reason: "This deploys to an environment other people use. node9 asks before publishing (Publishing shield)."
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
name: "shield:publishing:review-post",
|
|
838
|
+
tool: "{,mcp__*__}{post_tweet,create_tweet,post_webpage,publish_post,create_post,publish_page,send_announcement,post_announcement,create_linkedin_post,schedule_post}",
|
|
839
|
+
conditions: [],
|
|
840
|
+
verdict: "review",
|
|
841
|
+
reason: "This posts outside the organisation. node9 asks before publishing (Publishing shield)."
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
name: "shield:publishing:review-visibility",
|
|
845
|
+
tool: "{,mcp__*__}{set_visibility,make_public,set_public,publish_repository,change_visibility,update_visibility}",
|
|
846
|
+
conditions: [],
|
|
847
|
+
verdict: "review",
|
|
848
|
+
reason: "This makes something public. node9 asks before publishing (Publishing shield)."
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
name: "shield:publishing:review-npm-publish",
|
|
852
|
+
tool: "bash",
|
|
853
|
+
conditions: [
|
|
854
|
+
{
|
|
855
|
+
field: "command",
|
|
856
|
+
op: "matches",
|
|
857
|
+
value: "(?:^|[^\\w-])(?:npm|pnpm)(?![\\w-])[^;&|]{0,200}?\\s(?:publish)(?![\\w-])",
|
|
858
|
+
flags: "i"
|
|
859
|
+
}
|
|
860
|
+
],
|
|
861
|
+
verdict: "review",
|
|
862
|
+
reason: "npm publish ships the package to everyone who installs it. node9 asks before publishing (Publishing shield)."
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
name: "shield:publishing:review-yarn-publish",
|
|
866
|
+
tool: "bash",
|
|
867
|
+
conditions: [
|
|
868
|
+
{
|
|
869
|
+
field: "command",
|
|
870
|
+
op: "matches",
|
|
871
|
+
value: "(?:^|[^\\w-])(?:yarn)(?![\\w-])[^;&|]{0,200}?\\s(?:publish)(?![\\w-])",
|
|
872
|
+
flags: "i"
|
|
873
|
+
}
|
|
874
|
+
],
|
|
875
|
+
verdict: "review",
|
|
876
|
+
reason: "yarn publish ships the package to everyone who installs it. node9 asks before publishing (Publishing shield)."
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
name: "shield:publishing:review-twine-upload",
|
|
880
|
+
tool: "bash",
|
|
881
|
+
conditions: [
|
|
882
|
+
{
|
|
883
|
+
field: "command",
|
|
884
|
+
op: "matches",
|
|
885
|
+
value: "(?:^|[^\\w-])(?:twine)(?![\\w-])[^;&|]{0,200}?\\s(?:upload)(?![\\w-])",
|
|
886
|
+
flags: "i"
|
|
887
|
+
}
|
|
888
|
+
],
|
|
889
|
+
verdict: "review",
|
|
890
|
+
reason: "twine upload publishes to PyPI. node9 asks before publishing (Publishing shield)."
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
name: "shield:publishing:review-python-publish",
|
|
894
|
+
tool: "bash",
|
|
895
|
+
conditions: [
|
|
896
|
+
{
|
|
897
|
+
field: "command",
|
|
898
|
+
op: "matches",
|
|
899
|
+
value: "(?:^|[^\\w-])(?:poetry|uv|hatch|flit)(?![\\w-])[^;&|]{0,200}?\\s(?:publish)(?![\\w-])",
|
|
900
|
+
flags: "i"
|
|
901
|
+
}
|
|
902
|
+
],
|
|
903
|
+
verdict: "review",
|
|
904
|
+
reason: "This publishes the Python package to PyPI. node9 asks before publishing (Publishing shield)."
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
name: "shield:publishing:review-release-tool-publish",
|
|
908
|
+
tool: "bash",
|
|
909
|
+
conditions: [
|
|
910
|
+
{
|
|
911
|
+
field: "command",
|
|
912
|
+
op: "matches",
|
|
913
|
+
value: "(?:^|[^\\w-])(?:lerna|changeset|vsce|ovsx)(?![\\w-])[^;&|]{0,200}?\\s(?:publish)(?![\\w-])",
|
|
914
|
+
flags: "i"
|
|
915
|
+
}
|
|
916
|
+
],
|
|
917
|
+
verdict: "review",
|
|
918
|
+
reason: "This publishes packages or an editor extension through a release tool. node9 asks before publishing (Publishing shield)."
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
name: "shield:publishing:review-cargo-publish",
|
|
922
|
+
tool: "bash",
|
|
923
|
+
conditions: [
|
|
924
|
+
{
|
|
925
|
+
field: "command",
|
|
926
|
+
op: "matches",
|
|
927
|
+
value: "(?:^|[^\\w-])(?:cargo)(?![\\w-])[^;&|]{0,200}?\\s(?:publish)(?![\\w-])",
|
|
928
|
+
flags: "i"
|
|
929
|
+
}
|
|
930
|
+
],
|
|
931
|
+
verdict: "review",
|
|
932
|
+
reason: "cargo publish ships the crate. node9 asks before publishing (Publishing shield)."
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
name: "shield:publishing:review-gem-push",
|
|
936
|
+
tool: "bash",
|
|
937
|
+
conditions: [
|
|
938
|
+
{
|
|
939
|
+
field: "command",
|
|
940
|
+
op: "matches",
|
|
941
|
+
value: "(?:^|[^\\w-])(?:gem)(?![\\w-])[^;&|]{0,200}?\\s(?:push)(?![\\w-])",
|
|
942
|
+
flags: "i"
|
|
943
|
+
}
|
|
944
|
+
],
|
|
945
|
+
verdict: "review",
|
|
946
|
+
reason: "gem push publishes to RubyGems. node9 asks before publishing (Publishing shield)."
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
name: "shield:publishing:review-docker-push",
|
|
950
|
+
tool: "bash",
|
|
951
|
+
conditions: [
|
|
952
|
+
{
|
|
953
|
+
field: "command",
|
|
954
|
+
op: "matches",
|
|
955
|
+
value: "(?:^|[^\\w-])(?:docker|podman)(?![\\w-])[^;&|]{0,200}?\\s(?:push|--push)(?![\\w-])",
|
|
956
|
+
flags: "i"
|
|
957
|
+
}
|
|
958
|
+
],
|
|
959
|
+
verdict: "review",
|
|
960
|
+
reason: "docker push publishes the image to a registry. node9 asks before publishing (Publishing shield)."
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
name: "shield:publishing:review-gh-release",
|
|
964
|
+
tool: "bash",
|
|
965
|
+
conditions: [
|
|
966
|
+
{
|
|
967
|
+
field: "command",
|
|
968
|
+
op: "matches",
|
|
969
|
+
value: "(?:^|[^\\w-])(?:gh)(?![\\w-])[^;&|]{0,200}?\\srelease\\s+(?:create|upload|edit)(?![\\w-])",
|
|
970
|
+
flags: "i"
|
|
971
|
+
}
|
|
972
|
+
],
|
|
973
|
+
verdict: "review",
|
|
974
|
+
reason: "gh release ships a release on GitHub. node9 asks before publishing (Publishing shield)."
|
|
975
|
+
}
|
|
976
|
+
],
|
|
977
|
+
dangerousWords: []
|
|
978
|
+
};
|
|
979
|
+
|
|
684
980
|
// src/shields/builtin/redis.json
|
|
685
981
|
var redis_default = {
|
|
686
982
|
name: "redis",
|
|
@@ -804,13 +1100,25 @@ var BUILTIN_SHIELDS = {
|
|
|
804
1100
|
[bash_safe_default.name]: bash_safe_default,
|
|
805
1101
|
[docker_default.name]: docker_default,
|
|
806
1102
|
[filesystem_default.name]: filesystem_default,
|
|
1103
|
+
// Dangerous actions as category shields (node9Firewall#385): an MCP app's
|
|
1104
|
+
// money, credential and publishing tools, asked about whatever the request
|
|
1105
|
+
// said. One glob per rule covers the bare name the gateway sends and the
|
|
1106
|
+
// mcp__<server>__ name the agent hook sends.
|
|
1107
|
+
[finance_default.name]: finance_default,
|
|
807
1108
|
[github_default.name]: github_default,
|
|
1109
|
+
[identity_default.name]: identity_default,
|
|
808
1110
|
[k8s_default.name]: k8s_default,
|
|
809
1111
|
[mongodb_default.name]: mongodb_default,
|
|
810
1112
|
[postgres_default.name]: postgres_default,
|
|
811
1113
|
[project_jail_default.name]: project_jail_default,
|
|
1114
|
+
[publishing_default.name]: publishing_default,
|
|
812
1115
|
[redis_default.name]: redis_default
|
|
813
1116
|
};
|
|
1117
|
+
var ACTION_SHIELD_NAMES = /* @__PURE__ */ new Set([
|
|
1118
|
+
"finance",
|
|
1119
|
+
"identity",
|
|
1120
|
+
"publishing"
|
|
1121
|
+
]);
|
|
814
1122
|
function assertBuiltinShieldRegexesAreSafe() {
|
|
815
1123
|
for (const shield of Object.values(BUILTIN_SHIELDS)) {
|
|
816
1124
|
for (const rule of shield.smartRules) {
|
|
@@ -14558,6 +14866,7 @@ function* stringValues(obj, depth = 0) {
|
|
|
14558
14866
|
// src/index.ts
|
|
14559
14867
|
var ENGINE_VERSION = "1.4.0";
|
|
14560
14868
|
export {
|
|
14869
|
+
ACTION_SHIELD_NAMES,
|
|
14561
14870
|
AGENT_INSTRUCTION_DIRS,
|
|
14562
14871
|
AGENT_INSTRUCTION_FILES,
|
|
14563
14872
|
ARGUMENT_SCAN_LIMITS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node9/policy-engine",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.37.1",
|
|
4
4
|
"description": "Shared policy evaluation engine for node9 — DLP, smart rules, AST shell parsing, shields, loop detection. Pure functions, no I/O. Used by both node9-proxy and the node9 SaaS firewall.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://node9.ai",
|