Skip to content

Commit 4068d4e

Browse files
testing falco
1 parent 065a44a commit 4068d4e

File tree

2 files changed

+16
-37
lines changed

2 files changed

+16
-37
lines changed

.github/workflows/scsctl_test.yml

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -37,45 +37,25 @@ jobs:
3737
helm version
3838
3939
# helm install falco -f custom-rules.yaml --set "falco.rules_file={/etc/falco/falco_rules.local.yaml,/etc/falco/rules.d}" --set falcoctl.artifact.install.enabled=false --set falcoctl.artifact.follow.enabled=false --set falco.json_output=true --set falco.file_output.enabled=true falcosecurity/falco
40+
- name: Run falco in k3s
41+
run: |
42+
helm repo add falcosecurity https://falcosecurity.github.io/charts
43+
helm install falco -f custom-rules.yaml --set "falco.rules_file={/etc/falco/falco_rules.local.yaml,/etc/falco/rules.d}" --set falcoctl.artifact.install.enabled=false --set falcoctl.artifact.follow.enabled=false --set falco.json_output=true --set falco.file_output.enabled=true falcosecurity/falco
44+
sleep 30
4045
- name: Run pyroscope in k3s
4146
run: |
4247
helm repo add pyroscope-io https://pyroscope-io.github.io/helm-chart
4348
helm install pyroscope pyroscope-io/pyroscope
44-
45-
# export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=pyroscope,app.kubernetes.io/instance=pyroscope" -o jsonpath="{.items[0].metadata.name}")
46-
# export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
47-
48-
# sleep 30
49-
50-
# kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT
51-
52-
# kubectl get pods
53-
54-
55-
# curl http://localhost:4040
49+
sleep 30
5650
- name: List pods
5751
run: |
5852
kubectl get pods
59-
60-
# - name: Install a python cli tool from test pypi and run it
61-
# run: |
62-
# python -m pip install --upgrade pip
63-
# python -m pip install --upgrade build
64-
# python -m pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple scsctl
65-
# - uses: debianmaster/actions-k3s@master
66-
# id: k3s
67-
# with:
68-
# version: 'latest'
69-
# - run: |
70-
# kubectl get nodes
71-
# helm install falco -f ./custom-rules.yaml \
72-
# --set "falco.rules_file={/etc/falco/falco_rules.local.yaml,/etc/falco/rules.d}" \
73-
# --set falcoctl.artifact.install.enabled=false \
74-
# --set falcoctl.artifact.follow.enabled=false \
75-
# --set falco.json_output=true \
76-
# --set falco.file_output.enabled=true \
77-
# falcosecurity/falco
78-
79-
# - name: run scsctl --help
80-
# run: |
81-
# scsctl scan --pyroscope_app_name pyroscope.server --docker_image_name pyroscope/pyroscope:latest --pyroscope_url http://localhost:4040 --non_interactive
53+
- name: Install a python cli tool from test pypi and run it
54+
run: |
55+
python -m pip install --upgrade pip
56+
python -m pip install --upgrade build
57+
python -m pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple scsctl
58+
- name: run scsctl --help
59+
run: |
60+
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=pyroscope,app.kubernetes.io/instance=pyroscope" -o jsonpath="{.items[0].metadata.name}")
61+
scsctl scan --pyroscope_app_name pyroscope.server --docker_image_name pyroscope/pyroscope:latest --pyroscope_url http://localhost:4040 --falco_pod_name $POD_NAME --falco_target_deployment_name pyroscope --falco_enabled --non_interactive

custom-rules.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ customRules:
99
- scsctl
1010
- macro: open_file_in_container
1111
condition: >
12-
fd.name endswith ".py" and
13-
k8s.deployment.name startswith "app" and
12+
k8s.deployment.name startswith "pyroscope" and
1413
evt.type = "openat"

0 commit comments

Comments
 (0)