-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #580 from kubescape/C-0211-fix
fix C-0211 sysctls fixpath
- Loading branch information
Showing
4 changed files
with
92 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
[ | ||
{ | ||
"alertMessage": "CronJob: hello does not set 'securityContext.sysctls'", | ||
"packagename": "armo_builtins", | ||
"alertScore": 7, | ||
"failedPaths": [], | ||
"fixPaths": [{"path": "spec.jobTemplate.spec.template.spec.securityContext.sysctls", "name": "net.ipv4.tcp_syncookie", "value": "1"}], | ||
"ruleStatus": "", | ||
"alertObject": { | ||
"k8sApiObjects": [ | ||
{ | ||
"apiVersion": "batch/v1beta1", | ||
"kind": "CronJob", | ||
"metadata": { | ||
"name": "hello" | ||
} | ||
} | ||
] | ||
{ | ||
"alertMessage": "CronJob: hello does not set 'securityContext.sysctls'", | ||
"packagename": "armo_builtins", | ||
"alertScore": 7, | ||
"failedPaths": [], | ||
"fixPaths": [ | ||
{ | ||
"path": "spec.jobTemplate.spec.template.spec.securityContext.sysctls.name", | ||
"value": "YOUR_VALUE" | ||
}, | ||
{ | ||
"path": "spec.jobTemplate.spec.template.spec.securityContext.sysctls.value", | ||
"value": "YOUR_VALUE" | ||
} | ||
], | ||
"ruleStatus": "", | ||
"alertObject": { | ||
"k8sApiObjects": [ | ||
{ | ||
"apiVersion": "batch/v1beta1", | ||
"kind": "CronJob", | ||
"metadata": { | ||
"name": "hello" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
[ | ||
{ | ||
"alertMessage": "Pod: nginx does not set 'securityContext.sysctls'", | ||
"packagename": "armo_builtins", | ||
"alertScore": 7, | ||
"failedPaths": [], | ||
"fixPaths": [{"path": "spec.securityContext.sysctls", "name": "net.ipv4.tcp_syncookie", "value": "1"}], | ||
"ruleStatus": "", | ||
"alertObject": { | ||
"k8sApiObjects": [ | ||
{ | ||
"apiVersion": "v1", | ||
"kind": "Pod", | ||
"metadata": { | ||
"name": "nginx" | ||
} | ||
} | ||
] | ||
{ | ||
"alertMessage": "Pod: nginx does not set 'securityContext.sysctls'", | ||
"packagename": "armo_builtins", | ||
"alertScore": 7, | ||
"failedPaths": [], | ||
"fixPaths": [ | ||
{ | ||
"path": "spec.securityContext.sysctls.name", | ||
"value": "YOUR_VALUE" | ||
}, | ||
{ | ||
"path": "spec.securityContext.sysctls.value", | ||
"value": "YOUR_VALUE"} | ||
], | ||
"ruleStatus": "", | ||
"alertObject": { | ||
"k8sApiObjects": [ | ||
{ | ||
"apiVersion": "v1", | ||
"kind": "Pod", | ||
"metadata": { | ||
"name": "nginx" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
[ | ||
{ | ||
"alertMessage": "Workload: my-deployment does not set 'securityContext.sysctls'", | ||
"packagename": "armo_builtins", | ||
"alertScore": 7, | ||
"failedPaths": [], | ||
"fixPaths": [{"path": "spec.template.spec.securityContext.sysctls", "name": "net.ipv4.tcp_syncookie", "value": "1"}], | ||
"ruleStatus": "", | ||
"alertObject": { | ||
"k8sApiObjects": [ | ||
{ | ||
"apiVersion": "apps/v1", | ||
"kind": "Deployment", | ||
"metadata": { | ||
"name": "my-deployment", | ||
"labels": { | ||
"app": "goproxy" | ||
} | ||
} | ||
} | ||
] | ||
{ | ||
"alertMessage": "Workload: my-deployment does not set 'securityContext.sysctls'", | ||
"packagename": "armo_builtins", | ||
"alertScore": 7, | ||
"failedPaths": [], | ||
"fixPaths": [ | ||
{ | ||
"path": "spec.template.spec.securityContext.sysctls.name", | ||
"value": "YOUR_VALUE" | ||
}, | ||
{ | ||
"path": "spec.template.spec.securityContext.sysctls.value", | ||
"value": "YOUR_VALUE" | ||
} | ||
], | ||
"ruleStatus": "", | ||
"alertObject": { | ||
"k8sApiObjects": [ | ||
{ | ||
"apiVersion": "apps/v1", | ||
"kind": "Deployment", | ||
"metadata": { | ||
"name": "my-deployment", | ||
"labels": { | ||
"app": "goproxy" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |