Skip to content

Commit

Permalink
Merge branch 'google:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidg-doyen authored Jan 9, 2024
2 parents f9e2da1 + 9c56f2e commit a0e416a
Show file tree
Hide file tree
Showing 173 changed files with 8,544 additions and 100 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/doyensec-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: doyensec-plugins-build

on:
push:
paths:
- 'doyensec/**'
pull_request:
paths:
- 'doyensec/**'

jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
java: [ 11 ]
runs-on: ${{ matrix.os }}
name: 'Build doyensec plugins on ${{ matrix.os }} using Java ${{ matrix.java }}'
steps:
- name: 'Check out repository'
uses: actions/checkout@v2
- name: 'Set up JDK ${{ matrix.java }}'
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: 'Cache Gradle resources'
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: 'Build Doyensec plugins'
run: ./doyensec/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {
}

ext {
tsunamiVersion = '0.0.14'
tsunamiVersion = 'latest.release'
junitVersion = '4.13'
mockitoVersion = '2.28.2'
truthVersion = '1.0.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {
}

ext {
tsunamiVersion = '0.0.14'
tsunamiVersion = 'latest.release'
junitVersion = '4.13'
mockitoVersion = '2.28.2'
okhttpVersion = '3.12.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {
ext {
okhttpVersion = '3.12.0'
autoValueVersion = '1.7'
tsunamiVersion = '0.0.14'
tsunamiVersion = 'latest.release'
junitVersion = '4.13'
mockitoVersion = '2.28.2'
truthVersion = '1.0.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {
ext {
okhttpVersion = '3.12.0'
autoValueVersion = '1.7'
tsunamiVersion = '0.0.14'
tsunamiVersion = 'latest.release'
junitVersion = '4.13'
mockitoVersion = '2.28.2'
truthVersion = '1.0.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {

ext {
autoValueVersion = '1.7'
tsunamiVersion = '0.0.14'
tsunamiVersion = 'latest.release'
junitVersion = '4.13'
truthVersion = '1.0.1'
okhttpVersion = '3.12.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ java {
ext {
guavaVersion = '28.2-jre'
okhttpVersion = '3.12.0'
tsunamiVersion = '0.0.14'
tsunamiVersion = 'latest.release'

junitVersion = '4.13'
mockitoVersion = '2.28.2'
Expand Down
23 changes: 23 additions & 0 deletions community/detectors/atlassian_confluence_cve_2023_22518/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Atlassian Confluence Data Center CVE-2023-22518 Detector

This detector checks for Atlassian Confluence Data Center Improper Authorization
(CVE-2023-22518). All versions of Confluence Data Center and Server are affected
by this vulnerability. This Improper Authorization vulnerability allows an
unauthenticated attacker to reset Confluence and create a Confluence instance
administrator account. Using this account, an attacker can then perform all
administrative actions that are available to Confluence instance administrator
leading to a full loss of confidentiality, integrity and availability.

Ref:

- https://confluence.atlassian.com/security/cve-2023-22518-improper-authorization-vulnerability-in-confluence-data-center-and-server-1311473907.html

## Build jar file for this plugin

Using `gradlew`:

```shell
./gradlew jar
```

Tsunami identifiable jar file is located at `build/libs` directory.
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
plugins {
id 'java-library'
}

description = 'Tsunami CVE-2023-22518 VulnDetector plugin.'
group = 'com.google.tsunami'
version = '0.0.1-SNAPSHOT'

repositories {
maven { // The google mirror is less flaky than mavenCentral()
url 'https://maven-central.storage-download.googleapis.com/repos/central/data/'
}
mavenCentral()
mavenLocal()
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

jar.manifest {
attributes('Implementation-Title': name,
'Implementation-Version': version,
'Built-By': System.getProperty('user.name'),
'Built-JDK': System.getProperty('java.version'),
'Source-Compatibility': sourceCompatibility,
'Target-Compatibility': targetCompatibility)
}

javadoc.options {
encoding = 'UTF-8'
use = true
links 'https://docs.oracle.com/en/java/javase/11/'
source = '11'
}

// Log stacktrace to console when test fails.
test {
testLogging {
exceptionFormat = 'full'
showExceptions true
showCauses true
showStackTraces true
}
maxHeapSize = '1500m'
}
}

ext {
tsunamiVersion = 'latest.release'
junitVersion = '4.13'
mockitoVersion = '2.28.2'
okhttpVersion = '3.12.0'
truthVersion = '1.1.3'
}

dependencies {
implementation "com.google.tsunami:tsunami-common:${tsunamiVersion}"
implementation "com.google.tsunami:tsunami-plugin:${tsunamiVersion}"
implementation "com.google.tsunami:tsunami-proto:${tsunamiVersion}"

testImplementation "junit:junit:${junitVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "com.google.truth:truth:${truthVersion}"
testImplementation "com.squareup.okhttp3:mockwebserver:${okhttpVersion}"
testImplementation "com.google.truth.extensions:truth-java8-extension:${truthVersion}"
testImplementation "com.google.truth.extensions:truth-proto-extension:${truthVersion}"
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit a0e416a

Please sign in to comment.