@node9/policy-engine 2.50.0 → 2.51.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 +11 -3
- package/dist/index.d.ts +11 -3
- package/dist/index.js +558 -26
- package/dist/index.mjs +558 -26
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -674,7 +674,7 @@ declare function inlineExecReason(r: InlineExecReview): string;
|
|
|
674
674
|
* first dangerous finding, or the first unreadable one when none is dangerous.
|
|
675
675
|
* A command with no inline code returns null.
|
|
676
676
|
*/
|
|
677
|
-
declare function inlineExecReview(command: string): InlineExecReview | null;
|
|
677
|
+
declare function inlineExecReview(command: string, jailPaths?: readonly string[]): InlineExecReview | null;
|
|
678
678
|
/**
|
|
679
679
|
* True when `path` is under $HOME (~ or absolute /home/* or /root) AND not in
|
|
680
680
|
* the tool-managed cache allow-list. Used to gate `rm -rf` on home paths.
|
|
@@ -888,6 +888,14 @@ interface PolicyConfig {
|
|
|
888
888
|
/** Where each `checks` value came from (the host's resolution). A pinned,
|
|
889
889
|
* cloud-mandated pack rule follows only a `workspace` value (fw#390). */
|
|
890
890
|
checkSources?: Record<string, 'local' | 'project' | 'workspace'>;
|
|
891
|
+
/**
|
|
892
|
+
* The user's and the organisation's jail paths as given (`/usr`,
|
|
893
|
+
* `~/.gmail-mcp`): the directories whose rules the host injected. The
|
|
894
|
+
* inline-code judge reads them so a jailed directory named as a string
|
|
895
|
+
* inside a script is a read of it (node9Firewall#391). Optional: a caller
|
|
896
|
+
* without a jail builds no list.
|
|
897
|
+
*/
|
|
898
|
+
jailPaths?: string[];
|
|
891
899
|
};
|
|
892
900
|
settings: {
|
|
893
901
|
mode: string;
|
|
@@ -2418,7 +2426,7 @@ declare const LONG_OUTPUT_THRESHOLD_BYTES: number;
|
|
|
2418
2426
|
* and fails CI when the hash drifts without a version bump — forgetting
|
|
2419
2427
|
* is loud, not silent.
|
|
2420
2428
|
*/
|
|
2421
|
-
declare const CANONICAL_EXTRACTOR_VERSION = "canonical-
|
|
2429
|
+
declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v37";
|
|
2422
2430
|
/**
|
|
2423
2431
|
* SHA-256 prefix of the detector-source files
|
|
2424
2432
|
* (canonical.ts + pii.ts + destructive-regex.ts).
|
|
@@ -2429,7 +2437,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v36";
|
|
|
2429
2437
|
* files changed, this hash must change too, and you must consciously
|
|
2430
2438
|
* decide whether to bump CANONICAL_EXTRACTOR_VERSION."
|
|
2431
2439
|
*/
|
|
2432
|
-
declare const CANONICAL_EXTRACTOR_HASH = "
|
|
2440
|
+
declare const CANONICAL_EXTRACTOR_HASH = "2c9a0271d9c1dd57";
|
|
2433
2441
|
declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
|
|
2434
2442
|
declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
|
|
2435
2443
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -674,7 +674,7 @@ declare function inlineExecReason(r: InlineExecReview): string;
|
|
|
674
674
|
* first dangerous finding, or the first unreadable one when none is dangerous.
|
|
675
675
|
* A command with no inline code returns null.
|
|
676
676
|
*/
|
|
677
|
-
declare function inlineExecReview(command: string): InlineExecReview | null;
|
|
677
|
+
declare function inlineExecReview(command: string, jailPaths?: readonly string[]): InlineExecReview | null;
|
|
678
678
|
/**
|
|
679
679
|
* True when `path` is under $HOME (~ or absolute /home/* or /root) AND not in
|
|
680
680
|
* the tool-managed cache allow-list. Used to gate `rm -rf` on home paths.
|
|
@@ -888,6 +888,14 @@ interface PolicyConfig {
|
|
|
888
888
|
/** Where each `checks` value came from (the host's resolution). A pinned,
|
|
889
889
|
* cloud-mandated pack rule follows only a `workspace` value (fw#390). */
|
|
890
890
|
checkSources?: Record<string, 'local' | 'project' | 'workspace'>;
|
|
891
|
+
/**
|
|
892
|
+
* The user's and the organisation's jail paths as given (`/usr`,
|
|
893
|
+
* `~/.gmail-mcp`): the directories whose rules the host injected. The
|
|
894
|
+
* inline-code judge reads them so a jailed directory named as a string
|
|
895
|
+
* inside a script is a read of it (node9Firewall#391). Optional: a caller
|
|
896
|
+
* without a jail builds no list.
|
|
897
|
+
*/
|
|
898
|
+
jailPaths?: string[];
|
|
891
899
|
};
|
|
892
900
|
settings: {
|
|
893
901
|
mode: string;
|
|
@@ -2418,7 +2426,7 @@ declare const LONG_OUTPUT_THRESHOLD_BYTES: number;
|
|
|
2418
2426
|
* and fails CI when the hash drifts without a version bump — forgetting
|
|
2419
2427
|
* is loud, not silent.
|
|
2420
2428
|
*/
|
|
2421
|
-
declare const CANONICAL_EXTRACTOR_VERSION = "canonical-
|
|
2429
|
+
declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v37";
|
|
2422
2430
|
/**
|
|
2423
2431
|
* SHA-256 prefix of the detector-source files
|
|
2424
2432
|
* (canonical.ts + pii.ts + destructive-regex.ts).
|
|
@@ -2429,7 +2437,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v36";
|
|
|
2429
2437
|
* files changed, this hash must change too, and you must consciously
|
|
2430
2438
|
* decide whether to bump CANONICAL_EXTRACTOR_VERSION."
|
|
2431
2439
|
*/
|
|
2432
|
-
declare const CANONICAL_EXTRACTOR_HASH = "
|
|
2440
|
+
declare const CANONICAL_EXTRACTOR_HASH = "2c9a0271d9c1dd57";
|
|
2433
2441
|
declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
|
|
2434
2442
|
declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
|
|
2435
2443
|
/**
|