Skip to content

Missing test coverage: wildcard directory patterns vs overlay mount confinement #7304

Done

Description

@jstar0

Summary

#7258 added glob matching for wildcard directory patterns in getMatchingPaths plus a unit test for the basic matching behavior. What remains unpinned is the interaction with overlay mount confinement in GetOverlayMounts — the security-relevant invariant that wildcard matches must not expose or hide paths outside the mount.

During review of #7195, @jhrozek asked for these cases to be covered in the confinement test table, but that PR was closed in favor of #7258 before they landed.

Proposed coverage

Extend TestGetOverlayMountsConfinedToMount with wildcard directory pattern cases:

  • a regular file whose name matches the wildcard (s*/) is skipped — already covered in part by Match .thvignore wildcard directory patterns #7258's isolated test, but not in the confinement table;
  • a symlink matching the pattern whose target is a directory inside the mount is included;
  • a symlink matching the pattern whose target leaves the mount is excluded;
  • a pattern reaching beyond the mount (../out*/) matches nothing.

No production code changes — test-only.

I'd like to work on this if it sounds reasonable.

Activity

  1. added
    needs-triage
    on Nov 25, 2026
  2. removed
    needs-triage
    on Nov 25, 2026
  3. jhrozek commented on Nov 25, 2026

    @jhrozek
    Contributor

    go for it

  4. added a commit that references this issue on Nov 25, 2026
    b054019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions