@vybestack/llxprt-code-policy 0.10.0 → 0.11.0-nightly.260728.ffaa8d5d7
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/src/destructive-commands.d.ts +19 -0
- package/dist/src/destructive-commands.js +942 -0
- package/dist/src/destructive-commands.js.map +1 -0
- package/dist/src/destructive-credentials.d.ts +30 -0
- package/dist/src/destructive-credentials.js +275 -0
- package/dist/src/destructive-credentials.js.map +1 -0
- package/dist/src/destructive-forkbomb.d.ts +18 -0
- package/dist/src/destructive-forkbomb.js +780 -0
- package/dist/src/destructive-forkbomb.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/policy-engine.d.ts +6 -0
- package/dist/src/policy-engine.js +37 -6
- package/dist/src/policy-engine.js.map +1 -1
- package/dist/src/toml-loader.js +21 -36
- package/dist/src/toml-loader.js.map +1 -1
- package/dist/src/types.d.ts +2 -0
- package/package.json +1 -1
- package/src/destructive-commands.ts +1095 -0
- package/src/destructive-credentials.ts +309 -0
- package/src/destructive-forkbomb.ts +852 -0
- package/src/index.ts +1 -0
- package/src/policy-engine.ts +42 -6
- package/src/toml-loader.ts +25 -34
- package/src/types.ts +3 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Vybestack LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Returns true if the raw shell command string contains a canonical destructive
|
|
8
|
+
* pattern that must be hard-denied regardless of approval mode or allowlist.
|
|
9
|
+
* Self-contained: performs its own canonicalization so it is not bypassable by
|
|
10
|
+
* quote-removal, `$IFS` splitting, or command substitution.
|
|
11
|
+
*
|
|
12
|
+
* Known residuals (out of scope): a command name computed via substitution
|
|
13
|
+
* output (e.g. `$(echo rm) -rf /`) cannot be statically resolved; base64
|
|
14
|
+
* piped to an interpreter (e.g. `echo <b64> | base64 -d | sh`) is not
|
|
15
|
+
* decoded-and-reparsed here (Class D — handled by the Layer-1 pipe-destination
|
|
16
|
+
* guard in production); interpreter input read from stdin (beyond the `-c`
|
|
17
|
+
* flag) is not evaluated.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isDestructiveCommand(command: string): boolean;
|