Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM alpine:3.16.3

COPY . /usr/src/poc
WORKDIR /usr/src/poc
RUN mvn clean && mvn package
USER m3
HEALTHCHECK CMD curl --fail http://localhost:3000 || exit 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code



CMD ["java", "-jar", "/usr/src/poc/target/log4j-rce-1.0-SNAPSHOT-jar-with-dependencies.jar"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

71 changes: 71 additions & 0 deletions ec2.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
provider "aws" {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

region = "us-west-2"
}

resource "aws_instance" "example" {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

ami = "encrypted_ami_id"
instance_type = "t2.micro"
key_name = "example_keypair"
subnet_id = "example_subnet_id"
vpc_security_group_ids = ["example_security_group_id"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

associate_public_ip_address = false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code


iam_instance_profile {
name = "example"
}

root_block_device {
encrypted = true
}

launch_template {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

id = aws_launch_template.example.id
}

metadata_options {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

http_endpoint = "enabled"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

http_tokens = "required"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

}
ebs_optimized = true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

}





resource "aws_launch_template" "example" {
name = "example"

user_data = <<EOF
#!/bin/bash
echo "Hello, World!" > index.html
nohup python -m SimpleHTTPServer 80 &

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

export access_key = "AKIAIOSFODNN7EXAMAAA"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] AWS Access Key
    Rule ID: APPSEC_SECRET_2

Description

AWS Access Keys

export secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMAAAKEY"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW  [Secret] Random High Entropy String
    Rule ID: APPSEC_SECRET_80

Description

Random High Entropy Strings

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

EOF

root_block_device {
volume_type = "gp2"
volume_size = 10
encrypted = false
}

ebs_block_device {
device_name = "/dev/xvdf"
volume_type = "gp2"
volume_size = 10
encrypted = true
}

iam_instance_profile {
name = "example"
}

metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
}

image_id = "encrypted_ami_id"
instance_type = "t2.micro"
}
47 changes: 47 additions & 0 deletions log4j.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
apiVersion: v1
kind: Pod
metadata:
name: privileged-pod

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

namespace: my-namespace

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

spec:
automountServiceAccountToken: false
securityContext:
seccompProfile:
type: RuntimeDefault

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

containers:
- name: bad-pod
image: alpine:3.16.3
imagePullPolicy: Always
resources:
limits:
memory: "128Mi"
cpu: "0.5"
requests:
memory: "64Mi"
cpu: "0.5"
livenessProbe:
httpGet:
path: /index.html
port: 80
initialDelaySeconds: 15
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
securityContext:
privileged: true
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 20000
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readinessProbe:
httpGet:
path: /index.html
port: 80
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 2
successThreshold: 1
failureThreshold: 3
54 changes: 54 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

<modelVersion>4.0.0</modelVersion>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code


<groupId>org.example</groupId>
<artifactId>log4j-rce</artifactId>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

<version>1.0-SNAPSHOT</version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

<packaging>jar</packaging>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code


<dependencies>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

<dependency>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.14.1</version>
<!-- Swap with the below to prove it's fixed -->
<!-- <version>2.15.0</version>-->
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.14.1</version>
<!-- Swap with the below to prove it's fixed -->
<!-- <version>2.15.0</version>-->
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

<configuration>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

<archive>
<manifest>
<mainClass>MyExample</mainClass>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

</manifest>
</archive>
<descriptorRefs>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

<descriptorRef>jar-with-dependencies</descriptorRef>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

</descriptorRefs>
</configuration>
<executions>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

<execution>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH  [Secret] Kuberentes deployment may be vulnerable - please revise code
    Rule ID: APPSEC_CUSTOM_1

Description

Kuberentes deployment may be vulnerable - please revise code

<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>