Skip to content

Conversation

@aschackmull
Copy link
Contributor

Certain read steps are also allowed as taint steps, i.e. they treat a tainted object as if all of its fields are tainted as well. This applies to "entrypoint types", i.e. the types of the flow sources from the active threat model. This PR adds array elements to the set of entrypoint types, so that if a source has type Foo[] then reading fields of Foo will be considered default taint steps.

A recent test case from a support issue highlighted that this was missing.

@aschackmull aschackmull requested a review from a team as a code owner October 7, 2025 08:15
@aschackmull aschackmull requested review from Copilot and removed request for a team October 7, 2025 08:15
@aschackmull aschackmull added the no-change-note-required This PR does not need a change note label Oct 7, 2025
@github-actions github-actions bot added the Java label Oct 7, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR extends taint tracking functionality in Java to include array elements as entrypoint types. This allows taint to flow through field reads of array element types when the array itself is a flow source from the active threat model.

  • Adds array element types to the set of entrypoint types for taint tracking
  • Enables field reads on array element types to be treated as taint steps
  • Addresses a gap identified through a recent support case

Copy link
Contributor

@owen-mc owen-mc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be worth adding a test for this. And maybe a change note - even though it is quite technical, if end users start getting more results and want to figure out why, it would be good for them to be able to find an explanation.

@aschackmull
Copy link
Contributor Author

Mainly one project gets more flow, which also shows in the timings, but otherwise dca is fairly quiet.

@aschackmull aschackmull merged commit 18e33b1 into github:main Oct 7, 2025
17 checks passed
@aschackmull aschackmull deleted the java/array-entrypoint-read-taint branch October 7, 2025 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Java no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants