Assert tokenFile/httpsTokenFile are paths in mkDevVm (fleet-diff review finding) #66
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/archetypes#66
Loading…
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?
mkDevVminflake.nixacceptstokenFile/httpsTokenFileas either a Nix path or a string, and passes whichever through to agenix. That type looseness is a real security gap.The failure
/nix/store/…-agent-pr-token.age/-forge-token.age).secretsrepo — every machine's ciphertext — even though only one file is actually read.If the secrets repo ever changes
forgeTokenFilefrom a path value to a string, every Forge-enabled dev VM silently regresses to carrying the full secrets repo, and no check catches it:home.fileonly.This is the "tools/source reference" site noted in the allod/tools#136 review thread too: interpolating
"${allod-tools}/…"and"${gitPolicySource}/…"moves every dev machine's derivation on every source commit, and a string leak is strictly worse because it carries secrets.The fix (already the house style)
Assert both effective builder values are paths (or null) at the
mkDevVmboundary, overridable seams included:This is exactly the contract
modules/pi-provider-lifecycle.nixalready enforces for Pi tokens. It complements — but is distinct from —allod/archetypes#21, which carves out the consumed file at the source; this adds an assertion at the boundary where overrides arrive, so a string can never regress through either token argument.