Replace "javax" with javaxOrJakarta()

This is just a find-replace of `"javax` with `javaxOrJakarta() + "`.
This commit is contained in:
Owen Mansel-Chan
2026-02-12 12:21:04 +00:00
parent 149f3ed5b6
commit a5e6f6daf9
45 changed files with 370 additions and 218 deletions

View File

@@ -77,7 +77,9 @@ module MatchesHttpOnlyToRawHeaderFlow = TaintTracking::Global<MatchesHttpOnlyToR
/** A class descended from `javax.servlet.http.Cookie`. */
class CookieClass extends RefType {
CookieClass() { this.getAnAncestor().hasQualifiedName("javax.servlet.http", "Cookie") }
CookieClass() {
this.getAnAncestor().hasQualifiedName(javaxOrJakarta() + ".servlet.http", "Cookie")
}
}
/** Holds if `expr` is any boolean-typed expression other than literal `false`. */
@@ -143,7 +145,8 @@ class CookieResponseWithoutHttpOnlySink extends DataFlow::ExprNode {
/** Holds if `cie` is an invocation of a JAX-RS `NewCookie` constructor that sets `HttpOnly` to true. */
predicate setsHttpOnlyInNewCookie(ClassInstanceExpr cie) {
cie.getConstructedType().hasQualifiedName(["javax.ws.rs.core", "jakarta.ws.rs.core"], "NewCookie") and
cie.getConstructedType()
.hasQualifiedName([javaxOrJakarta() + ".ws.rs.core", "jakarta.ws.rs.core"], "NewCookie") and
(
cie.getNumArgument() = 6 and
mayBeBooleanTrue(cie.getArgument(5)) // NewCookie(Cookie cookie, String comment, int maxAge, Date expiry, boolean secure, boolean httpOnly)

View File

@@ -27,7 +27,7 @@ class SocketFactoryType extends RefType {
SocketFactoryType() {
this.hasQualifiedName("java.rmi.server", "RMIServerSocketFactory") or
this.hasQualifiedName("java.rmi.server", "RMIClientSocketFactory") or
this.hasQualifiedName("javax.net", "SocketFactory") or
this.hasQualifiedName(javaxOrJakarta() + ".net", "SocketFactory") or
this.hasQualifiedName("java.net", "SocketImplFactory")
}
}