Skip to content

Track %2e%2e URL-encoded traversal in lockfile-path handling #924

@sergio-sisternes-epam

Description

@sergio-sisternes-epam

Follow-up to #913. Surfaced by the APM Expert Review Panel (Supply Chain Security specialist). LOW severity, documented observation. CEO arbitration: tracking-only, mitigated today.

Observation

URL-encoded traversal sequences (%2e%2e) are not decoded before path validation on the cowork:// lockfile scheme. In practice this is mitigated by ensure_path_within, which resolves symlinks and performs containment check on the final absolute path — any attempt to escape the cowork root is caught at resolution time.

This issue exists to track the cleaner fix: decode the URL-encoded segment before validate_path_segments so the rejection happens at parse time, not resolution time. Belt-and-braces, not a known exploit path.

Acceptance criteria

  • from_lockfile_path decodes percent-encoded segments before calling validate_path_segments.
  • Unit test: cowork://skills/%2e%2e/escape is rejected at parse time with a clear error, not silently resolved.

Not in scope

Other %xx sequences beyond %2e/%2E. File a separate issue if we decide to accept arbitrary percent-decoding in lockfile paths.

/cc panel review: #913

Metadata

Metadata

Assignees

No one assigned

    Labels

    securityDeprecated: use theme/security. Kept for issue history; will be removed in milestone 0.10.0.tracking

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions