Skip to content

C#: add AdditionalTaintStep extension point for taint-tracking - #22360

Merged
hvitved merged 3 commits into
github:mainfrom
hugo-syn:hugo-syn/csharp-additional-taint-step
Aug 19, 2026
Merged

C#: add AdditionalTaintStep extension point for taint-tracking#22360
hvitved merged 3 commits into
github:mainfrom
hugo-syn:hugo-syn/csharp-additional-taint-step

Conversation

@hugo-syn

Copy link
Copy Markdown

Mirrors Java's AdditionalTaintStep (java/ql/lib/semmle/code/java/dataflow/FlowSteps.qll) and Ruby/Swift's existing ports of the same pattern: a Unit-based class that lets library code contribute additional taint steps applied to every taint-tracking configuration, with zero opt-in required. Wired into defaultAdditionalTaintStep in TaintTrackingPrivate.qll, tagged with model = "AdditionalTaintStep" for provenance.

Mirrors Java's AdditionalTaintStep (java/ql/lib/semmle/code/java/dataflow/FlowSteps.qll)
and Ruby/Swift's existing ports of the same pattern: a `Unit`-based class that lets
library code contribute additional taint steps applied to every taint-tracking
configuration, with zero opt-in required. Wired into
defaultAdditionalTaintStep in TaintTrackingPrivate.qll, tagged with
model = "AdditionalTaintStep" for provenance.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@hugo-syn
hugo-syn requested a review from a team as a code owner August 17, 2026 08:55

@hvitved hvitved left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just one minor thing. Also, merge conflict needs to be resolved.

hugo-syn and others added 2 commits August 19, 2026 12:07
Addresses review comment: the test-only AdditionalTaintStep subclass
only has a single consumer, so fold it directly into the query file
instead of keeping it in a separate .qll.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…/csharp-additional-taint-step

# Conflicts:
#	csharp/ql/lib/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll
@hugo-syn

Copy link
Copy Markdown
Author

Perfect, should be better now

@hvitved hvitved left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the contribution ❤️

@hvitved
hvitved merged commit 715da38 into github:main Aug 19, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants