Skip to content

Fix requirements include traversal and cycles - #7

Merged
ayushdoesdev merged 3 commits into
mainfrom
fix/requirements-include-cycle-and-containment
Oct 31, 2026
Merged

ayushdoesdev merged 3 commits into
mainfrom
fix/requirements-include-cycle-and-containment

Conversation

@ayushdoesdev

@ayushdoesdev ayushdoesdev commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Closes #1

Summary

  • Resolve requirements files against the repository root before parsing.
  • Reject include paths (including symlink targets) that escape the checkout.
  • Track visited requirements files so cyclic -r / --requirement references terminate and repeated includes are not parsed repeatedly.
  • Add regression coverage for nested/repeated includes, cycles, parent-directory traversal, and symlink escapes.

Validation

  • Verified the updated scanner and regression test files are present on this branch.
  • I could not execute the Python test suite in this environment. The repository CI should run the configured scanner tests when this PR is opened.

This is a focused backend scanner safety/correctness fix; no frontend or landing-page files are changed.

@ayushdoesdev
ayushdoesdev merged commit 591b9bf into main Oct 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent circular -r includes from causing infinite recursion

1 participant