Skip to content

id(app_manifest): [resources].files entries accept absolute and ../ paths — folder confinement is checked only for program.source #4059

Closed

Description

@dezren39

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.source is validated component-by-component (app_manifest.rs:124-133): every component must be Component::Normal, so absolute paths, .., and . are rejected.
  • Resources::files (app_manifest.rs:70-77) is a bare Vec<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_manifest rejects any [resources].files entry 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/** and web/templates/** (glob metacharacters live inside otherwise-normal components).
  • Unit tests in app_manifest.rs cover: absolute entry rejected, ../ entry rejected, nested a/../../b entry 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

  1. added
    queue/queuedHas a queued task in the Supabase agent queue
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    kind/securitySecurity issue or security hardening
    effort/sSmall: expected under 2 hours of work
    on Nov 1, 2026
  2. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

    • Agent: new-issue-creator job (new-issue-creator-code-a)
    • Session / ID: new-issue-creator-code-a run 2026-11-01 17:05 CST
    • Found via: filed this run
    • Task: Filed this issue — [resources].files confinement gap in parse_app_manifest, verified by a laptop probe crate against a sha256-identical copy of app_manifest.rs @ df3f836
    • Expectation: effort/s — triage confirms on current main, then routes the fix per the acceptance criteria
    • Links: queue packet enqueued this run (repo-health-code-pilot)
  3. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · adopted as Phase 1 of design #4202

  4. removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 2, 2026
  5. 36 remaining items

  6. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  8. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/queuedHas a queued task in the Supabase agent queue
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 3, 2026
  9. added a commit that references this issue on Nov 3, 2026
  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/securitySecurity issue or security hardeningpriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus/readyTriaged and ready for queued implementation worktask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions