Keep the taint on a path handed to a formatter or a string method - #116
Merged
Conversation
check_report_local_paths reported clean on two ALEAPP artifacts that were publishing the absolute path of the machine running the tool. textwrap.fill(file_found) came back untracked because the checker had no rule for a formatter, and file_found.strip() cleared the taint because strip sat among the methods treated as reducing a path, though it hands back the whole string. One artifact carried both at once. A method called on a path now keeps the taint unless it genuinely returns a piece of it, and the textwrap formatters pass it through. Checked against 1,150 artifact modules across the five cores with no new findings. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A constant receiver means '{}'.format(file_found) hands the path in as an
argument rather than as a receiver, so the method rule did not reach it.
Treated like os.path.join, which already had the same shape.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Closes two gaps in check_report_local_paths that let a staged path reach report output.
A path handed to a formatter came back untracked, so textwrap.fill(file_found) reported clean while publishing the absolute path. And strip sat among the methods treated as reducing a path, though it hands back the whole string, so file_found.strip() cleared the taint too. One ALEAPP artifact carried both at once.
A method called on a path now keeps the taint unless it returns a piece of it. Checked against 1,150 artifact modules across the five cores with no new findings. Three tests pin the shapes and fail against the old checker.