Skip to content

Commit

Permalink
updating the policy
Browse files Browse the repository at this point in the history
Signed-off-by: Prateeknandle <prateeknandle@gmail.com>
  • Loading branch information
Prateeknandle committed Feb 10, 2023
1 parent 0e090aa commit 7128609
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 28 deletions.
8 changes: 4 additions & 4 deletions tests/recommend/recommend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ var _ = Describe("karmor", func() {
}
}
fmt.Printf("Matched files count: %v\n", count)
Expect(count).To(BeNumerically("==", 2))
Expect(count).To(BeNumerically("==", 3))
})
})

Expand Down Expand Up @@ -146,7 +146,7 @@ var _ = Describe("karmor", func() {
}
}
fmt.Printf("Matched files count: %v\n", count)
Expect(count).To(BeNumerically("==", 2))
Expect(count).To(BeNumerically("==", 3))
})
})

Expand Down Expand Up @@ -177,7 +177,7 @@ var _ = Describe("karmor", func() {
}
}
fmt.Printf("Matched files count: %v\n", count)
Expect(count).To(BeNumerically("==", 4))
Expect(count).To(BeNumerically("==", 5))
})
})

Expand Down Expand Up @@ -208,7 +208,7 @@ var _ = Describe("karmor", func() {
}
}
fmt.Printf("Matched files count: %v\n", count)
Expect(count).To(BeNumerically("==", 4))
Expect(count).To(BeNumerically("==", 5))
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ kind: KubeArmorPolicy
metadata:
name: ubuntu-18-04-least-functionality-execute-package-management-process-in-container
spec:
action: Block
message: Alert! Execution of package management process inside container is denied
tags: ["NIST", "NIST_800-53_CM-7(4)", "SI-4", "process","NIST_800-53_SI-4"]
message: "Alert! Execution of package management process inside container is denied"
selector:
matchLabels:
kubearmor.io/container.name: ubuntu
severity: 5
process:
matchPaths:
- path: /usr/bin/apt
- path: /usr/bin/apt-get
- path: /bin/apt-get
- path: /sbin/apk
- path: /bin/apt
- path: /usr/bin/dpkg
- path: /bin/dpkg
Expand Down Expand Up @@ -37,13 +42,4 @@ spec:
- path: /sbin/yaourt
- path: /usr/bin/zypper
- path: /bin/zypper
selector:
matchLabels:
kubearmor.io/container.name: ubuntu
severity: 5
tags:
- NIST
- NIST_800-53_CM-7(4)
- SI-4
- process
- NIST_800-53_SI-4
action: Block
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ metadata:
name: wordpress-wordpress-4-8-apache-least-functionality-execute-package-management-process-in-container
namespace: wordpress-mysql
spec:
action: Block
message: Alert! Execution of package management process inside container is denied
tags: ["NIST", "NIST_800-53_CM-7(4)", "SI-4", "process","NIST_800-53_SI-4"]
message: "Alert! Execution of package management process inside container is denied"
selector:
matchLabels:
app: wordpress
severity: 5
process:
matchPaths:
- path: /usr/bin/apt
- path: /usr/bin/apt-get
- path: /bin/apt-get
- path: /sbin/apk
- path: /bin/apt
- path: /usr/bin/dpkg
- path: /bin/dpkg
Expand Down Expand Up @@ -38,13 +43,4 @@ spec:
- path: /sbin/yaourt
- path: /usr/bin/zypper
- path: /bin/zypper
selector:
matchLabels:
app: wordpress
severity: 5
tags:
- NIST
- NIST_800-53_CM-7(4)
- SI-4
- process
- NIST_800-53_SI-4
action: Block

0 comments on commit 7128609

Please sign in to comment.