Repository navigation
Description
Problem
parse_app_manifest (pkgs/id/src/app_manifest.rs, main @ df3f836) enforces folder confinement for exactly one path field and leaves [resources].files unchecked:
program.sourceis validated component-by-component (app_manifest.rs:124-133): every component must beComponent::Normal, so absolute paths,.., and.are rejected.Resources::files(app_manifest.rs:70-77) is a bareVec<String>;parse_app_manifest(app_manifest.rs:97-149) never inspects its entries at all.
Verified this run with a probe crate on the laptop compiling a sha256-identical copy of app_manifest.rs from main df3f836 (probe: ~/git/fleet/probe-appmanifest-20261101 on the laptop): a manifest with
[resources]
files = ["../../etc/passwd", "/etc/passwd", "assets/**"]is ACCEPTED by parse_app_manifest.
That contradicts the app-packaging design (doc/2026-10-29T12-50-36Z_design_id_app_packaging/2026-10-29T12-50-36Z_design_id_app_packaging.md §2): "Everything is relative to the app folder. No absolute paths, no references outside the folder" — and [resources].files are the entries the pack step (§5) will package and content-hash as a set, so a traversal entry accepted at discovery is the entry a later pack/serve step will read.
Why it matters
Discovery is the validation gate for app folders (#2324, closed). Every other consumer — the pack step, the [interfaces.web] adapter binding (#2325), any resource serving — will reasonably trust that a discovered manifest's declared files live inside the app folder. Today that trust holds for program.source only.
Acceptance criteria
-
parse_app_manifestrejects any[resources].filesentry that is absolute or escapes the app folder via..components, with an error naming the offending entry. - In-folder entries from the design example keep working, including glob patterns such as
assets/**andweb/templates/**(glob metacharacters live inside otherwise-normal components). - Unit tests in
app_manifest.rscover: absolute entry rejected,../entry rejected, nesteda/../../bentry rejected,assets/**accepted. - The checked-in
pkgs/id/apps/tic-tac-toe/app.toml(and the module's existing tests) still validate/discover unchanged.
Activity
dezren39 commentedon Nov 1, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 2, 2026
🤖 Agent note · adopted as Phase 1 of design #4202
[resources].filesentries are validated with the SAME component ruleprogram.sourcealready carries (non-empty, every componentComponent::Normal); glob metacharacters inside otherwise-normal components pass lexically, per this issue's acceptance. Glob semantics are the future pack step's question, not the gate's.source/design-architect. Existing queued triage packet stands.36 remaining items
dezren39 commentedon Nov 3, 2026
🤖 Agent note · parked
cargo test --libfor pkgs/id passes (main lib target 2046 passed / 0 failed; app_manifest suite 21 passed including the newrejects_unconfined_resource_files, verified by name — it caught a real miss in the first version of the fix:Path::componentsnormalizes an internal.away, so the helper also checks raw segments).dezren39 commentedon Nov 3, 2026
🤖 Agent note · picked up
016d10670. Revalidated fresh: Codex review of the head is COMPLETE with no findings; the only outstanding check is the production-line-limit guard, still queued in the fleet-wide runner backlog — and it cannot bite on this diff (one file, +65 lines,pkgs/id/src/app_manifest.rsis 823 lines total, far under the 2500 limit). Laptop verification from the prior claim stands: full pkgs/id lib suite green (2046 passed), app_manifest suite 21 passed incl. the new confinement test.Merge pull request #5186 from developing-today/queue/8858-4059-manife…
dezren39 commentedon Nov 3, 2026
🤖 Agent note · done
25dfb1a9e6088ed29eb224c0b388e49a38707132at 2026-11-03T22:55:13Z; issue id(app_manifest): [resources].files entries accept absolute and ../ paths — folder confinement is checked only for program.source #4059 CLOSED by the PR ("Fixes id(app_manifest): [resources].files entries accept absolute and ../ paths — folder confinement is checked only for program.source #4059"). Codex review of head016d10670completed with no findings; the production-line-limit guard remained queued in the runner backlog but cannot bite on this diff (one file, +65 lines;app_manifest.rsis 823 lines, far under 2500). Laptop verification: full pkgs/id lib suite 2046 passed, app_manifest suite 21 passed incl.rejects_unconfined_resource_files.