Skip to content

test(core): Reproduce chained StringBuilder.append taint loss#230

Open
misonijnik wants to merge 9 commits into
mainfrom
misonijnik/append-chain-issue
Open

test(core): Reproduce chained StringBuilder.append taint loss#230
misonijnik wants to merge 9 commits into
mainfrom
misonijnik/append-chain-issue

Conversation

@misonijnik

Copy link
Copy Markdown
Member

No description provided.

@misonijnik misonijnik marked this pull request as draft June 25, 2026 09:41
@Saloed Saloed marked this pull request as ready for review June 25, 2026 15:27
@Saloed Saloed force-pushed the misonijnik/append-chain-issue branch from 944f51b to f419ce2 Compare June 26, 2026 15:30
misonijnik and others added 4 commits June 26, 2026 18:30
Add StringBuilderChainDataFlowSample and five
JavaDataFlowReachabilityTest
cases mirroring the table in issue.md. A chained sb.append(A).append(B)
whose
result is discarded does not propagate B onto the original sb, so a
later
sb.toString() read off the original receiver loses the taint: append's
arg(0) -> this lands on the intermediate return object, never back on
sb.

chainedAppend and namedReturn currently FAIL ("expected taint to reach
the
sink, but no vulnerability was found") -- these two are the
reproduction.
unchained, chainTaintFirst, and sinkChainResult pass and pin the working
single-append / chain-end paths that a fix must not regress.
@Saloed Saloed force-pushed the misonijnik/append-chain-issue branch from f419ce2 to 0b26750 Compare June 26, 2026 15:30
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.

2 participants