Skip to content

Commit fcbcc2d

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Java: support version 3.x
1 parent 6e03d97 commit fcbcc2d

File tree

23 files changed

+105
-25
lines changed

23 files changed

+105
-25
lines changed

java/ql/lib/semmle/code/java/security/SpringBootActuatorsConfigQuery.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ predicate hasConfidentialEndPointExposed(SpringBootPom pom, ApplicationPropertie
110110
me.hasSecurityDisabled() and me.getFile() = apFile and me = apOption.asSome()
111111
)
112112
or
113-
springBootVersion.matches("2.%") and //version 2.x
113+
springBootVersion.matches(["2.%", "3.%"]) and //version 2.x and 3.x
114114
exists(ManagementEndPointInclude mi |
115115
mi.getFile() = apFile and
116116
mi = apOption.asSome() and
@@ -121,7 +121,7 @@ predicate hasConfidentialEndPointExposed(SpringBootPom pom, ApplicationPropertie
121121
.matches([
122122
"%dump%", "%trace%", "%logfile%", "%shutdown%", "%startup%", "%mappings%",
123123
"%env%", "%beans%", "%sessions%"
124-
]) // confidential endpoints to check although all endpoints apart from '/health' and '/info' are considered sensitive by Spring
124+
]) // confidential endpoints to check although all endpoints apart from '/health' are considered sensitive by Spring
125125
)
126126
)
127127
)

java/ql/test/query-tests/security/CWE-200/semmle/tests/InsecureSpringActuatorConfig/InsecureSpringActuatorConfig.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
| Version1.4-/bad/false/pom.xml:29:9:32:22 | dependency | Insecure $@ of Spring Boot Actuator exposes sensitive endpoints (1.2.6.RELEASE). | Version1.4-/bad/false/application.properties:2:1:2:33 | management.security.enabled=false | configuration |
33
| Version1.5/bad/pom.xml:29:9:32:22 | dependency | Insecure $@ of Spring Boot Actuator exposes sensitive endpoints (1.5.6.RELEASE). | Version1.5/bad/application.properties:2:1:2:33 | management.security.enabled=false | configuration |
44
| Version2+/bad/pom.xml:29:9:32:22 | dependency | Insecure $@ of Spring Boot Actuator exposes sensitive endpoints (2.2.6.RELEASE). | Version2+/bad/application.properties:2:1:2:43 | management.endpoints.web.exposure.include=* | configuration |
5+
| Version3.x/bad/pom.xml:29:9:32:22 | dependency | Insecure $@ of Spring Boot Actuator exposes sensitive endpoints (3.3.5). | Version3.x/bad/application.properties:2:1:2:43 | management.endpoints.web.exposure.include=* | configuration |

0 commit comments

Comments
 (0)