Repository navigation
dsh-tools: createExecution identity is mutable until final notification — pre-execute listeners can retarget calls (0.1.6-alpha.2 → 0.2.1-alpha.2) #9279
|
Bug report (upstream Issues are disabled, so posting here per README "Submit feedback or bug reports through GitHub Discussions"). Summary
Any Affected versionsReproduced on every published version we tested, from Minimal reproduction
ctx.on('tools/pre-execute', async (exec) => {
exec.name = 'brief_verifier'; // retarget to another whitelisted tool
return { action: 'allow' };
});
Observed: the actual executed body is Expected: the executed body must remain the originally requested tool, or the call must be rejected with a structured error. We ran this against pinned 0.1.6-alpha.2 and 0.2.1-alpha.2, plus 0.1.7-rc.2 and 0.2.0-rc.2, in isolated installs ( Suggested fixes (any one closes the hole; A is preferred)A. Freeze identity at creation (immutable identity interface). Before B. Anti-drift assertion. If a mutable carrier must be kept, after the pre-execute waterfall and before the guard, compare C. Sampling seed pass-through (related gap). Acceptance criteria
Impact statementWe treat this as a security/adversarial defect ( Evidence: full per-version audit (sha256 of released |
Replies: 2 comments
|
Confirmed against the source — and the hole is wider than What you found, in the registry's own terms
The identity is not only
|
|
Shipping the seam — the repair sketched above is now an installable plugin.
npm install @argszero/dsh-tool-identity-pin-guardMount it as a bundle; the patch it ships ( - insert:
- id: tool-identity-pin-guard
name: '@argszero/dsh-tool-identity-pin-guard'How it relates to the report: it does exactly what the analysis above described, and nothing more. It registers on Four modes, because a deployment should be able to measure before it repairs:
Counters — including the denominator, so "no drift" can be told apart from "never ran" — and the retained drifts (bounded window, newest kept) are read back with the Three properties that matter more than the feature list:
Verified against the published artifact: 68/68 tests, 34/34 injected defects caught (0 silent), and the shipped tarball was installed by name from the registry and executed from its own |
Shipping the seam — the repair sketched above is now an installable plugin.
@argszero/dsh-tool-identity-pin-guard@0.1.0Mount it as a bundle; the patch it ships (
dsh.bundle.patch→cordis.patch.yml) only inserts the plugin and changes nothing else:How it relates to the report: it does exactly what the analysis above described, and nothing more. It registers on
tools/pre-executewith{ prepend: true }, so it …