Skip to content

fix(user-experience): reject a path with a dot-leading segment anywhere, not only first #8572

Closed

Description

@kyle-sexton

Refs: #8570, #8561, #6700

Agent Brief

Type: Bug
Summary: user-experience's path guard rejects a path with a dot-leading segment anywhere in it, not only as the first segment, so a team file can't point research reads at nested secrets.

Current behavior:
reserved in plugins/user-experience/scripts/detect.mjs (about line 351 after #8570) checks only the first segment: rel.split(/[\\/]/)[0]. The comment above it (about line 346) states that first-segment intent. So research_paths: [docs/.env], [docs/.claude/x], [a/b/.git] and [rootlink/docs/.claude] are kept, and the skills that read research paths can read nested secret or tool-config files into their deliverables. GitHub Security & Cost found this while reviewing #8570. It predates that PR.

Desired behavior:

  • A path is rejected when ANY segment of its normalized form starts with ., checked both as written and as resolved. Use rel.split(/[\\/]/).some((s) => s.startsWith(".")); . and .. segments are already normalized away before this check.
  • Apply it to output_home and research_paths alike, with the existing dot-path warning.
  • Update the comment at about line 346 to state the any-segment rule.

Key interfaces:

  • reserved and its callers in plugins/user-experience/scripts/detect.mjs.
  • plugins/user-experience/tests/detect.test.mjs.

Acceptance criteria:

  • Tests reject docs/.env, docs/.claude/x and a/b/.git for both output_home and research_paths, with the dot-path warning.
  • A test rejects rootlink/docs/.claude, where rootlink -> . is committed.
  • A test keeps a normal nested path such as docs/research/notes.
  • Every existing test in plugins/user-experience/tests/detect.test.mjs passes.
  • scripts/check-changelog-fragments.sh passes, with one user-experience patch fragment added.
  • CI's test-bash passes on the PR.

Out of scope:

  • Write-time guards in the skills.
  • Settings keys other than output_home and research_paths.

Depended on: #8570, merged 2026-10-20T08:23:35Z (9af9bc7). Start from main.


Filed by the Issue Triage session from GitHub Security & Cost's review of #8570.

Activity

  1. added
    status: ready
    on Oct 20, 2026
  2. added theissue type on Oct 20, 2026
  3. added
    agent-ready
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readystatus: ready

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions