Skip to content

Commit cb5229f

Browse files
committed
fix false failures with trivy config scan
Signed-off-by: Tuomas Katila <[email protected]>
1 parent d169cb8 commit cb5229f

File tree

4 files changed

+57
-21
lines changed

4 files changed

+57
-21
lines changed

.github/workflows/lib-trivy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
scan-ref: deployments/
4040
exit-code: 1
4141
severity: CRITICAL,HIGH
42+
ignore-file: .trivyignore.yaml
4243

4344
trivy-scan-dockerfiles:
4445
name: Scan Dockerfiles

.trivyignore

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,3 @@
44
# adding # a ‘USER’ statement to the Dockerfile.
55
AVD-DS-0002
66

7-
# Privileged containers share namespaces with the host system and do not offer any security.
8-
# They should be used exclusively for system containers that require high # privileges.
9-
# initcontainers require privileged access
10-
AVD-KSV-0017
11-
12-
# Do not allow privilege escalation from node proxy
13-
# Check whether role permits privilege escalation from node proxy
14-
# gpu plugin in kubelet mode requires "nodes/proxy" resource access
15-
AVD-KSV-0047
16-
17-
# Do not allow update/create of a malicious pod
18-
# Check whether role permits update/create of a malicious pod
19-
# device plugin operator requires access to daemonset creation etc.
20-
AVD-KSV-0048
21-
22-
# HostPath present many security risks and as a security practice it is better to avoid critical host paths mounts.
23-
# Some plugins require access to various host paths
24-
AVD-KSV-0121
25-
26-
# Device plugins do not use any CSIs
27-
## CVE-2019-11255

.trivyignore.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
misconfigurations:
2+
- id: AVD-KSV-0121
3+
statement: Some plugins require access to various host paths
4+
paths:
5+
- dlb_plugin/base/intel-dlb-plugin.yaml
6+
- fpga_plugin/base/intel-fpga-plugin-daemonset.yaml
7+
- qat_plugin/base/intel-qat-kernel-plugin.yaml
8+
- qat_plugin/overlays/qat_initcontainer/qat_initcontainer.yaml
9+
10+
- id: AVD-KSV-0017
11+
statement: initcontainers require privileged access
12+
paths:
13+
- dlb_plugin/overlays/dlb_initcontainer/dlb_initcontainer.yaml
14+
- dsa_plugin/overlays/dsa_initcontainer/dsa_initcontainer.yaml
15+
- qat_dpdk_app/patches/crypto-perf/env_replace_testcmd.yaml
16+
- iaa_plugin/overlays/iaa_initcontainer/iaa_initcontainer.yaml
17+
- qat_plugin/base/intel-qat-kernel-plugin.yaml
18+
- qat_plugin/overlays/qat_initcontainer/qat_initcontainer.yaml
19+
20+
- id: AVD-KSV-0047
21+
statement: gpu plugin in kubelet mode requires "nodes/proxy" resource access
22+
paths:
23+
- gpu_plugin/overlays/fractional_resources/gpu-manager-role.yaml
24+
- operator/rbac/gpu_manager_role.yaml
25+
- operator/rbac/role.yaml
26+
27+
- id: AVD-KSV-0014
28+
statement: These are false detections for not setting "readOnlyFilesystem"
29+
paths:
30+
- fpga_plugin/overlays/region/mode-region.yaml
31+
- gpu_plugin/overlays/fractional_resources/add-mounts.yaml
32+
- gpu_plugin/overlays/fractional_resources/add-args.yaml
33+
- gpu_plugin/overlays/fractional_resources/gpu-manager-role.yaml
34+
- gpu_plugin/overlays/monitoring_shared-dev_nfd/add-args.yaml
35+
- gpu_plugin/overlays/nfd_labeled_nodes/add-args.yaml
36+
- iaa_plugin/overlays/iaa_initcontainer/iaa_initcontainer.yaml
37+
- fpga_admissionwebhook/base/manager_webhook_patch.yaml
38+
- operator/device/dlb/dlb.yaml
39+
- operator/device/dsa/dsa.yaml
40+
- operator/device/fpga/fpga.yaml
41+
- operator/device/gpu/gpu.yaml
42+
- operator/device/qat/qat.yaml
43+
- operator/device/sgx/sgx.yaml
44+
- gpu_tensorflow_test/deployment.yaml
45+
- sgx_enclave_apps/overlays/sgx_ecdsa_inproc_quote/add_sgx_default_qcnl_conf.yaml
46+
- xpumanager_sidecar/kustom/kustom_xpumanager.yaml
47+
- operator/default/manager_auth_proxy_patch.yaml
48+
- operator/default/manager_webhook_patch.yaml
49+
- qat_dpdk_app/patches/compress-perf/env_replace_testcmd.yaml
50+
- qat_dpdk_app/patches/compress-perf/volume_add_configmap.yaml
51+
- qat_plugin/overlays/debug/add-args.yaml
52+
- qat_plugin/overlays/e2e/add-args.yaml
53+
- qat_plugin/overlays/debug/add-args.yaml
54+
- qat_dpdk_app/patches/crypto-perf/env_replace_testcmd.yaml
55+
- sgx_admissionwebhook/base/manager_webhook_patch.yaml

deployments/sgx_plugin/overlays/epc-register/init-daemonset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ spec:
3030
fieldPath: spec.nodeName
3131
securityContext:
3232
allowPrivilegeEscalation: false
33+
readOnlyRootFilesystem: true
3334
capabilities:
3435
drop:
3536
- ALL

0 commit comments

Comments
 (0)