forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpringBootActuatorsConfig.ql
More file actions
25 lines (23 loc) · 923 Bytes
/
SpringBootActuatorsConfig.ql
File metadata and controls
25 lines (23 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
* @name Exposed Spring Boot actuators in configuration file
* @description Exposing Spring Boot actuators through configuration files may lead to information leak from
* the internal application, or even to remote code execution.
* @kind problem
* @problem.severity error
* @security-severity 6.5
* @precision high
* @id java/spring-boot-exposed-actuators-config
* @tags security
* external/cwe/cwe-200
*/
import java
import semmle.code.xml.MavenPom
import semmle.code.java.security.SpringBootActuatorsConfigQuery
from SpringBootStarterActuatorDependency d, JavaPropertyOption jpOption, SpringBootPom pom
where
exposesSensitiveEndpoint(d, jpOption) and
// TODO: remove pom; for debugging versions
d = pom.getADependency()
select d,
"Insecure Spring Boot actuator $@ exposes sensitive endpoints (" +
pom.getParentElement().getVersionString() + ").", jpOption, "configuration"