Skip to content

Commit 1d8da90

Browse files
committed
Make the test runnable via codeql test run
1 parent 79d7ea3 commit 1d8da90

32 files changed

+213
-0
lines changed

java/ql/src/experimental/qlpack.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: codeql-java-experimental
2+
version: 0.0.0
3+
libraryPathDependencies: codeql-java

java/ql/test/experimental/qlpack.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: codeql-java-experimental-tests
2+
version: 0.0.0
3+
libraryPathDependencies: codeql-java-experimental
4+
extractor: java
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
| SpringBootActuators.java:6:88:6:120 | permitAll(...) | Unauthenticated access to Spring Boot actuator is allowed. |
2+
| SpringBootActuators.java:10:5:10:137 | permitAll(...) | Unauthenticated access to Spring Boot actuator is allowed. |
3+
| SpringBootActuators.java:14:5:14:149 | permitAll(...) | Unauthenticated access to Spring Boot actuator is allowed. |
4+
| SpringBootActuators.java:18:5:18:101 | permitAll(...) | Unauthenticated access to Spring Boot actuator is allowed. |
5+
| SpringBootActuators.java:22:5:22:89 | permitAll(...) | Unauthenticated access to Spring Boot actuator is allowed. |
6+
| SpringBootActuators.java:26:40:26:108 | permitAll(...) | Unauthenticated access to Spring Boot actuator is allowed. |
7+
| SpringBootActuators.java:30:5:30:113 | permitAll(...) | Unauthenticated access to Spring Boot actuator is allowed. |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/springframework-5.2.3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package org.springframework.beans.factory;
2+
3+
public interface BeanFactory {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package org.springframework.beans.factory;
2+
3+
public interface HierarchicalBeanFactory extends BeanFactory {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package org.springframework.beans.factory;
2+
3+
public interface ListableBeanFactory extends BeanFactory {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package org.springframework.boot.actuate.autoconfigure.security.servlet;
2+
3+
import org.springframework.boot.security.servlet.ApplicationContextRequestMatcher;
4+
import org.springframework.web.context.WebApplicationContext;
5+
6+
public final class EndpointRequest {
7+
public static EndpointRequestMatcher toAnyEndpoint() {
8+
return null;
9+
}
10+
11+
public static final class EndpointRequestMatcher extends AbstractRequestMatcher {}
12+
13+
private abstract static class AbstractRequestMatcher
14+
extends ApplicationContextRequestMatcher<WebApplicationContext> {}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.springframework.boot.security.servlet;
2+
3+
import org.springframework.security.web.util.matcher.RequestMatcher;
4+
5+
public abstract class ApplicationContextRequestMatcher<C> implements RequestMatcher {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package org.springframework.context;
2+
3+
import org.springframework.beans.factory.HierarchicalBeanFactory;
4+
import org.springframework.beans.factory.ListableBeanFactory;
5+
import org.springframework.core.env.EnvironmentCapable;
6+
import org.springframework.core.io.support.ResourcePatternResolver;
7+
8+
public interface ApplicationContext extends EnvironmentCapable, ListableBeanFactory, HierarchicalBeanFactory,
9+
MessageSource, ApplicationEventPublisher, ResourcePatternResolver {}

0 commit comments

Comments
 (0)