Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use falcoctl 0.0.4+ tests for space/dash psp names #899

Merged
merged 1 commit into from Oct 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/falco_test.py
Expand Up @@ -43,7 +43,7 @@ def setUp(self):
self.falcodir = self.params.get('falcodir', '/', default=build_dir)

self.psp_conv_path = os.path.join(build_dir, "falcoctl")
self.psp_conv_url = "https://github.com/falcosecurity/falcoctl/releases/download/v0.0.3/falcoctl-0.0.3-linux-amd64"
self.psp_conv_url = "https://github.com/falcosecurity/falcoctl/releases/download/v0.0.4/falcoctl-0.0.4-linux-amd64"

self.stdout_is = self.params.get('stdout_is', '*', default='')
self.stderr_is = self.params.get('stderr_is', '*', default='')
Expand Down
22 changes: 21 additions & 1 deletion test/falco_tests_psp.yaml
Expand Up @@ -643,4 +643,24 @@ trace_files: !mux
rules_file: []
conf_file: confs/psp.yaml
psp_file: psps/allowed_proc_mount_types.yaml
trace_file: trace_files/psp/proc_mount_type_default.json
trace_file: trace_files/psp/proc_mount_type_default.json

psp_name_with_dashes:
detect: True
detect_level: WARNING
detect_counts:
- "PSP no_privileged Violation (privileged) System Activity": 1
rules_file: []
conf_file: confs/psp.yaml
psp_file: psps/privileged_name_with_dashes.yaml
trace_file: trace_files/psp/privileged.scap

psp_name_with_spaces:
detect: True
detect_level: WARNING
detect_counts:
- "PSP no_privileged Violation (privileged) System Activity": 1
rules_file: []
conf_file: confs/psp.yaml
psp_file: psps/privileged_name_with_spaces.yaml
trace_file: trace_files/psp/privileged.scap
8 changes: 8 additions & 0 deletions test/psps/privileged_name_with_dashes.yaml
@@ -0,0 +1,8 @@
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
annotations:
falco-rules-psp-images: "[nginx]"
name: no-privileged
spec:
privileged: false
8 changes: 8 additions & 0 deletions test/psps/privileged_name_with_spaces.yaml
@@ -0,0 +1,8 @@
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
annotations:
falco-rules-psp-images: "[nginx]"
name: no privileged
spec:
privileged: false