Skip to content

Commit fb33f99

Browse files
committed
Start fixing the gh action warnings
1 parent 475b95c commit fb33f99

File tree

3 files changed

+89
-2
lines changed

3 files changed

+89
-2
lines changed

.github/linters/trivy.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
scan:
2+
scanners:
3+
- vuln
4+
- secret
5+
- config
6+
severities:
7+
- MEDIUM
8+
- CRITICAL
9+
- HIGH
10+
ignore:
11+
# List of check IDs or vulnerability IDs to skip
12+
# deployment in default namespace should set metadata.namespace to a non-default namespace. This is silly in argo
13+
- AVD-KSV-0110

charts/all/config-demo/templates/config-demo-deployment.yaml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ spec:
1818
deploymentconfig: config-demo
1919
name: config-demo
2020
spec:
21+
securityContext:
22+
runAsNonRoot: true
23+
runAsUser: 10001
24+
runAsGroup: 10001
25+
seccompProfile:
26+
type: RuntimeDefault
2127
containers:
2228
- name: apache
2329
image: registry.access.redhat.com/ubi8/httpd-24:1-226
@@ -32,7 +38,32 @@ spec:
3238
- mountPath: /var/www/html/secret
3339
readOnly: true
3440
name: config-demo-secret
35-
resources: {}
41+
- mountPath: /tmp
42+
name: tmp-volume
43+
- mountPath: /var/cache/httpd
44+
name: cache-volume
45+
- mountPath: /var/run/httpd
46+
name: run-volume
47+
resources:
48+
requests:
49+
cpu: 100m
50+
memory: 128Mi
51+
limits:
52+
cpu: 500m
53+
memory: 256Mi
54+
securityContext:
55+
allowPrivilegeEscalation: false
56+
readOnlyRootFilesystem: true
57+
runAsNonRoot: true
58+
runAsUser: 10001
59+
runAsGroup: 10001
60+
capabilities:
61+
drop:
62+
- ALL
63+
add:
64+
- NET_BIND_SERVICE
65+
seccompProfile:
66+
type: RuntimeDefault
3667
terminationMessagePath: /dev/termination-log
3768
terminationMessagePolicy: File
3869
livenessProbe:
@@ -63,3 +94,9 @@ spec:
6394
- name: config-demo-secret
6495
secret:
6596
secretName: config-demo-secret
97+
- name: tmp-volume
98+
emptyDir: {}
99+
- name: cache-volume
100+
emptyDir: {}
101+
- name: run-volume
102+
emptyDir: {}

charts/all/hello-world/templates/hello-world-deployment.yaml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ spec:
1717
deploymentconfig: hello-world
1818
name: hello-world
1919
spec:
20+
securityContext:
21+
runAsNonRoot: true
22+
runAsUser: 10001
23+
runAsGroup: 10001
24+
seccompProfile:
25+
type: RuntimeDefault
2026
containers:
2127
- name: apache
2228
image: registry.access.redhat.com/ubi8/httpd-24:1-226
@@ -28,7 +34,32 @@ spec:
2834
volumeMounts:
2935
- mountPath: /var/www/html
3036
name: hello-world-configmap
31-
resources: {}
37+
- mountPath: /tmp
38+
name: tmp-volume
39+
- mountPath: /var/cache/httpd
40+
name: cache-volume
41+
- mountPath: /var/run/httpd
42+
name: run-volume
43+
resources:
44+
requests:
45+
cpu: 100m
46+
memory: 128Mi
47+
limits:
48+
cpu: 500m
49+
memory: 256Mi
50+
securityContext:
51+
allowPrivilegeEscalation: false
52+
readOnlyRootFilesystem: true
53+
runAsNonRoot: true
54+
runAsUser: 10001
55+
runAsGroup: 10001
56+
capabilities:
57+
drop:
58+
- ALL
59+
add:
60+
- NET_BIND_SERVICE
61+
seccompProfile:
62+
type: RuntimeDefault
3263
terminationMessagePath: /dev/termination-log
3364
terminationMessagePolicy: File
3465
livenessProbe:
@@ -56,3 +87,9 @@ spec:
5687
configMap:
5788
defaultMode: 438
5889
name: hello-world-configmap
90+
- name: tmp-volume
91+
emptyDir: {}
92+
- name: cache-volume
93+
emptyDir: {}
94+
- name: run-volume
95+
emptyDir: {}

0 commit comments

Comments
 (0)