Relationships
↔ sibling #210#1168 Pin the deno runtime for extension checks — bare `deno` is a PATH-hijack surface for the test/lint runtime
Opened by kneel · 7/15/2026
Problem
Because the bundled deno path isn't pinned in the primary docs (see sibling issue), agents commonly resolve bare deno to run deno test / deno check / deno doc --lint. That's an execution-path hijack surface:
- A malicious
denoearlier onPATH, a./denoin CWD, or a shell alias/function is executed instead of the vetted bundled runtime. - These are exactly the commands agents run frequently, often under broad auto-approval — so a hijack runs attacker code with little friction.
- If a swapped binary can produce passing-looking output for
deno test/deno check/deno doc --lint, it would defeat the guarantees those commands exist to enforce (hermetic scorer, slow-type lint,deno fmt/deno lint, bundle-time inlining) while appearing to succeed. I haven't verified how much of swamp's scoring re-runs independently server-side vs. trusts local check output — that's the key question to confirm, and it determines severity.
The net effect: the ergonomic gap trains agents into the precise behavior an attacker would exploit.
Proposed solution
- Everywhere the docs/tooling invoke deno for checks, mandate the absolute
~/.swamp/deno/denoand explicitly warn against baredeno. - Add a
swamp extension test/swamp extension checkwrapper that shells out to the bundled binary itself, so agents never resolvedenofrom the environment — consistent with the repo's "use swamp, don't bypass it" rule and closing the hijack window entirely.
Alternatives considered
- Put deno on
PATH— makes the hijack worse, not better; the fix is an absolute swamp-controlled path. - Docs-only pinning (sibling issue) reduces exposure but doesn't close it; the wrapper is the durable fix.
Verification status
The PATH-resolution behavior (agents invoking bare deno) is observed. The downstream impact of a hijacked binary on scoring is hypothesized, not tested — flagged here so maintainers can confirm whether local check output is trusted or independently re-verified.
Environment
- swamp skill docs as of 2026-07-15; bundled deno at
~/.swamp/deno/deno.
Closed
No activity in this phase yet.
kneel commented 7/15/2026, 10:48:04 PM
Sibling issue: #1167 — the DX/discoverability half (surface the deno path in the first-loaded guide + expose via CLI). This issue is the security/hardening half; distinct problem, shared remedy.
kneel commented 7/16/2026, 6:35:53 PM
darn clankers not searching first ;)
Sign in to post a ripple.