approval-md 0.3.0 → 0.4.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/README.md +83 -914
- package/SPEC.md +101 -13
- package/cli.js +134 -7
- package/dist/src/adapters/smtp.d.ts +18 -0
- package/dist/src/adapters/smtp.js +24 -3
- package/dist/src/adapters/smtp.js.map +1 -1
- package/dist/src/channels/contract.d.ts +72 -0
- package/dist/src/channels/contract.js +161 -1
- package/dist/src/channels/contract.js.map +1 -1
- package/dist/src/channels/relay-server.d.ts +90 -0
- package/dist/src/channels/relay-server.js +295 -0
- package/dist/src/channels/relay-server.js.map +1 -0
- package/dist/src/channels/relay.d.ts +273 -0
- package/dist/src/channels/relay.js +564 -0
- package/dist/src/channels/relay.js.map +1 -0
- package/dist/src/channels/tagging.d.ts +25 -0
- package/dist/src/channels/tagging.js +63 -6
- package/dist/src/channels/tagging.js.map +1 -1
- package/dist/src/channels/telegram-minimal.d.ts +251 -0
- package/dist/src/channels/telegram-minimal.js +618 -0
- package/dist/src/channels/telegram-minimal.js.map +1 -0
- package/dist/src/channels/telegram-webhook.d.ts +273 -0
- package/dist/src/channels/telegram-webhook.js +536 -0
- package/dist/src/channels/telegram-webhook.js.map +1 -0
- package/dist/src/channels/telegram.d.ts +725 -20
- package/dist/src/channels/telegram.js +1332 -123
- package/dist/src/channels/telegram.js.map +1 -1
- package/dist/src/cli/amend.js +358 -5
- package/dist/src/cli/amend.js.map +1 -1
- package/dist/src/cli/attest.js +43 -6
- package/dist/src/cli/attest.js.map +1 -1
- package/dist/src/cli/audit-card.d.ts +1 -1
- package/dist/src/cli/audit-card.js +40 -1
- package/dist/src/cli/audit-card.js.map +1 -1
- package/dist/src/cli/audit.d.ts +7 -5
- package/dist/src/cli/audit.js +22 -10
- package/dist/src/cli/audit.js.map +1 -1
- package/dist/src/cli/channel-relay.d.ts +108 -0
- package/dist/src/cli/channel-relay.js +334 -0
- package/dist/src/cli/channel-relay.js.map +1 -0
- package/dist/src/cli/channel-telegram-webhook.d.ts +275 -0
- package/dist/src/cli/channel-telegram-webhook.js +716 -0
- package/dist/src/cli/channel-telegram-webhook.js.map +1 -0
- package/dist/src/cli/channel-telegram.d.ts +347 -28
- package/dist/src/cli/channel-telegram.js +648 -56
- package/dist/src/cli/channel-telegram.js.map +1 -1
- package/dist/src/cli/channel.d.ts +1 -1
- package/dist/src/cli/channel.js +5 -1
- package/dist/src/cli/channel.js.map +1 -1
- package/dist/src/cli/daemon.js +37 -5
- package/dist/src/cli/daemon.js.map +1 -1
- package/dist/src/cli/doctor.d.ts +63 -0
- package/dist/src/cli/doctor.js +856 -111
- package/dist/src/cli/doctor.js.map +1 -1
- package/dist/src/cli/execute.d.ts +29 -1
- package/dist/src/cli/execute.js +387 -21
- package/dist/src/cli/execute.js.map +1 -1
- package/dist/src/cli/exit-codes.d.ts +12 -0
- package/dist/src/cli/exit-codes.js +13 -0
- package/dist/src/cli/exit-codes.js.map +1 -1
- package/dist/src/cli/gate.d.ts +2 -0
- package/dist/src/cli/gate.js +233 -2
- package/dist/src/cli/gate.js.map +1 -1
- package/dist/src/cli/help.d.ts +10 -1
- package/dist/src/cli/help.js +283 -54
- package/dist/src/cli/help.js.map +1 -1
- package/dist/src/cli/hook.d.ts +485 -6
- package/dist/src/cli/hook.js +2370 -70
- package/dist/src/cli/hook.js.map +1 -1
- package/dist/src/cli/init.js +16 -7
- package/dist/src/cli/init.js.map +1 -1
- package/dist/src/cli/instructions.js +24 -3
- package/dist/src/cli/instructions.js.map +1 -1
- package/dist/src/cli/log-anchor.d.ts +55 -0
- package/dist/src/cli/log-anchor.js +199 -60
- package/dist/src/cli/log-anchor.js.map +1 -1
- package/dist/src/cli/log-unlock.d.ts +23 -0
- package/dist/src/cli/log-unlock.js +109 -0
- package/dist/src/cli/log-unlock.js.map +1 -0
- package/dist/src/cli/main.d.ts +0 -12
- package/dist/src/cli/main.js +72 -4
- package/dist/src/cli/main.js.map +1 -1
- package/dist/src/cli/muse.d.ts +2 -0
- package/dist/src/cli/muse.js +62 -0
- package/dist/src/cli/muse.js.map +1 -0
- package/dist/src/cli/payload.js +79 -1
- package/dist/src/cli/payload.js.map +1 -1
- package/dist/src/cli/scaffold.js +6 -0
- package/dist/src/cli/scaffold.js.map +1 -1
- package/dist/src/cli/serve.d.ts +53 -0
- package/dist/src/cli/serve.js +270 -0
- package/dist/src/cli/serve.js.map +1 -0
- package/dist/src/cli/up.js +26 -2
- package/dist/src/cli/up.js.map +1 -1
- package/dist/src/cli/verb-registry.d.ts +2 -0
- package/dist/src/cli/verb-registry.js +338 -39
- package/dist/src/cli/verb-registry.js.map +1 -1
- package/dist/src/cli/wordmark.d.ts +2 -2
- package/dist/src/cli/wordmark.js +2 -2
- package/dist/src/core/attest-bootstrap.d.ts +95 -0
- package/dist/src/core/attest-bootstrap.js +135 -0
- package/dist/src/core/attest-bootstrap.js.map +1 -0
- package/dist/src/core/attest.d.ts +20 -3
- package/dist/src/core/attest.js +25 -0
- package/dist/src/core/attest.js.map +1 -1
- package/dist/src/core/audit.d.ts +153 -12
- package/dist/src/core/audit.js +415 -20
- package/dist/src/core/audit.js.map +1 -1
- package/dist/src/core/channel-lease.d.ts +322 -0
- package/dist/src/core/channel-lease.js +663 -0
- package/dist/src/core/channel-lease.js.map +1 -0
- package/dist/src/core/command-class.d.ts +51 -0
- package/dist/src/core/command-class.js +766 -8
- package/dist/src/core/command-class.js.map +1 -1
- package/dist/src/core/daemon-host.d.ts +178 -0
- package/dist/src/core/daemon-host.js +228 -0
- package/dist/src/core/daemon-host.js.map +1 -0
- package/dist/src/core/daemon-identity.d.ts +238 -0
- package/dist/src/core/daemon-identity.js +252 -0
- package/dist/src/core/daemon-identity.js.map +1 -0
- package/dist/src/core/gate.d.ts +364 -6
- package/dist/src/core/gate.js +802 -27
- package/dist/src/core/gate.js.map +1 -1
- package/dist/src/core/harness-version.d.ts +128 -4
- package/dist/src/core/harness-version.js +179 -12
- package/dist/src/core/harness-version.js.map +1 -1
- package/dist/src/core/harness-wait.d.ts +82 -3
- package/dist/src/core/harness-wait.js +89 -3
- package/dist/src/core/harness-wait.js.map +1 -1
- package/dist/src/core/log-lock.d.ts +435 -0
- package/dist/src/core/log-lock.js +1093 -0
- package/dist/src/core/log-lock.js.map +1 -0
- package/dist/src/core/log-subscribe.d.ts +21 -0
- package/dist/src/core/log-subscribe.js +16 -6
- package/dist/src/core/log-subscribe.js.map +1 -1
- package/dist/src/core/log-write-layer.d.ts +55 -0
- package/dist/src/core/log-write-layer.js +91 -0
- package/dist/src/core/log-write-layer.js.map +1 -0
- package/dist/src/core/log.d.ts +130 -22
- package/dist/src/core/log.js +473 -50
- package/dist/src/core/log.js.map +1 -1
- package/dist/src/core/payload-census.d.ts +51 -0
- package/dist/src/core/payload-census.js +125 -2
- package/dist/src/core/payload-census.js.map +1 -1
- package/dist/src/core/payload-store.d.ts +31 -0
- package/dist/src/core/payload-store.js +113 -8
- package/dist/src/core/payload-store.js.map +1 -1
- package/dist/src/core/payload.d.ts +18 -3
- package/dist/src/core/payload.js +20 -4
- package/dist/src/core/payload.js.map +1 -1
- package/dist/src/core/policy-diff.d.ts +10 -0
- package/dist/src/core/policy-diff.js +10 -2
- package/dist/src/core/policy-diff.js.map +1 -1
- package/dist/src/core/policy-explain.d.ts +7 -1
- package/dist/src/core/policy-explain.js +16 -1
- package/dist/src/core/policy-explain.js.map +1 -1
- package/dist/src/core/policy-load.d.ts +24 -0
- package/dist/src/core/policy-load.js.map +1 -1
- package/dist/src/core/policy-match.d.ts +38 -0
- package/dist/src/core/policy-match.js +35 -0
- package/dist/src/core/policy-match.js.map +1 -1
- package/dist/src/core/policy-proposal.d.ts +40 -0
- package/dist/src/core/policy-proposal.js +37 -16
- package/dist/src/core/policy-proposal.js.map +1 -1
- package/dist/src/core/prompt-layout.d.ts +186 -1
- package/dist/src/core/prompt-layout.js +345 -3
- package/dist/src/core/prompt-layout.js.map +1 -1
- package/dist/src/core/read-scope.d.ts +10 -0
- package/dist/src/core/read-scope.js +4 -0
- package/dist/src/core/read-scope.js.map +1 -1
- package/dist/src/core/run-payload.d.ts +160 -0
- package/dist/src/core/run-payload.js +304 -0
- package/dist/src/core/run-payload.js.map +1 -0
- package/dist/src/core/sender-identity.d.ts +59 -11
- package/dist/src/core/sender-identity.js +79 -11
- package/dist/src/core/sender-identity.js.map +1 -1
- package/dist/src/core/state.d.ts +52 -1
- package/dist/src/core/state.js +52 -6
- package/dist/src/core/state.js.map +1 -1
- package/dist/src/core/telegram-config.d.ts +79 -0
- package/dist/src/core/telegram-config.js +108 -0
- package/dist/src/core/telegram-config.js.map +1 -1
- package/dist/src/core/validate.d.ts +20 -6
- package/dist/src/core/validate.js +0 -0
- package/dist/src/core/validate.js.map +1 -1
- package/dist/src/core/verify.d.ts +23 -1
- package/dist/src/core/verify.js +20 -2
- package/dist/src/core/verify.js.map +1 -1
- package/dist/src/daemon/audit.d.ts +80 -5
- package/dist/src/daemon/audit.js +126 -6
- package/dist/src/daemon/audit.js.map +1 -1
- package/dist/src/daemon/daemon.d.ts +174 -2
- package/dist/src/daemon/daemon.js +298 -7
- package/dist/src/daemon/daemon.js.map +1 -1
- package/dist/src/daemon/git-evidence.d.ts +2 -2
- package/dist/src/daemon/git-evidence.js +1 -1
- package/dist/src/daemon/projection.d.ts +13 -2
- package/dist/src/daemon/projection.js +39 -6
- package/dist/src/daemon/projection.js.map +1 -1
- package/dist/src/mcp/server.d.ts +39 -3
- package/dist/src/mcp/server.js +22 -3
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/muse/server.d.ts +16 -0
- package/dist/src/muse/server.js +238 -0
- package/dist/src/muse/server.js.map +1 -0
- package/dist/src/serve/archive.d.ts +166 -0
- package/dist/src/serve/archive.js +363 -0
- package/dist/src/serve/archive.js.map +1 -0
- package/dist/src/serve/arguments.d.ts +93 -0
- package/dist/src/serve/arguments.js +228 -0
- package/dist/src/serve/arguments.js.map +1 -0
- package/dist/src/serve/credentials.d.ts +91 -0
- package/dist/src/serve/credentials.js +143 -0
- package/dist/src/serve/credentials.js.map +1 -0
- package/dist/src/serve/follow.d.ts +86 -0
- package/dist/src/serve/follow.js +101 -0
- package/dist/src/serve/follow.js.map +1 -0
- package/dist/src/serve/hook-thread.d.ts +134 -0
- package/dist/src/serve/hook-thread.js +333 -0
- package/dist/src/serve/hook-thread.js.map +1 -0
- package/dist/src/serve/hook-worker.d.ts +134 -0
- package/dist/src/serve/hook-worker.js +173 -0
- package/dist/src/serve/hook-worker.js.map +1 -0
- package/dist/src/serve/server.d.ts +412 -0
- package/dist/src/serve/server.js +1251 -0
- package/dist/src/serve/server.js.map +1 -0
- package/docs/README-extended.md +768 -0
- package/docs/cli-reference.md +2139 -67
- package/package.json +4 -2
- package/schema/event.schema.json +413 -30
- package/schema/fixtures/event/invalid/audit-lock-reclaimed-age-without-created.json +19 -0
- package/schema/fixtures/event/invalid/audit-lock-reclaimed-agent-actor.json +14 -0
- package/schema/fixtures/event/invalid/audit-lock-reclaimed-lockfile-path.json +14 -0
- package/schema/fixtures/event/invalid/audit-lock-reclaimed-operator-cleared-system-actor.json +14 -0
- package/schema/fixtures/event/invalid/audit-lock-reclaimed-unknown-reason.json +14 -0
- package/schema/fixtures/event/invalid/audit-lock-reclaimed-without-age.json +13 -0
- package/schema/fixtures/event/invalid/audit-reviewed-agent-actor.json +6 -1
- package/schema/fixtures/event/invalid/audit-reviewed-bad-payload-hash.json +21 -0
- package/schema/fixtures/event/invalid/audit-reviewed-loved-no-note.json +5 -0
- package/schema/fixtures/event/invalid/audit-reviewed-no-subject-hash.json +19 -0
- package/schema/fixtures/event/invalid/audit-reviewed-no-subject-seq.json +19 -0
- package/schema/fixtures/event/invalid/audit-reviewed-no-verdict-source.json +19 -0
- package/schema/fixtures/event/invalid/audit-reviewed-no-verdict.json +19 -0
- package/schema/fixtures/event/invalid/audit-reviewed-system-actor.json +6 -1
- package/schema/fixtures/event/invalid/audit-sampled-no-policy-hash.json +14 -0
- package/schema/fixtures/event/invalid/daemon-id-malformed.json +15 -0
- package/schema/fixtures/event/invalid/execution-started-truncated-policy-sha256.json +18 -0
- package/schema/fixtures/event/invalid/harness-cap-at-margin.json +16 -0
- package/schema/fixtures/event/invalid/harness-cap-fractional.json +16 -0
- package/schema/fixtures/event/invalid/harness-cap-negative.json +16 -0
- package/schema/fixtures/event/invalid/harness-cap-string.json +16 -0
- package/schema/fixtures/event/invalid/harness-cap-without-harness-execution.json +16 -0
- package/schema/fixtures/event/invalid/harness-cap-zero.json +16 -0
- package/schema/fixtures/event/valid/approval-requested-harness-cap.json +18 -0
- package/schema/fixtures/event/valid/audit-lock-reclaimed-implausible-created.json +18 -0
- package/schema/fixtures/event/valid/audit-lock-reclaimed-legacy.json +14 -0
- package/schema/fixtures/event/valid/audit-lock-reclaimed-unlock.json +19 -0
- package/schema/fixtures/event/valid/audit-lock-reclaimed.json +19 -0
- package/schema/fixtures/event/valid/audit-reviewed-reaction.json +5 -0
- package/schema/fixtures/event/valid/audit-reviewed.json +6 -1
- package/schema/fixtures/event/valid/audit-sampled.json +2 -1
- package/schema/fixtures/event/valid/daemon-identity-declared.json +17 -0
- package/schema/fixtures/event/valid/daemon-identity.json +16 -0
- package/schema/fixtures/event/valid/execution-started-policy-sha256.json +18 -0
- package/schema/fixtures/event/valid/harness-kind-hermes.json +23 -0
- package/schema/fixtures/policy/invalid/daemons-malformed-id.json +10 -0
- package/schema/fixtures/policy/valid/daemons-allowlist.json +19 -0
- package/schema/fixtures/policy-md/invalid/schema-invalid-agent-may-request.md +21 -0
- package/schema/fixtures/policy-md/valid/agent-may-request.md +24 -0
- package/schema/policy.schema.json +102 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-layout.js","sourceRoot":"","sources":["../../../src/core/prompt-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAKH;;;;;;;;;GASG;AACH,MAAM,CA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AAG,KAAK,MAAM,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;oBACzD,MAAM,CAAC,IAAI,CAAC;wBACV,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE;wBACrC,OAAO,EAAE,qBAAqB;wBAC9B,OAAO,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,sFAAsF,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;qBAC3J,CAAC,CAAC;gBACL,CAAC;YACH,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACpB,CAAC;QAED,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,GAAG,EAAU,EAAE,CAAC;YACtD,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;gBACpC,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAE,GAAG,EAAE,OAAO;oBAClB,OAAO,EAAE,qBAAqB;oBAC9B,OAAO,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,4DAA4D;iBAChG,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -128,6 +128,16 @@ export declare function effectiveReadRoots(options: {
|
|
|
128
128
|
* `read.shell` (this repository's policy: autonomous), which is a widening,
|
|
129
129
|
* and a task that exists to narrow reads has no business doing that in
|
|
130
130
|
* passing. They are named in the follow-up in `docs/sandboxed-exec.md`.
|
|
131
|
+
*
|
|
132
|
+
* APRV-397 adds the packaging readers, so the reads the new classifier rows
|
|
133
|
+
* answer are scoped by the same arithmetic every other reader's are: `tar`,
|
|
134
|
+
* `gunzip` and `base64` are `all` (their operands are files, and a flag value
|
|
135
|
+
* that lands among the positionals resolves against the working directory,
|
|
136
|
+
* which costs nothing: see the note below), and `openssl` is `after-pattern`,
|
|
137
|
+
* because its first positional is the digest subcommand and the files follow it. Only
|
|
138
|
+
* the READ forms of those binaries ever reach this table: `tar -x`, a plain
|
|
139
|
+
* `gunzip` and `base64 -o` take write classes in the classifier, and this module
|
|
140
|
+
* scopes `read.shell` alone.
|
|
131
141
|
*/
|
|
132
142
|
export type ReadTargetShape = "all" | "after-pattern" | "walk";
|
|
133
143
|
/** Which readers take paths, and where. Keyed by the binary's basename. */
|
|
@@ -129,6 +129,7 @@ export function effectiveReadRoots(options) {
|
|
|
129
129
|
}
|
|
130
130
|
/** Which readers take paths, and where. Keyed by the binary's basename. */
|
|
131
131
|
export const READ_TARGET_SHAPES = {
|
|
132
|
+
base64: "all",
|
|
132
133
|
cat: "all",
|
|
133
134
|
cksum: "all",
|
|
134
135
|
cut: "all",
|
|
@@ -137,10 +138,12 @@ export const READ_TARGET_SHAPES = {
|
|
|
137
138
|
file: "all",
|
|
138
139
|
find: "walk",
|
|
139
140
|
grep: "after-pattern",
|
|
141
|
+
gunzip: "all",
|
|
140
142
|
head: "all",
|
|
141
143
|
jq: "after-pattern",
|
|
142
144
|
ls: "all",
|
|
143
145
|
md5sum: "all",
|
|
146
|
+
openssl: "after-pattern",
|
|
144
147
|
rg: "after-pattern",
|
|
145
148
|
sed: "after-pattern",
|
|
146
149
|
sha256sum: "all",
|
|
@@ -148,6 +151,7 @@ export const READ_TARGET_SHAPES = {
|
|
|
148
151
|
sort: "all",
|
|
149
152
|
stat: "all",
|
|
150
153
|
tail: "all",
|
|
154
|
+
tar: "all",
|
|
151
155
|
tree: "all",
|
|
152
156
|
uniq: "all",
|
|
153
157
|
wc: "all",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-scope.js","sourceRoot":"","sources":["../../../src/core/read-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;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`approval run` payload: the argv, the cwd, and the bytes of the script
|
|
3
|
+
* the argv names (SPEC.md §6.2, §10.4; APRV-401).
|
|
4
|
+
*
|
|
5
|
+
* ## The hazard this closes
|
|
6
|
+
*
|
|
7
|
+
* §6.2 defined this payload as "the argv array and cwd", and `approval run`
|
|
8
|
+
* recomputes it from the argv and cwd it is about to spawn. For a command that
|
|
9
|
+
* IS its own bytes (`npm update @types/node`) that is the whole action. For a
|
|
10
|
+
* command that names a script it is not: the payload binds a NAME, and the
|
|
11
|
+
* bytes behind that name are whatever the path holds at execution time. The
|
|
12
|
+
* requester controls the file between the request and the grant, so a human
|
|
13
|
+
* approved a path and the runtime executed a file. Found on a live grant during
|
|
14
|
+
* APRV-398, exploited by nobody, filed as APRV-401.
|
|
15
|
+
*
|
|
16
|
+
* The payload hash is supposed to BE the binding (§10.4: "A grant therefore
|
|
17
|
+
* approves specific bytes"), so the repair is to put the bytes inside it. A
|
|
18
|
+
* script edited between the declaration and the execution hashes differently,
|
|
19
|
+
* and the difference refuses `payload-mismatch` before the child is spawned and
|
|
20
|
+
* before anything is appended, exactly as a changed argv already did.
|
|
21
|
+
*
|
|
22
|
+
* ## The shape, as the operator ruled it (APRV-401 notes, 2026-09-21)
|
|
23
|
+
*
|
|
24
|
+
* > the script digest is PART OF THE BINDING, never advisory. Shape: when argv
|
|
25
|
+
* > names an interpreter (bash, sh, zsh, node, python3 and kin) followed by a
|
|
26
|
+
* > path that resolves to a regular file at request time, the runtime reads and
|
|
27
|
+
* > hashes the file into the bound payload, the card shows the digest, byte
|
|
28
|
+
* > count and path, and approval run re-reads the file and refuses
|
|
29
|
+
* > payload-mismatch if the bytes changed. No interpretation of the script and
|
|
30
|
+
* > no second pass for files it sources; the limit is documented. Out of scope:
|
|
31
|
+
* > piped installers (already opaque), sourced files, interpreters the
|
|
32
|
+
* > classifier does not name.
|
|
33
|
+
*
|
|
34
|
+
* So this is an INTERPRETER-KEYED rule and not "every argv word that happens to
|
|
35
|
+
* name a file". One script per invocation: the first word after the interpreter
|
|
36
|
+
* that resolves to a readable regular file, which is the interpreter's operand
|
|
37
|
+
* whether or not a subcommand comes first (`deno run job.ts`).
|
|
38
|
+
* {@link SCRIPT_INTERPRETERS} is the list, and every member of it is a name
|
|
39
|
+
* `core/command-class.ts` already knows: the six shells of its unwrappable set,
|
|
40
|
+
* `node` from its own branch, and `python`, `python3`, `perl`, `ruby` and
|
|
41
|
+
* `deno` from its inline-source table. A launcher neither file names binds
|
|
42
|
+
* nothing, which is the documented limit rather than an oversight.
|
|
43
|
+
*
|
|
44
|
+
* The one thing here that the ruling does not spell out is the DEGENERATE case:
|
|
45
|
+
* `./install.sh` with no interpreter word at all, where the kernel reads the
|
|
46
|
+
* shebang and the script is `argv[0]` itself. It is bound, because it is the
|
|
47
|
+
* same fact with the interpreter implied rather than typed, and leaving it out
|
|
48
|
+
* would be a hole in the rule shaped exactly like the rule.
|
|
49
|
+
*
|
|
50
|
+
* ## What is NOT bound, stated plainly
|
|
51
|
+
*
|
|
52
|
+
* - **An inline program.** `bash -c '…'`, `node -e '…'`, `python3 -c '…'`: the
|
|
53
|
+
* program is a word of the argv, so it was always bound, and there is no file
|
|
54
|
+
* to read. The inline flags per interpreter are in {@link SCRIPT_INTERPRETERS}.
|
|
55
|
+
* - **Nothing resolved through PATH.** The interpreter itself is not hashed. Its
|
|
56
|
+
* bytes are the host's rather than the requester's, and resolving a program
|
|
57
|
+
* name through `PATH` would make the payload a function of the environment the
|
|
58
|
+
* process happens to hold, which §11 says is never read implicitly.
|
|
59
|
+
* - **Nothing transitive.** A bound script that sources another file, curls a
|
|
60
|
+
* second one, or execs a third binds only its own bytes. The digest is a
|
|
61
|
+
* binding, not a sandbox.
|
|
62
|
+
* - **A piped installer.** `curl … | sh` has no file operand and is opaque to
|
|
63
|
+
* the classifier for the same reason it is unbindable here.
|
|
64
|
+
* - **The instant between hashing and spawning.** The digest is taken, then
|
|
65
|
+
* `execution.started` is appended, then the child is spawned. A file rewritten
|
|
66
|
+
* inside that window runs unbound. Closing it needs the executor to hold the
|
|
67
|
+
* bytes rather than the path, which is the adapter contract of §10.4.
|
|
68
|
+
*
|
|
69
|
+
* ## Absence is not a claim
|
|
70
|
+
*
|
|
71
|
+
* `script` is omitted when nothing is bound, and that omission is deliberate: an
|
|
72
|
+
* invocation naming no readable script hashes to exactly the value it hashed
|
|
73
|
+
* before this module existed, so every record already in the log, and every
|
|
74
|
+
* declaration already written into a task file, verifies unchanged. What the
|
|
75
|
+
* absence does NOT say is "this runtime checked and there was nothing" — it is
|
|
76
|
+
* the ordinary shape of a payload with no script to bind, and a reader wanting
|
|
77
|
+
* to know whether a digest was possible reads the argv, which is right there.
|
|
78
|
+
*
|
|
79
|
+
* Every skip is safe for one reason, and it is the same reason in each case: the
|
|
80
|
+
* value is recomputed at execution by this same rule. A file that was
|
|
81
|
+
* unreadable at declaration time and readable at execution time gains an entry
|
|
82
|
+
* and refuses; one that existed and was deleted loses one and refuses. The rule
|
|
83
|
+
* does not have to decide correctly what a command will do, because both ends
|
|
84
|
+
* apply it to the same tree and any disagreement is a refusal.
|
|
85
|
+
*
|
|
86
|
+
* Reads the filesystem, by design and by necessity: at most one file per call,
|
|
87
|
+
* and only the one the argv names. Writes nothing, appends nothing, reads no
|
|
88
|
+
* log, no policy, no environment and no clock.
|
|
89
|
+
*/
|
|
90
|
+
/** The payload key carrying the bound script. Omitted when there is none. */
|
|
91
|
+
export declare const BOUND_SCRIPT_KEY = "script";
|
|
92
|
+
/**
|
|
93
|
+
* How much of a file is read at once while digesting it.
|
|
94
|
+
*
|
|
95
|
+
* Chunked rather than `readFileSync`, because a script may be of any size and
|
|
96
|
+
* the executor must not be the thing that runs out of memory: a refusal to
|
|
97
|
+
* compute the binding is a refusal to execute.
|
|
98
|
+
*/
|
|
99
|
+
export declare const DIGEST_CHUNK_BYTES: number;
|
|
100
|
+
/**
|
|
101
|
+
* The interpreters whose script operand is bound, and the flags that mean
|
|
102
|
+
* "the program is inline, there is no file".
|
|
103
|
+
*
|
|
104
|
+
* Every name here is one `core/command-class.ts` already knows, which is the
|
|
105
|
+
* ruling's "interpreters the classifier does not name" read as a positive list:
|
|
106
|
+
* the six shells of its unwrappable set, `node` from its own classification
|
|
107
|
+
* branch, and `python`, `python3`, `perl`, `ruby`, `deno` from its
|
|
108
|
+
* inline-source table. The list is duplicated rather than imported because
|
|
109
|
+
* those tables are private to that module and a public export of them would be
|
|
110
|
+
* a second consumer of a decision that belongs to classification; the comment
|
|
111
|
+
* is the seam, and a name added there without being added here binds nothing,
|
|
112
|
+
* which fails toward the old behaviour rather than toward a wrong digest.
|
|
113
|
+
*
|
|
114
|
+
* The shell inline flag is `-c` with any run of `l` and `i` before it, which is
|
|
115
|
+
* `INLINE_SCRIPT_FLAG` in that module, spelled here as the same regular
|
|
116
|
+
* expression for the same reason.
|
|
117
|
+
*/
|
|
118
|
+
export declare const SCRIPT_INTERPRETERS: ReadonlyMap<string, readonly (string | RegExp)[]>;
|
|
119
|
+
/** One script the argv names, bound by its bytes. */
|
|
120
|
+
export interface BoundScript {
|
|
121
|
+
/** Which argv word named it. */
|
|
122
|
+
argv_index: number;
|
|
123
|
+
/** The path as resolved against the payload's `cwd`: absolute, always. */
|
|
124
|
+
path: string;
|
|
125
|
+
/** The file's size in bytes, which the approver's card shows beside the digest. */
|
|
126
|
+
bytes: number;
|
|
127
|
+
/** SHA-256 (lowercase hex) of the file's bytes. */
|
|
128
|
+
sha256: string;
|
|
129
|
+
}
|
|
130
|
+
/** The `approval run` payload value, canonicalized and hashed by the caller. */
|
|
131
|
+
export interface RunPayload {
|
|
132
|
+
argv: string[];
|
|
133
|
+
cwd: string;
|
|
134
|
+
/** Present only when the argv named a readable script. */
|
|
135
|
+
script?: BoundScript;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* The script this argv runs, bound by its bytes, or `null` (APRV-401).
|
|
139
|
+
*
|
|
140
|
+
* Two shapes, and only two: an interpreter this module names followed by a path
|
|
141
|
+
* operand, and a path at `argv[0]` that the kernel will read a shebang from.
|
|
142
|
+
* Anything else binds nothing and the payload is what it always was.
|
|
143
|
+
*/
|
|
144
|
+
export declare function boundScript(argv: readonly string[], cwd: string): BoundScript | null;
|
|
145
|
+
/**
|
|
146
|
+
* The value `approval run`'s `payload_hash` is taken over (SPEC.md §6.2).
|
|
147
|
+
*
|
|
148
|
+
* `{argv, cwd}` when the argv names no readable script, byte for byte what it
|
|
149
|
+
* has always been; `{argv, cwd, script}` when it does. The caller canonicalizes
|
|
150
|
+
* and hashes it — this function decides WHAT is bound and never how it is
|
|
151
|
+
* digested into an approval.
|
|
152
|
+
*/
|
|
153
|
+
export declare function runPayloadValue(argv: readonly string[], cwd: string): RunPayload;
|
|
154
|
+
/**
|
|
155
|
+
* One line naming the bound script, for a refusal message or a terminal.
|
|
156
|
+
*
|
|
157
|
+
* Not a rendering an approver signs: the canonical renderer owns that, and this
|
|
158
|
+
* is the executor explaining to an agent WHICH file moved.
|
|
159
|
+
*/
|
|
160
|
+
export declare function describeBoundScript(script: BoundScript | null): string;
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `approval run` payload: the argv, the cwd, and the bytes of the script
|
|
3
|
+
* the argv names (SPEC.md §6.2, §10.4; APRV-401).
|
|
4
|
+
*
|
|
5
|
+
* ## The hazard this closes
|
|
6
|
+
*
|
|
7
|
+
* §6.2 defined this payload as "the argv array and cwd", and `approval run`
|
|
8
|
+
* recomputes it from the argv and cwd it is about to spawn. For a command that
|
|
9
|
+
* IS its own bytes (`npm update @types/node`) that is the whole action. For a
|
|
10
|
+
* command that names a script it is not: the payload binds a NAME, and the
|
|
11
|
+
* bytes behind that name are whatever the path holds at execution time. The
|
|
12
|
+
* requester controls the file between the request and the grant, so a human
|
|
13
|
+
* approved a path and the runtime executed a file. Found on a live grant during
|
|
14
|
+
* APRV-398, exploited by nobody, filed as APRV-401.
|
|
15
|
+
*
|
|
16
|
+
* The payload hash is supposed to BE the binding (§10.4: "A grant therefore
|
|
17
|
+
* approves specific bytes"), so the repair is to put the bytes inside it. A
|
|
18
|
+
* script edited between the declaration and the execution hashes differently,
|
|
19
|
+
* and the difference refuses `payload-mismatch` before the child is spawned and
|
|
20
|
+
* before anything is appended, exactly as a changed argv already did.
|
|
21
|
+
*
|
|
22
|
+
* ## The shape, as the operator ruled it (APRV-401 notes, 2026-09-21)
|
|
23
|
+
*
|
|
24
|
+
* > the script digest is PART OF THE BINDING, never advisory. Shape: when argv
|
|
25
|
+
* > names an interpreter (bash, sh, zsh, node, python3 and kin) followed by a
|
|
26
|
+
* > path that resolves to a regular file at request time, the runtime reads and
|
|
27
|
+
* > hashes the file into the bound payload, the card shows the digest, byte
|
|
28
|
+
* > count and path, and approval run re-reads the file and refuses
|
|
29
|
+
* > payload-mismatch if the bytes changed. No interpretation of the script and
|
|
30
|
+
* > no second pass for files it sources; the limit is documented. Out of scope:
|
|
31
|
+
* > piped installers (already opaque), sourced files, interpreters the
|
|
32
|
+
* > classifier does not name.
|
|
33
|
+
*
|
|
34
|
+
* So this is an INTERPRETER-KEYED rule and not "every argv word that happens to
|
|
35
|
+
* name a file". One script per invocation: the first word after the interpreter
|
|
36
|
+
* that resolves to a readable regular file, which is the interpreter's operand
|
|
37
|
+
* whether or not a subcommand comes first (`deno run job.ts`).
|
|
38
|
+
* {@link SCRIPT_INTERPRETERS} is the list, and every member of it is a name
|
|
39
|
+
* `core/command-class.ts` already knows: the six shells of its unwrappable set,
|
|
40
|
+
* `node` from its own branch, and `python`, `python3`, `perl`, `ruby` and
|
|
41
|
+
* `deno` from its inline-source table. A launcher neither file names binds
|
|
42
|
+
* nothing, which is the documented limit rather than an oversight.
|
|
43
|
+
*
|
|
44
|
+
* The one thing here that the ruling does not spell out is the DEGENERATE case:
|
|
45
|
+
* `./install.sh` with no interpreter word at all, where the kernel reads the
|
|
46
|
+
* shebang and the script is `argv[0]` itself. It is bound, because it is the
|
|
47
|
+
* same fact with the interpreter implied rather than typed, and leaving it out
|
|
48
|
+
* would be a hole in the rule shaped exactly like the rule.
|
|
49
|
+
*
|
|
50
|
+
* ## What is NOT bound, stated plainly
|
|
51
|
+
*
|
|
52
|
+
* - **An inline program.** `bash -c '…'`, `node -e '…'`, `python3 -c '…'`: the
|
|
53
|
+
* program is a word of the argv, so it was always bound, and there is no file
|
|
54
|
+
* to read. The inline flags per interpreter are in {@link SCRIPT_INTERPRETERS}.
|
|
55
|
+
* - **Nothing resolved through PATH.** The interpreter itself is not hashed. Its
|
|
56
|
+
* bytes are the host's rather than the requester's, and resolving a program
|
|
57
|
+
* name through `PATH` would make the payload a function of the environment the
|
|
58
|
+
* process happens to hold, which §11 says is never read implicitly.
|
|
59
|
+
* - **Nothing transitive.** A bound script that sources another file, curls a
|
|
60
|
+
* second one, or execs a third binds only its own bytes. The digest is a
|
|
61
|
+
* binding, not a sandbox.
|
|
62
|
+
* - **A piped installer.** `curl … | sh` has no file operand and is opaque to
|
|
63
|
+
* the classifier for the same reason it is unbindable here.
|
|
64
|
+
* - **The instant between hashing and spawning.** The digest is taken, then
|
|
65
|
+
* `execution.started` is appended, then the child is spawned. A file rewritten
|
|
66
|
+
* inside that window runs unbound. Closing it needs the executor to hold the
|
|
67
|
+
* bytes rather than the path, which is the adapter contract of §10.4.
|
|
68
|
+
*
|
|
69
|
+
* ## Absence is not a claim
|
|
70
|
+
*
|
|
71
|
+
* `script` is omitted when nothing is bound, and that omission is deliberate: an
|
|
72
|
+
* invocation naming no readable script hashes to exactly the value it hashed
|
|
73
|
+
* before this module existed, so every record already in the log, and every
|
|
74
|
+
* declaration already written into a task file, verifies unchanged. What the
|
|
75
|
+
* absence does NOT say is "this runtime checked and there was nothing" — it is
|
|
76
|
+
* the ordinary shape of a payload with no script to bind, and a reader wanting
|
|
77
|
+
* to know whether a digest was possible reads the argv, which is right there.
|
|
78
|
+
*
|
|
79
|
+
* Every skip is safe for one reason, and it is the same reason in each case: the
|
|
80
|
+
* value is recomputed at execution by this same rule. A file that was
|
|
81
|
+
* unreadable at declaration time and readable at execution time gains an entry
|
|
82
|
+
* and refuses; one that existed and was deleted loses one and refuses. The rule
|
|
83
|
+
* does not have to decide correctly what a command will do, because both ends
|
|
84
|
+
* apply it to the same tree and any disagreement is a refusal.
|
|
85
|
+
*
|
|
86
|
+
* Reads the filesystem, by design and by necessity: at most one file per call,
|
|
87
|
+
* and only the one the argv names. Writes nothing, appends nothing, reads no
|
|
88
|
+
* log, no policy, no environment and no clock.
|
|
89
|
+
*/
|
|
90
|
+
import { createHash } from "node:crypto";
|
|
91
|
+
import { closeSync, openSync, readSync, statSync } from "node:fs";
|
|
92
|
+
import { isAbsolute, resolve as resolvePath } from "node:path";
|
|
93
|
+
/** The payload key carrying the bound script. Omitted when there is none. */
|
|
94
|
+
export const BOUND_SCRIPT_KEY = "script";
|
|
95
|
+
/**
|
|
96
|
+
* How much of a file is read at once while digesting it.
|
|
97
|
+
*
|
|
98
|
+
* Chunked rather than `readFileSync`, because a script may be of any size and
|
|
99
|
+
* the executor must not be the thing that runs out of memory: a refusal to
|
|
100
|
+
* compute the binding is a refusal to execute.
|
|
101
|
+
*/
|
|
102
|
+
export const DIGEST_CHUNK_BYTES = 64 * 1024;
|
|
103
|
+
/**
|
|
104
|
+
* The interpreters whose script operand is bound, and the flags that mean
|
|
105
|
+
* "the program is inline, there is no file".
|
|
106
|
+
*
|
|
107
|
+
* Every name here is one `core/command-class.ts` already knows, which is the
|
|
108
|
+
* ruling's "interpreters the classifier does not name" read as a positive list:
|
|
109
|
+
* the six shells of its unwrappable set, `node` from its own classification
|
|
110
|
+
* branch, and `python`, `python3`, `perl`, `ruby`, `deno` from its
|
|
111
|
+
* inline-source table. The list is duplicated rather than imported because
|
|
112
|
+
* those tables are private to that module and a public export of them would be
|
|
113
|
+
* a second consumer of a decision that belongs to classification; the comment
|
|
114
|
+
* is the seam, and a name added there without being added here binds nothing,
|
|
115
|
+
* which fails toward the old behaviour rather than toward a wrong digest.
|
|
116
|
+
*
|
|
117
|
+
* The shell inline flag is `-c` with any run of `l` and `i` before it, which is
|
|
118
|
+
* `INLINE_SCRIPT_FLAG` in that module, spelled here as the same regular
|
|
119
|
+
* expression for the same reason.
|
|
120
|
+
*/
|
|
121
|
+
export const SCRIPT_INTERPRETERS = new Map([
|
|
122
|
+
["bash", [/^-[li]*c$/u]],
|
|
123
|
+
["sh", [/^-[li]*c$/u]],
|
|
124
|
+
["zsh", [/^-[li]*c$/u]],
|
|
125
|
+
["dash", [/^-[li]*c$/u]],
|
|
126
|
+
["ksh", [/^-[li]*c$/u]],
|
|
127
|
+
["fish", [/^-[li]*c$/u, "--command"]],
|
|
128
|
+
["node", ["-e", "--eval", "-p", "--print", "--input-type=module"]],
|
|
129
|
+
["nodejs", ["-e", "--eval", "-p", "--print"]],
|
|
130
|
+
["python", ["-c"]],
|
|
131
|
+
["python3", ["-c"]],
|
|
132
|
+
["perl", ["-e", "-E"]],
|
|
133
|
+
["ruby", ["-e"]],
|
|
134
|
+
["deno", ["eval"]],
|
|
135
|
+
]);
|
|
136
|
+
/**
|
|
137
|
+
* The digest and size of one file, read in bounded chunks, or `null` when it
|
|
138
|
+
* cannot be read at all.
|
|
139
|
+
*
|
|
140
|
+
* `null` for every failure — gone, a directory, a device, permission denied, a
|
|
141
|
+
* disappearing file, a read error partway — and the reason is not recorded
|
|
142
|
+
* anywhere. Recording it would put a local errno inside hashed material, so two
|
|
143
|
+
* machines that agree about the bytes could disagree about the payload; and the
|
|
144
|
+
* only thing a reader could do with it is treat "unreadable" as a state, which
|
|
145
|
+
* the recomputation already handles better than any field could.
|
|
146
|
+
*/
|
|
147
|
+
function fileDigest(path) {
|
|
148
|
+
let fd;
|
|
149
|
+
try {
|
|
150
|
+
const stats = statSync(path);
|
|
151
|
+
if (!stats.isFile())
|
|
152
|
+
return null;
|
|
153
|
+
fd = openSync(path, "r");
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
const hash = createHash("sha256");
|
|
159
|
+
const buffer = Buffer.allocUnsafe(DIGEST_CHUNK_BYTES);
|
|
160
|
+
let bytes = 0;
|
|
161
|
+
try {
|
|
162
|
+
let read = readSync(fd, buffer, 0, DIGEST_CHUNK_BYTES, null);
|
|
163
|
+
while (read > 0) {
|
|
164
|
+
hash.update(buffer.subarray(0, read));
|
|
165
|
+
bytes += read;
|
|
166
|
+
read = readSync(fd, buffer, 0, DIGEST_CHUNK_BYTES, null);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
finally {
|
|
173
|
+
try {
|
|
174
|
+
closeSync(fd);
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
// A close that fails has nothing to do with the bytes already hashed.
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return { bytes, sha256: hash.digest("hex") };
|
|
181
|
+
}
|
|
182
|
+
/** The last path segment of an argv word: `/usr/bin/bash` reads as `bash`. */
|
|
183
|
+
function basenameOf(word) {
|
|
184
|
+
const segments = word.split("/");
|
|
185
|
+
return segments[segments.length - 1] ?? word;
|
|
186
|
+
}
|
|
187
|
+
/** Does `word` mean "the program is inline" for this interpreter? */
|
|
188
|
+
function isInlineProgramFlag(word, markers) {
|
|
189
|
+
return markers.some((marker) => typeof marker === "string" ? word === marker : marker.test(word));
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* The words of an interpreter invocation that could be its script, in order,
|
|
193
|
+
* or `null` when the program is inline and there is no file at all.
|
|
194
|
+
*
|
|
195
|
+
* An inline-program marker anywhere in the options answers `null` rather than
|
|
196
|
+
* "keep looking": the program is a word of the argv and already bound, and a
|
|
197
|
+
* file that happens to share its spelling is a file the command never opens.
|
|
198
|
+
*
|
|
199
|
+
* Otherwise every non-option word is a candidate, in argv order, and the caller
|
|
200
|
+
* binds the first that resolves to a readable regular file. Not just the first
|
|
201
|
+
* non-option word, because interpreters take SUBCOMMANDS: `deno run job.ts`
|
|
202
|
+
* would otherwise offer `run` and stop, and `python3 -m pkg job.py` would offer
|
|
203
|
+
* `pkg`. Walking on cannot bind anything the argv does not name, and the worst
|
|
204
|
+
* case is the harmless direction — a command whose script is missing and whose
|
|
205
|
+
* later argument happens to be a file binds that file, which is one more thing
|
|
206
|
+
* bound rather than one fewer.
|
|
207
|
+
*
|
|
208
|
+
* An option that takes a separate path value is the one place this can pick the
|
|
209
|
+
* wrong file (`node --require ./a.js job.js` binds `./a.js`), and both are
|
|
210
|
+
* files that invocation executes.
|
|
211
|
+
*/
|
|
212
|
+
function scriptCandidateIndexes(argv, markers) {
|
|
213
|
+
const candidates = [];
|
|
214
|
+
for (let index = 1; index < argv.length; index += 1) {
|
|
215
|
+
const word = argv[index];
|
|
216
|
+
if (isInlineProgramFlag(word, markers))
|
|
217
|
+
return null;
|
|
218
|
+
if (word === "--")
|
|
219
|
+
continue;
|
|
220
|
+
if (word.startsWith("-") && word.length > 1)
|
|
221
|
+
continue;
|
|
222
|
+
candidates.push(index);
|
|
223
|
+
}
|
|
224
|
+
return candidates;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Where an argv word points, resolved against the payload's own `cwd`.
|
|
228
|
+
*
|
|
229
|
+
* The cwd is the payload's, never `process.cwd()`: the payload already carries
|
|
230
|
+
* the directory the child will run in, and resolving against anything else
|
|
231
|
+
* would make the binding a function of where the hashing process happened to
|
|
232
|
+
* stand.
|
|
233
|
+
*/
|
|
234
|
+
function resolveArgvPath(word, cwd) {
|
|
235
|
+
if (word === "" || word === "-" || word === "--")
|
|
236
|
+
return null;
|
|
237
|
+
if (word.includes("\0"))
|
|
238
|
+
return null;
|
|
239
|
+
return isAbsolute(word) ? word : resolvePath(cwd, word);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* The script this argv runs, bound by its bytes, or `null` (APRV-401).
|
|
243
|
+
*
|
|
244
|
+
* Two shapes, and only two: an interpreter this module names followed by a path
|
|
245
|
+
* operand, and a path at `argv[0]` that the kernel will read a shebang from.
|
|
246
|
+
* Anything else binds nothing and the payload is what it always was.
|
|
247
|
+
*/
|
|
248
|
+
export function boundScript(argv, cwd) {
|
|
249
|
+
const program = argv[0];
|
|
250
|
+
if (program === undefined || program === "")
|
|
251
|
+
return null;
|
|
252
|
+
const markers = SCRIPT_INTERPRETERS.get(basenameOf(program));
|
|
253
|
+
if (markers !== undefined) {
|
|
254
|
+
const candidates = scriptCandidateIndexes(argv, markers);
|
|
255
|
+
if (candidates === null)
|
|
256
|
+
return null;
|
|
257
|
+
for (const index of candidates) {
|
|
258
|
+
const path = resolveArgvPath(argv[index], cwd);
|
|
259
|
+
if (path === null)
|
|
260
|
+
continue;
|
|
261
|
+
const digest = fileDigest(path);
|
|
262
|
+
if (digest !== null)
|
|
263
|
+
return { argv_index: index, path, ...digest };
|
|
264
|
+
}
|
|
265
|
+
return null;
|
|
266
|
+
}
|
|
267
|
+
// The degenerate case: no interpreter word, so the script IS argv[0] and the
|
|
268
|
+
// interpreter is whatever its shebang names. A program with no separator in
|
|
269
|
+
// it is a PATH lookup and is not this (see the module header).
|
|
270
|
+
if (!isAbsolute(program) && !program.includes("/"))
|
|
271
|
+
return null;
|
|
272
|
+
const path = resolveArgvPath(program, cwd);
|
|
273
|
+
if (path === null)
|
|
274
|
+
return null;
|
|
275
|
+
const digest = fileDigest(path);
|
|
276
|
+
return digest === null ? null : { argv_index: 0, path, ...digest };
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* The value `approval run`'s `payload_hash` is taken over (SPEC.md §6.2).
|
|
280
|
+
*
|
|
281
|
+
* `{argv, cwd}` when the argv names no readable script, byte for byte what it
|
|
282
|
+
* has always been; `{argv, cwd, script}` when it does. The caller canonicalizes
|
|
283
|
+
* and hashes it — this function decides WHAT is bound and never how it is
|
|
284
|
+
* digested into an approval.
|
|
285
|
+
*/
|
|
286
|
+
export function runPayloadValue(argv, cwd) {
|
|
287
|
+
const script = boundScript(argv, cwd);
|
|
288
|
+
const payload = { argv: [...argv], cwd };
|
|
289
|
+
if (script !== null)
|
|
290
|
+
payload.script = script;
|
|
291
|
+
return payload;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* One line naming the bound script, for a refusal message or a terminal.
|
|
295
|
+
*
|
|
296
|
+
* Not a rendering an approver signs: the canonical renderer owns that, and this
|
|
297
|
+
* is the executor explaining to an agent WHICH file moved.
|
|
298
|
+
*/
|
|
299
|
+
export function describeBoundScript(script) {
|
|
300
|
+
if (script === null)
|
|
301
|
+
return "no script";
|
|
302
|
+
return `argv[${String(script.argv_index)}] ${script.path}, ${String(script.bytes)} bytes, sha256 ${script.sha256}`;
|
|
303
|
+
}
|
|
304
|
+
//# sourceMappingURL=run-payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-payload.js","sourceRoot":"","sources":["../../../src/core/run-payload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwFG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AAE/D,6EAA6E;AAC7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC;AAE5C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAsD,IAAI,GAAG,CAAC;IAC5F,CAAC,MAAM,EAAE,CAAC,YAAY,CAAC,CAAC;IACxB,CAAC,IAAI,EAAE,CAAC,YAAY,CAAC,CAAC;IACtB,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