fix: recursion guard, format check in CI, deprecation cleanup - #62
Merged
Conversation
_check_recursive walked dicts, lists, and tuples with no cycle guard, so a self-referential argument blew the stack with RecursionError. Mirror URLAllowList: thread a seen set of id() values through the walk and skip already-visited containers. A cycle that contains a sensitive keyword is still caught. Also drop the redundant asyncio.iscoroutinefunction assertion in test_decorator.py — inspect.iscoroutinefunction already covers it, and the asyncio alias is deprecated and slated for removal in 3.16. Closes #53.
CI ran ruff check but never ruff format --check, so formatting drift landed on main unnoticed. cli.py and test_scan.py had drifted; both are now formatted. Add a Format check step next to the existing Lint step so the workflow fails if formatting slips again. Closes #52.
higagan
added a commit
that referenced
this pull request
Aug 4, 2026
higagan
added a commit
that referenced
this pull request
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three small fixes, all pre-existing on main and unrelated to the open docs PRs.
#53 — SensitiveDataFilter RecursionError on self-referential containers
_check_recursivewalked dicts, lists, and tuples with no cycle guard, so a self-referential argument blew the stack. Mirrors theURLAllowListapproach already in the same file: thread aseenset ofid()values through the walk and skip already-visited containers. A cycle that contains a sensitive keyword is still caught.#52 — CI does not run ruff format --check
ci.ymlranruff checkbut neverruff format --check, so formatting drift landed unnoticed.cli.pyandtest_scan.pyhad drifted; both are formatted, and a Format check step is added next to Lint so the workflow fails on drift.Deprecation cleanup
tests/test_decorator.pyasserted onasyncio.iscoroutinefunction, deprecated and slated for removal in 3.16.inspect.iscoroutinefunctionalready covers it on the line above, so the redundant call is dropped.100 tests pass, ruff check and ruff format --check both clean.