File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
java/ql/src/experimental/Security/CWE/CWE-016 Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,11 @@ class ManagementEndPointInclude extends ApplicationProperties {
60
60
string getValue ( ) { result = this .getValueElement ( ) .getValue ( ) .trim ( ) }
61
61
}
62
62
63
- from SpringBootPom pom , ApplicationProperties ap , Dependency d
64
- where
63
+ /**
64
+ * Holds if `ApplicationProperties` ap of a repository managed by `SpringBootPom` pom
65
+ * has a vulnerable configuration of Spring Boot Actuator management endpoints.
66
+ */
67
+ predicate hasConfidentialEndPointExposed ( SpringBootPom pom , ApplicationProperties ap ) {
65
68
pom .isSpringBootActuatorUsed ( ) and
66
69
not pom .isSpringBootSecurityUsed ( ) and
67
70
ap .getFile ( )
90
93
] ) // confidential endpoints to check although all endpoints apart from '/health' and '/info' are considered sensitive by Spring
91
94
)
92
95
)
93
- ) and
96
+ )
97
+ }
98
+
99
+ from SpringBootPom pom , ApplicationProperties ap , Dependency d
100
+ where
101
+ hasConfidentialEndPointExposed ( pom , ap ) and
94
102
d = pom .getADependency ( ) and
95
103
d .getArtifact ( ) .getValue ( ) = "spring-boot-starter-actuator"
96
104
select d , "Insecure configuration of Spring Boot Actuator exposes sensitive endpoints."
You can’t perform that action at this time.
0 commit comments