Skip to content

test(core): Add nested-array element taint repro#151

Draft
misonijnik wants to merge 2 commits into
mainfrom
misonijnik/nested-array-element-taint-repro
Draft

test(core): Add nested-array element taint repro#151
misonijnik wants to merge 2 commits into
mainfrom
misonijnik/nested-array-element-taint-repro

Conversation

@misonijnik
Copy link
Copy Markdown
Member

No description provided.

Adds a minimal IFDS taint reproducer: when an element of a tainted array
is
itself an array that is later indexed (Object[] holding a String[]), the
taint
is dropped. The source's element path is transferred to a reference fact
on the
destination (types.$) instead of a nested element fact (types[*]), so
the inner
element read is not considered tainted.

issue98 carries two positive samples:
  - PositiveScalarElementControl  — scalar element of tainted array ->
sink (passes today)
  - PositiveNestedArrayElement     — (String[]) args[1] then types[0] ->
sink (missed)

This is the shape of Apache Dubbo GenericFilter's provider path
(String[] parameterTypes = (String[]) invocation.getArguments()[1] ->
ReflectUtils.name2class(parameterTypes[i])). The test is @disabled
pending an
engine fix, matching the convention used for the other known-miss
issues.
… loudly

Remove @disabled from the issue 98 reproducer. The test now fails (the
PositiveNestedArrayElement sample is missed) instead of being skipped,
so the
engine regression is visible until the nested-array element taint
propagation
is fixed.
@misonijnik misonijnik added the bug Something isn't working label May 19, 2026
@Saloed
Copy link
Copy Markdown
Contributor

Saloed commented May 20, 2026

Wiil be fixed with weak equality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants