Skip to content

Conversation

@owen-mc
Copy link
Contributor

@owen-mc owen-mc commented Dec 16, 2025

This PR adds classes so users can add query-specific sanitizers using data extensions ("models-as-data", or MaD), using the same kind strings as already used by sinks. This follows on from the PR where existing sanitizers were converted to MaD.

@github-actions github-actions bot added the Java label Dec 16, 2025
@owen-mc owen-mc force-pushed the java/allow-mad-barriers branch from f928943 to 766e908 Compare January 6, 2026 14:39
@owen-mc owen-mc marked this pull request as ready for review January 9, 2026 09:12
@owen-mc owen-mc requested a review from a team as a code owner January 9, 2026 09:13
Copilot AI review requested due to automatic review settings January 9, 2026 09:13
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 enables users to add query-specific sanitizers using data extensions (MaD) by renaming existing sanitizer classes from "Default" to "External" and adding missing abstract sanitizer classes where needed.

Key changes:

  • Rename five existing Default*Sanitizer classes to External*Sanitizer to better reflect their purpose as externally-defined MaD barriers
  • Add three new abstract sanitizer classes (GroovyInjectionSanitizer, FragmentInjectionSanitizer) with corresponding external implementations
  • Add isBarrier predicate to FragmentInjectionTaintConfig to properly integrate the new sanitizer class

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
RegexInjection.qll Rename DefaultRegexInjectionSanitizer to ExternalRegexInjectionSanitizer
XSS.qll Rename DefaultXssSanitizer to ExternalXssSanitizer
TrustBoundaryViolationQuery.qll Rename DefaultTrustBoundaryValidationSanitizer to ExternalTrustBoundaryValidationSanitizer
RequestForgery.qll Rename DefaultRequestForgerySanitizer to ExternalRequestForgerySanitizer
PathSanitizer.qll Rename DefaultPathInjectionSanitizer to ExternalPathInjectionSanitizer
GroovyInjection.qll Add abstract GroovyInjectionSanitizer class and ExternalGroovyInjectionSanitizer implementation
FragmentInjectionQuery.qll Add isBarrier predicate to properly use the new sanitizer class
FragmentInjection.qll Add abstract FragmentInjectionSanitizer class and ExternalFragmentInjectionSanitizer implementation
CommandLineQuery.qll Add ExternalCommandInjectionSanitizer class (abstract class already existed)
AndroidIntentRedirection.qll Add ExternalIntentRedirectionSanitizer class (abstract class already existed)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@aschackmull aschackmull left a comment

Choose a reason for hiding this comment

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

LGTM

@owen-mc owen-mc added the no-change-note-required This PR does not need a change note label Jan 9, 2026
@owen-mc owen-mc merged commit d7acb75 into github:main Jan 9, 2026
18 of 19 checks passed
@owen-mc owen-mc deleted the java/allow-mad-barriers branch January 9, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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