@backendkit-labs/agent-sandbox 0.1.1 → 0.1.2
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/README.md +20 -0
- package/dist/control.d.ts +15 -0
- package/dist/control.d.ts.map +1 -0
- package/dist/control.js +37 -0
- package/dist/control.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/inherit.d.ts +33 -0
- package/dist/inherit.d.ts.map +1 -0
- package/dist/inherit.js +83 -0
- package/dist/inherit.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -100,6 +100,17 @@ sandbox.onDecision(d => console.log(d.agentId, d.tool, d.mode, d.backend, d.outc
|
|
|
100
100
|
createSandboxService({ policy, backends, auditLog: 'logs/sandbox.ndjson' }); // one JSON line per decision, in order
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
+
## A child is never wider than its parent
|
|
104
|
+
|
|
105
|
+
Whoever creates an agent (a supervisor, a parent agent spawning a sub-agent) must not hand it more power than it has itself. `isNarrowerOrEqual(parent, child)` is a pure check on two `SandboxPolicyConfig`s; `checkNarrower` returns every violation so the refusal can say why.
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
const verdict = checkNarrower(parentPolicy.snapshot(), requestedChildPolicy);
|
|
109
|
+
if (!verdict.ok) throw new Error(`POLICY_WIDER_THAN_PARENT: ${describeViolations(verdict.violations)}`);
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Each policy is measured at its **widest** (its base setting or any rule), so a rule cannot hide a widening. The child may not exceed the parent's mode or network, must ask at least as much (`approval`), may only use roots inside the parent's, must keep every `writeTools`/`commandTools` entry and every `env.deny` the parent lists, and may only allow variables the parent allows. Note that a `read-only` child of an `ask` parent must still set `approval: 'writes-and-commands'`: it can still run commands.
|
|
113
|
+
|
|
103
114
|
## Environment hygiene
|
|
104
115
|
|
|
105
116
|
Host processes start from a scrubbed environment: names matching `KEY`, `SECRET`, `TOKEN`, `PASSWORD`, `PASSWD` or `CREDENTIAL` (case-insensitive) are dropped. It is a denylist on purpose (Windows needs `SystemRoot`, `ComSpec`, `PATHEXT`). Let specific ones through with `env.allow` (`GH_TOKEN`, or `DEEPSEEK_*`), drop more with `env.deny`. Containers never inherit the host environment.
|
|
@@ -111,6 +122,15 @@ Host processes start from a scrubbed environment: names matching `KEY`, `SECRET`
|
|
|
111
122
|
- **File tools run in the host process**, so they are not confined by a backend: the service judges the path instead (`authorizePath`). It follows symlinks and junctions, so a link inside the workspace cannot reach outside; the tool's own workspace check stays as the floor, even in full access. A tool that does its own I/O must call `ctx.sandbox.authorizePath(...)` itself.
|
|
112
123
|
- **Several engines may share one service**: each engine reports only the decisions of its own calls on its transport and audit log. `sandbox.onDecision(...)` on the service sees all of them.
|
|
113
124
|
|
|
125
|
+
## Controlling a policy from outside
|
|
126
|
+
|
|
127
|
+
`createEngineControl(engine, { policy: sandboxPolicyControl(service.policy, { ceiling }), jobs, approveWidening })` (from `agent-core`) is a handler an `AgentServer` can plug in as `control` (protocol 1.1), so a supervisor can read and change the policy, list and cancel jobs, and read an audit trail.
|
|
128
|
+
|
|
129
|
+
- **Narrowing is free, widening needs approval.** The comparison is `checkNarrower`. Without `approveWidening` a wider policy is refused (`APPROVAL_REQUIRED`): control never widens on its own say-so.
|
|
130
|
+
- **The ceiling is a hard limit.** A request beyond `ceiling` (the widest policy the operator accepts) is `POLICY_WIDER_THAN_PARENT` whatever the approver says.
|
|
131
|
+
- **A lock-down must keep its approval.** `{ preset: 'read-only' }` is *wider* than an `auto-edit` policy in the approval dimension (read-only asks for nothing), so a supervisor tightening an agent sends `{ preset: 'read-only', approval: 'commands' }` and keeps the parent's `writeTools`.
|
|
132
|
+
- **Audited.** Every change records who asked (`by`, else the tenant), the outcome and the policy `version` in force afterwards, next to the sandbox decisions of the engine. `expectedVersion` makes a change fail if the policy moved since the supervisor read it.
|
|
133
|
+
|
|
114
134
|
## Not here yet
|
|
115
135
|
|
|
116
136
|
`request_escalation` (S2), a terminal tool through the service (there is none in this repo yet), `bwrap`/`landlock`, Windows and `ssh` backends (S4), private temp directories and waiting for child exit after a kill.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PolicyControl } from '@backendkit-labs/agent-core';
|
|
2
|
+
import { type SandboxPolicy, type SandboxPolicyConfig } from './policy';
|
|
3
|
+
export interface SandboxPolicyControlOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The widest policy the operator accepts for this agent. A request beyond it is refused whatever the approver says;
|
|
6
|
+
* below it, widening still needs the approval `createEngineControl` asks for. Without a ceiling, only approval limits.
|
|
7
|
+
*/
|
|
8
|
+
ceiling?: SandboxPolicyConfig;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Lets `createEngineControl` read and change a sandbox policy: narrowing goes through, widening is flagged for approval
|
|
12
|
+
* (the comparison is `checkNarrower`), and nothing beyond the ceiling is applied.
|
|
13
|
+
*/
|
|
14
|
+
export declare function sandboxPolicyControl(policy: SandboxPolicy, options?: SandboxPolicyControlOptions): PolicyControl;
|
|
15
|
+
//# sourceMappingURL=control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../src/control.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAqB,KAAK,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE3F,MAAM,WAAW,2BAA2B;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,GAAE,2BAAgC,GAAG,aAAa,CAyBpH"}
|
package/dist/control.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sandboxPolicyControl = sandboxPolicyControl;
|
|
4
|
+
const inherit_1 = require("./inherit");
|
|
5
|
+
const policy_1 = require("./policy");
|
|
6
|
+
/**
|
|
7
|
+
* Lets `createEngineControl` read and change a sandbox policy: narrowing goes through, widening is flagged for approval
|
|
8
|
+
* (the comparison is `checkNarrower`), and nothing beyond the ceiling is applied.
|
|
9
|
+
*/
|
|
10
|
+
function sandboxPolicyControl(policy, options = {}) {
|
|
11
|
+
const ceiling = options.ceiling ? (0, policy_1.parsePolicyConfig)(options.ceiling) : undefined;
|
|
12
|
+
return {
|
|
13
|
+
read: () => ({ version: policy.version, policy: policy.snapshot() }),
|
|
14
|
+
review(candidate) {
|
|
15
|
+
let next;
|
|
16
|
+
try {
|
|
17
|
+
next = (0, policy_1.parsePolicyConfig)(candidate);
|
|
18
|
+
}
|
|
19
|
+
catch (err) {
|
|
20
|
+
return { kind: 'invalid', message: err.message };
|
|
21
|
+
}
|
|
22
|
+
if (ceiling) {
|
|
23
|
+
const within = (0, inherit_1.checkNarrower)(ceiling, next);
|
|
24
|
+
if (!within.ok) {
|
|
25
|
+
return { kind: 'beyond-ceiling', message: `the requested policy exceeds the ceiling: ${(0, inherit_1.describeViolations)(within.violations)}`, details: within.violations };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const verdict = (0, inherit_1.checkNarrower)(policy.snapshot(), next);
|
|
29
|
+
return verdict.ok ? { kind: 'narrower', next } : { kind: 'wider', next, details: verdict.violations };
|
|
30
|
+
},
|
|
31
|
+
apply(next) {
|
|
32
|
+
policy.set(next);
|
|
33
|
+
return policy.version;
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control.js","sourceRoot":"","sources":["../src/control.ts"],"names":[],"mappings":";;AAgBA,oDAyB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E,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC;QAC1G,CAAC;QAED,KAAK,CAAC,IAAI;YACN,MAAM,CAAC,GAAG,CAAC,IAA2B,CAAC,CAAC;YACxC,OAAO,MAAM,CAAC,OAAO,CAAC;QAC1B,CAAC;KACJ,CAAC;AACN,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { createSandboxPolicy, parsePolicyConfig, SandboxPolicyError } from './po
|
|
|
4
4
|
export type { SandboxPolicy, SandboxPolicyConfig, SandboxRule, ResolvedPolicy } from './policy';
|
|
5
5
|
export { PERMISSION_PRESETS, isPermissionPreset, matchPreset, needsApproval } from './presets';
|
|
6
6
|
export type { PermissionPreset, PresetDefinition, ApprovalLevel, ActionKind } from './presets';
|
|
7
|
+
export { checkNarrower, isNarrowerOrEqual, describeViolations } from './inherit';
|
|
8
|
+
export type { InheritanceVerdict, InheritanceViolation, InheritanceDimension } from './inherit';
|
|
7
9
|
export { realPathOf, isInside as isInsideDir } from './paths';
|
|
8
10
|
export { scrubEnv } from './env';
|
|
9
11
|
export type { EnvPolicy } from './env';
|
|
@@ -13,4 +15,6 @@ export type { DockerBackendOptions } from './backends/docker';
|
|
|
13
15
|
export type { SandboxBackend, BackendExecRequest } from './backends/types';
|
|
14
16
|
export { runProcess, killProcessTree, DEFAULT_MAX_OUTPUT_CHARS } from './process';
|
|
15
17
|
export type { RunProcessOptions } from './process';
|
|
18
|
+
export { sandboxPolicyControl } from './control';
|
|
19
|
+
export type { SandboxPolicyControlOptions } from './control';
|
|
16
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAA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AAc,EAAE,MAAM,UAAU,CAAC;AAChG,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/F,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACjF,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACnE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAClF,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,YAAY,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_MAX_OUTPUT_CHARS = exports.killProcessTree = exports.runProcess = exports.buildDockerArgs = exports.DockerBackend = exports.NoneBackend = exports.scrubEnv = exports.isInsideDir = exports.realPathOf = exports.needsApproval = exports.matchPreset = exports.isPermissionPreset = exports.PERMISSION_PRESETS = exports.SandboxPolicyError = exports.parsePolicyConfig = exports.createSandboxPolicy = exports.createSandboxService = void 0;
|
|
3
|
+
exports.sandboxPolicyControl = exports.DEFAULT_MAX_OUTPUT_CHARS = exports.killProcessTree = exports.runProcess = exports.buildDockerArgs = exports.DockerBackend = exports.NoneBackend = exports.scrubEnv = exports.isInsideDir = exports.realPathOf = exports.describeViolations = exports.isNarrowerOrEqual = exports.checkNarrower = exports.needsApproval = exports.matchPreset = exports.isPermissionPreset = exports.PERMISSION_PRESETS = exports.SandboxPolicyError = exports.parsePolicyConfig = exports.createSandboxPolicy = exports.createSandboxService = void 0;
|
|
4
4
|
var service_1 = require("./service");
|
|
5
5
|
Object.defineProperty(exports, "createSandboxService", { enumerable: true, get: function () { return service_1.createSandboxService; } });
|
|
6
6
|
var policy_1 = require("./policy");
|
|
@@ -12,6 +12,10 @@ Object.defineProperty(exports, "PERMISSION_PRESETS", { enumerable: true, get: fu
|
|
|
12
12
|
Object.defineProperty(exports, "isPermissionPreset", { enumerable: true, get: function () { return presets_1.isPermissionPreset; } });
|
|
13
13
|
Object.defineProperty(exports, "matchPreset", { enumerable: true, get: function () { return presets_1.matchPreset; } });
|
|
14
14
|
Object.defineProperty(exports, "needsApproval", { enumerable: true, get: function () { return presets_1.needsApproval; } });
|
|
15
|
+
var inherit_1 = require("./inherit");
|
|
16
|
+
Object.defineProperty(exports, "checkNarrower", { enumerable: true, get: function () { return inherit_1.checkNarrower; } });
|
|
17
|
+
Object.defineProperty(exports, "isNarrowerOrEqual", { enumerable: true, get: function () { return inherit_1.isNarrowerOrEqual; } });
|
|
18
|
+
Object.defineProperty(exports, "describeViolations", { enumerable: true, get: function () { return inherit_1.describeViolations; } });
|
|
15
19
|
var paths_1 = require("./paths");
|
|
16
20
|
Object.defineProperty(exports, "realPathOf", { enumerable: true, get: function () { return paths_1.realPathOf; } });
|
|
17
21
|
Object.defineProperty(exports, "isInsideDir", { enumerable: true, get: function () { return paths_1.isInside; } });
|
|
@@ -26,4 +30,6 @@ var process_1 = require("./process");
|
|
|
26
30
|
Object.defineProperty(exports, "runProcess", { enumerable: true, get: function () { return process_1.runProcess; } });
|
|
27
31
|
Object.defineProperty(exports, "killProcessTree", { enumerable: true, get: function () { return process_1.killProcessTree; } });
|
|
28
32
|
Object.defineProperty(exports, "DEFAULT_MAX_OUTPUT_CHARS", { enumerable: true, get: function () { return process_1.DEFAULT_MAX_OUTPUT_CHARS; } });
|
|
33
|
+
var control_1 = require("./control");
|
|
34
|
+
Object.defineProperty(exports, "sandboxPolicyControl", { enumerable: true, get: function () { return control_1.sandboxPolicyControl; } });
|
|
29
35
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qCAAiD;AAAxC,+GAAA,oBAAoB,OAAA;AAE7B,mCAAsF;AAA7E,6GAAA,mBAAmB,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AAEnE,qCAA+F;AAAtF,6GAAA,kBAAkB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAAE,sGAAA,WAAW,OAAA;AAAE,wGAAA,aAAa,OAAA;AAE3E,iCAA8D;AAArD,mGAAA,UAAU,OAAA;AAAE,oGAAA,QAAQ,OAAe;AAC5C,6BAAiC;AAAxB,+FAAA,QAAQ,OAAA;AAEjB,wCAA8C;AAArC,mGAAA,WAAW,OAAA;AACpB,4CAAmE;AAA1D,uGAAA,aAAa,OAAA;AAAE,yGAAA,eAAe,OAAA;AAGvC,qCAAkF;AAAzE,qGAAA,UAAU,OAAA;AAAE,0GAAA,eAAe,OAAA;AAAE,mHAAA,wBAAwB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qCAAiD;AAAxC,+GAAA,oBAAoB,OAAA;AAE7B,mCAAsF;AAA7E,6GAAA,mBAAmB,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AAEnE,qCAA+F;AAAtF,6GAAA,kBAAkB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAAE,sGAAA,WAAW,OAAA;AAAE,wGAAA,aAAa,OAAA;AAE3E,qCAAiF;AAAxE,wGAAA,aAAa,OAAA;AAAE,4GAAA,iBAAiB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAE7D,iCAA8D;AAArD,mGAAA,UAAU,OAAA;AAAE,oGAAA,QAAQ,OAAe;AAC5C,6BAAiC;AAAxB,+FAAA,QAAQ,OAAA;AAEjB,wCAA8C;AAArC,mGAAA,WAAW,OAAA;AACpB,4CAAmE;AAA1D,uGAAA,aAAa,OAAA;AAAE,yGAAA,eAAe,OAAA;AAGvC,qCAAkF;AAAzE,qGAAA,UAAU,OAAA;AAAE,0GAAA,eAAe,OAAA;AAAE,mHAAA,wBAAwB,OAAA;AAE9D,qCAAiD;AAAxC,+GAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { SandboxPolicyConfig } from './policy';
|
|
2
|
+
export type InheritanceDimension = 'mode' | 'network' | 'approval' | 'roots' | 'writeTools' | 'commandTools' | 'env.allow' | 'env.deny';
|
|
3
|
+
export interface InheritanceViolation {
|
|
4
|
+
dimension: InheritanceDimension;
|
|
5
|
+
/** What the parent allows or requires in that dimension. */
|
|
6
|
+
parent: string;
|
|
7
|
+
/** What the child asks for. */
|
|
8
|
+
child: string;
|
|
9
|
+
}
|
|
10
|
+
export type InheritanceVerdict = {
|
|
11
|
+
ok: true;
|
|
12
|
+
} | {
|
|
13
|
+
ok: false;
|
|
14
|
+
violations: InheritanceViolation[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Is `child` no wider than `parent` in every dimension? A pure function, no I/O: it is what stops a created agent or a
|
|
18
|
+
* sub-agent from having more power than whoever made it. The comparison uses the WIDEST each policy can ever be (its base
|
|
19
|
+
* setting or any rule), so a rule cannot be used to slip past it.
|
|
20
|
+
*
|
|
21
|
+
* - mode and network: the child's widest must not exceed the parent's widest.
|
|
22
|
+
* - approval: the child must ask at least as much as the parent.
|
|
23
|
+
* - roots: each child root must lie inside a parent root (only matters while the parent's widest mode is not full access).
|
|
24
|
+
* - writeTools and commandTools: the child must keep every tool the parent lists (it cannot un-list a tool to dodge the read-only refusal or the approval).
|
|
25
|
+
* - env: the child may allow only variables the parent allows, and must keep every variable the parent denies.
|
|
26
|
+
*
|
|
27
|
+
* Returns every violation, so a caller can show why a request was refused (`POLICY_WIDER_THAN_PARENT`).
|
|
28
|
+
*/
|
|
29
|
+
export declare function checkNarrower(parent: SandboxPolicyConfig, child: SandboxPolicyConfig): InheritanceVerdict;
|
|
30
|
+
export declare function isNarrowerOrEqual(parent: SandboxPolicyConfig, child: SandboxPolicyConfig): boolean;
|
|
31
|
+
/** One line for logs and error messages: why `child` is wider than `parent`. */
|
|
32
|
+
export declare function describeViolations(violations: readonly InheritanceViolation[]): string;
|
|
33
|
+
//# sourceMappingURL=inherit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inherit.d.ts","sourceRoot":"","sources":["../src/inherit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAOpD,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,cAAc,GAAG,WAAW,GAAG,UAAU,CAAC;AAExI,MAAM,WAAW,oBAAoB;IACjC,SAAS,EAAE,oBAAoB,CAAC;IAChC,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,kBAAkB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,UAAU,EAAE,oBAAoB,EAAE,CAAA;CAAE,CAAC;AAuBlG;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,mBAAmB,GAAG,kBAAkB,CA6BzG;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAElG;AAED,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,SAAS,oBAAoB,EAAE,GAAG,MAAM,CAEtF"}
|
package/dist/inherit.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkNarrower = checkNarrower;
|
|
4
|
+
exports.isNarrowerOrEqual = isNarrowerOrEqual;
|
|
5
|
+
exports.describeViolations = describeViolations;
|
|
6
|
+
const paths_1 = require("./paths");
|
|
7
|
+
const presets_1 = require("./presets");
|
|
8
|
+
const MODE_RANK = { 'read-only': 0, 'workspace-write': 1, 'danger-full-access': 2 };
|
|
9
|
+
const NETWORK_RANK = { none: 0, allow: 1 };
|
|
10
|
+
const APPROVAL_RANK = { none: 0, commands: 1, 'writes-and-commands': 2 };
|
|
11
|
+
/** The most a policy can ever allow, across its base setting and every rule (a rule may widen a particular agent or tool). */
|
|
12
|
+
function ceiling(c) {
|
|
13
|
+
const preset = presets_1.PERMISSION_PRESETS[c.preset ?? 'ask'];
|
|
14
|
+
const baseMode = c.mode ?? preset.mode;
|
|
15
|
+
const scenarios = [];
|
|
16
|
+
const defaultNet = (m) => (m === 'danger-full-access' ? 'allow' : 'none');
|
|
17
|
+
scenarios.push({ mode: baseMode, network: c.network ?? defaultNet(baseMode) });
|
|
18
|
+
for (const r of c.rules ?? []) {
|
|
19
|
+
const mode = r.mode ?? baseMode;
|
|
20
|
+
scenarios.push({ mode, network: r.network ?? c.network ?? defaultNet(mode) });
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
mode: scenarios.reduce((m, s) => (MODE_RANK[s.mode] > MODE_RANK[m] ? s.mode : m), scenarios[0].mode),
|
|
24
|
+
network: scenarios.reduce((n, s) => (NETWORK_RANK[s.network] > NETWORK_RANK[n] ? s.network : n), scenarios[0].network),
|
|
25
|
+
approval: c.approval ?? preset.approval,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const list = (xs) => [...(xs ?? [])];
|
|
29
|
+
const show = (xs) => (xs.length ? xs.join(', ') : '(none)');
|
|
30
|
+
/**
|
|
31
|
+
* Is `child` no wider than `parent` in every dimension? A pure function, no I/O: it is what stops a created agent or a
|
|
32
|
+
* sub-agent from having more power than whoever made it. The comparison uses the WIDEST each policy can ever be (its base
|
|
33
|
+
* setting or any rule), so a rule cannot be used to slip past it.
|
|
34
|
+
*
|
|
35
|
+
* - mode and network: the child's widest must not exceed the parent's widest.
|
|
36
|
+
* - approval: the child must ask at least as much as the parent.
|
|
37
|
+
* - roots: each child root must lie inside a parent root (only matters while the parent's widest mode is not full access).
|
|
38
|
+
* - writeTools and commandTools: the child must keep every tool the parent lists (it cannot un-list a tool to dodge the read-only refusal or the approval).
|
|
39
|
+
* - env: the child may allow only variables the parent allows, and must keep every variable the parent denies.
|
|
40
|
+
*
|
|
41
|
+
* Returns every violation, so a caller can show why a request was refused (`POLICY_WIDER_THAN_PARENT`).
|
|
42
|
+
*/
|
|
43
|
+
function checkNarrower(parent, child) {
|
|
44
|
+
const violations = [];
|
|
45
|
+
const p = ceiling(parent);
|
|
46
|
+
const c = ceiling(child);
|
|
47
|
+
if (MODE_RANK[c.mode] > MODE_RANK[p.mode])
|
|
48
|
+
violations.push({ dimension: 'mode', parent: p.mode, child: c.mode });
|
|
49
|
+
if (NETWORK_RANK[c.network] > NETWORK_RANK[p.network])
|
|
50
|
+
violations.push({ dimension: 'network', parent: p.network, child: c.network });
|
|
51
|
+
if (APPROVAL_RANK[c.approval] < APPROVAL_RANK[p.approval])
|
|
52
|
+
violations.push({ dimension: 'approval', parent: p.approval, child: c.approval });
|
|
53
|
+
if (p.mode !== 'danger-full-access') {
|
|
54
|
+
const parentRoots = list(parent.roots);
|
|
55
|
+
const stray = list(child.roots).filter(root => !parentRoots.some(pr => (0, paths_1.isInside)(pr, root)));
|
|
56
|
+
if (stray.length)
|
|
57
|
+
violations.push({ dimension: 'roots', parent: show(parentRoots), child: show(stray) });
|
|
58
|
+
}
|
|
59
|
+
const missing = (a, b) => list(a).filter(x => !list(b).includes(x));
|
|
60
|
+
const writeGap = missing(parent.writeTools, child.writeTools);
|
|
61
|
+
if (writeGap.length)
|
|
62
|
+
violations.push({ dimension: 'writeTools', parent: show(list(parent.writeTools)), child: `missing ${show(writeGap)}` });
|
|
63
|
+
// commandTools defaults to ['run_command'] when unset (see the policy); compare the effective lists.
|
|
64
|
+
const effCommands = (c) => c.commandTools ?? ['run_command'];
|
|
65
|
+
const commandGap = missing(effCommands(parent), effCommands(child));
|
|
66
|
+
if (commandGap.length)
|
|
67
|
+
violations.push({ dimension: 'commandTools', parent: show(effCommands(parent)), child: `missing ${show(commandGap)}` });
|
|
68
|
+
const allowGap = list(child.env?.allow).filter(v => !list(parent.env?.allow).includes(v));
|
|
69
|
+
if (allowGap.length)
|
|
70
|
+
violations.push({ dimension: 'env.allow', parent: show(list(parent.env?.allow)), child: show(allowGap) });
|
|
71
|
+
const denyGap = missing(parent.env?.deny, child.env?.deny);
|
|
72
|
+
if (denyGap.length)
|
|
73
|
+
violations.push({ dimension: 'env.deny', parent: show(list(parent.env?.deny)), child: `missing ${show(denyGap)}` });
|
|
74
|
+
return violations.length ? { ok: false, violations } : { ok: true };
|
|
75
|
+
}
|
|
76
|
+
function isNarrowerOrEqual(parent, child) {
|
|
77
|
+
return checkNarrower(parent, child).ok;
|
|
78
|
+
}
|
|
79
|
+
/** One line for logs and error messages: why `child` is wider than `parent`. */
|
|
80
|
+
function describeViolations(violations) {
|
|
81
|
+
return violations.map(v => `${v.dimension}: child ${v.child} vs parent ${v.parent}`).join('; ');
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=inherit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inherit.js","sourceRoot":"","sources":["../src/inherit.ts"],"names":[],"mappings":";;AAuDA,sCA6BC;AAED,8CAEC;AAGD,gDAEC;AA5FD,mCAAmC;AAEnC,uCAAmE;AAEnE,MAAM,SAAS,GAAgC,EAAE,WAAW,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,CAAC;AACjH,MAAM,YAAY,GAAmC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAC3E,MAAM,aAAa,GAAkC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,qBAAqB,EAAE,CAAC,EAAE,CAAC;AAcxG,8HAA8H;AAC9H,SAAS,OAAO,CAAC,CAAsB;IACnC,MAAM,MAAM,GAAG,4BAAkB,CAAC,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC;IACrD,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC;IACvC,MAAM,SAAS,GAA0D,EAAE,CAAC;IAC5E,MAAM,UAAU,GAAG,CAAC,CAAc,EAAkB,EAAE,CAAC,CAAC,CAAC,KAAK,oBAAoB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACvG,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC/E,KAAK,MAAM,CAAC,IAAI,CAAC,CA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,CAAC;AACpG,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backendkit-labs/agent-sandbox",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Confinement and permissions for what agents run: sandbox modes, presets, a single policy point, swappable backends (host, docker) and environment hygiene, for @backendkit-labs/agent-core",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test": "jest"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@backendkit-labs/agent-core": ">=0.
|
|
25
|
+
"@backendkit-labs/agent-core": ">=0.32.0 <0.33.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/jest": "^29.0.0",
|