Skip to content

Keep the taint on a path handed to a formatter or a string method - #116

Merged
abrignoni merged 2 commits into
mainfrom
fix/path-checker-taint-holes
Sep 5, 2026
Merged

Keep the taint on a path handed to a formatter or a string method#116
abrignoni merged 2 commits into
mainfrom
fix/path-checker-taint-holes

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

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.

abrignoni and others added 2 commits September 5, 2026 17:09
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>
@abrignoni
abrignoni merged commit 2b1712c into main Sep 5, 2026
8 checks passed
@abrignoni
abrignoni deleted the fix/path-checker-taint-holes branch September 5, 2026 21:15
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.

1 participant