Skip to content

Detector 1 of the #467 home-path guard enumerates tests/fixtures non-recursively, and its positive control cannot notice a missed subtree #480

Closed

Description

@fdaviddpt

Found by the v0.24.0 gate 3 round-2 release audit (strategy B, ranked misreports). Not blocking;
carried forward. This is a scope hole in the guard, not a live leak -- the tree is verified clean
(see below) and tests/fixtures/ has no subdirectories today.

tests/test_no_real_home_paths_467.py:191-192 enumerates with

sorted(p for p in FIXTURES_DIR.iterdir() if p.is_file())

which is non-recursive. Its positive control at :195-203 asserts len(files) >= 2; with 4 tracked
fixture files today, that assertion cannot detect a fixture arriving in a subdirectory, which would be
invisible to the path detector at any depth.

Detector 2 (the tree-wide git ls-files username scan) would still catch a username there -- but it
is skipped on CI by design (_username_check_should_run, :263-277). So on CI, a home path in
tests/fixtures/<subdir>/ is unguarded by either detector.

That matters more than its own row suggests: the class this guard exists to detect is
ships-local-state, which the ranking table marks blocking, and #467/#474 are two instances of it
already reaching a tag. A hole in a blocking-class guard is worth closing even when nothing is in it.

Verified clean at the time of the audit (d3bf69f): git grep -I -c "floriandavid" returns no
matches; git grep -n -E "/Users/|/home/" -- tests/fixtures/ returns only sanitized-user segments;
pytest tests/test_no_real_home_paths_467.py -q -rs gives 8 passed, 0 skipped, including both positive
controls, so the detectors fired rather than matching nothing.

Fix: rglob("*") instead of iterdir(), plus a control that would actually notice a missed
subtree -- the current >= 2 cannot.

Activity

  1. added
    bug
    priority:medium
    on Aug 29, 2026
  2. added a commit that references this issue on Aug 29, 2026
  3. added
    cohort-3
    on Aug 29, 2026
  4. self-assigned this
    on Sep 1, 2026
  5. added a commit that references this issue on Sep 1, 2026
    99f8f87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugcohort-3priority:medium

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions