IaC ignores using the .snyk policy file
How to ignore Snyk IaC issues using the .snyk policy file
Last updated
Was this helpful?
Was this helpful?
snyk ignore --id=SNYK-CC-K8S-1 --path='staging/cronjob.yaml > *'
snyk ignore --id=SNYK-CC-K8S-1 --path='staging/deployment.yaml > *'version: v1.19.0
ignore:
SNYK-CC-K8S-1:
- 'staging/deployment.yaml > *':
reason: None Given
expires: 2021-08-26T08:40:35.249Z
created: 2021-07-27T08:40:35.251Z
- 'staging/cronjob.yaml > *':
reason: None Given
expires: 2021-08-26T08:40:35.249Z
created: 2021-07-27T08:40:35.251ZTesting production/deployment.yaml...Infrastructure as code issues:
✗ Container is running in privileged mode [High Severity] [SNYK-CC-K8S-1] in Deployment
introduced by [DocId: 0] > input > spec > template > spec > containers[web]
> securityContext > privileged snyk ignore --id=SNYK-CC-K8S-1 --path='production/deployment.yaml > [DocId:1] > spec > template > spec > containers[web]
> securityContext > privileged'version: v1.19.0
ignore:
SNYK-CC-K8S-1:
- 'production/deployment.yaml > [DocId:1] > spec > template > spec > containers[web] > securityContext > privileged':
reason: None Given
expires: 2021-08-26T08:40:35.249Z
created: 2021-07-27T08:40:35.251Z