Skip to content

Commit 86f4f36

Browse files
Merge pull request #604 from grandsilva:kubeflow_RCE
PiperOrigin-RevId: 809051454 Change-Id: I3a7919a6e18cd2b812fb111ef56cf6d00cc46b42
2 parents bc0842b + 485b34f commit 86f4f36

8 files changed

Lines changed: 888 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Kubeflow Exposed API RCE Detector
2+
3+
This detector identifies remote code execution vulnerabilities in exposed
4+
Kubeflow APIs.
5+
6+
## Build JAR file for this plugin
7+
8+
To build the JAR file for this plugin, use the following command with `gradlew`:
9+
10+
```shell
11+
./gradlew jar
12+
```
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
plugins {
2+
id 'java-library'
3+
}
4+
5+
description = 'Kubeflow Exposed UI VulnDetector plugin.'
6+
group 'com.google.tsunami'
7+
version '0.0.1-SNAPSHOT'
8+
9+
repositories {
10+
maven { // The google mirror is less flaky than mavenCentral()
11+
url 'https://maven-central.storage-download.googleapis.com/repos/central/data/'
12+
}
13+
mavenCentral()
14+
mavenLocal()
15+
}
16+
17+
def coreRepoBranch = System.getenv("GITBRANCH_TSUNAMI_CORE") ?: "stable"
18+
def tcsRepoBranch = System.getenv("GITBRANCH_TSUNAMI_TCS") ?: "stable"
19+
20+
dependencies {
21+
implementation("com.google.tsunami:tsunami-common") {
22+
version { branch = "${coreRepoBranch}" }
23+
}
24+
implementation("com.google.tsunami:tsunami-plugin") {
25+
version { branch = "${coreRepoBranch}" }
26+
}
27+
implementation("com.google.tsunami:tsunami-proto") {
28+
version { branch = "${coreRepoBranch}" }
29+
}
30+
31+
testImplementation "com.google.inject:guice:6.0.0"
32+
testImplementation "com.google.inject.extensions:guice-testlib:6.0.0"
33+
testImplementation "com.google.truth:truth:1.4.4"
34+
testImplementation "com.google.truth.extensions:truth-java8-extension:1.4.4"
35+
testImplementation "com.google.truth.extensions:truth-proto-extension:1.4.4"
36+
testImplementation "com.squareup.okhttp3:mockwebserver:3.12.0"
37+
testImplementation "junit:junit:4.13.2"
38+
testImplementation "org.mockito:mockito-core:5.18.0"
39+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
rootProject.name = 'kubeflow_exposed_ui_rce'
2+
3+
def coreRepository = System.getenv("GITREPO_TSUNAMI_CORE") ?: "https://github.com/google/tsunami-security-scanner.git"
4+
def tcsRepository = System.getenv("GITREPO_TSUNAMI_TCS") ?: "https://github.com/google/tsunami-security-scanner-callback-server.git"
5+
6+
sourceControl {
7+
gitRepository("${coreRepository}") {
8+
producesModule("com.google.tsunami:tsunami-common")
9+
producesModule("com.google.tsunami:tsunami-plugin")
10+
producesModule("com.google.tsunami:tsunami-proto")
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.google.tsunami.plugins.detectors.rce.kubeflowexposedui;
17+
18+
import static java.lang.annotation.ElementType.FIELD;
19+
import static java.lang.annotation.ElementType.METHOD;
20+
import static java.lang.annotation.ElementType.PARAMETER;
21+
22+
import java.lang.annotation.Retention;
23+
import java.lang.annotation.RetentionPolicy;
24+
import java.lang.annotation.Target;
25+
import javax.inject.Qualifier;
26+
27+
/** Annotation for {@link KubeflowRceDetector}. */
28+
final class Annotations {
29+
@Qualifier
30+
@Retention(RetentionPolicy.RUNTIME)
31+
@Target({PARAMETER, METHOD, FIELD})
32+
@interface KubeflowOobSleepDuration {}
33+
34+
private Annotations() {}
35+
}

0 commit comments

Comments
 (0)