feat(pkggate): new package - block pkg run/exec of scratch-tier or repo-escaping scripts #91
Labels
No labels
burndown-2026-06
sunday-sprint
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/cli-guard#91
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source:
cmd/coily/pkg_run_gate.go-pkgRunSpecregistry,pkgRunSpecsmap,pkgEscapingPath,looksLikePath,hasScriptSuffix,pkgScratchRoots. Already importscli-guard/scope.What it does: preflight gate for
pkg <tool> run/execpassthroughs (uv, bun, npm, poetry, ...). Blocks running a script whose path is in a scratch tier (/tmp,/dev/shm, ...) or escapes the repo root - closes the "interpreter laundered through the shell-metachar gate" arbitrary-code-execution hole.Generic core (lift this): the
pkgRunSpecregistry shape, the path-escape logic, and the scratch-root check are consumer-agnostic.Consumer seams to parameterize: block-message branding (
coily:prefix, coily#9/#10 refs) -> template/callback; shippkgRunSpecsas a default map callers can extend/replace.Dedup win:
pkgScratchRootsis hand-synced withhook'sscratchExecRoots(noted in-comment as kept-in-sync-by-hand). Extract one shared scratch-roots source and have both consume it.Suggested home (pre-refactor): new
pkggatepackage (or fold intopassthroughas an optional gate).Done when:
godoc-current.txtregenerated (scripts/check-godoc-current.sh --update)make testgreen both sidesclosesthis issueRelated: cli-guard#61 (glob-pattern argv deny primitive) is adjacent - this gate is a path-shape deny, that issue is a glob deny; check whether they should share machinery post-refactor.
Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag:
burndown-2026-06.