Skip to content

Commit

Permalink
update cloud controls for result grouping support (#2150)
Browse files Browse the repository at this point in the history
* update cloud controls add field category_hierarchy_short

* add api to get compliance results count by control_id

* update respose struct group by status

* cloud-node api support multiple compliance types

* support filed filters in compliance group counts api
  • Loading branch information
gnmahanth authored Jun 14, 2024
1 parent 8ef3238 commit 3430d2c
Show file tree
Hide file tree
Showing 30 changed files with 10,985 additions and 86 deletions.
8 changes: 8 additions & 0 deletions deepfence_server/apiDocs/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,14 @@ func (d *OpenAPIDocs) AddScansOperations() {
"Group Malware Results By Class", "Group Malware Scans results by severity/class",
http.StatusOK, []string{tagMalwareScan}, bearerToken, nil, new(ResultGroupResp))

// compliance and cloud-compliance results count grouped by control_id
d.AddOperation("groupResultsCompliance", http.MethodPost, "/deepfence/scan/results/count/group/compliance",
"Count Compliance Results by Control ID", "Count Compliance Results grouped by Control ID",
http.StatusOK, []string{tagCompliance}, bearerToken, new(ComplinaceScanResultsGroupReq), new(ComplinaceScanResultsGroupResp))
d.AddOperation("groupResultsCloudCompliance", http.MethodPost, "/deepfence/scan/results/count/group/cloud-compliance",
"Count Cloud Compliance Results by Control ID", "Count Cloud Compliance Results grouped by Control ID",
http.StatusOK, []string{tagCompliance}, bearerToken, new(ComplinaceScanResultsGroupReq), new(ComplinaceScanResultsGroupResp))

d.AddOperation("getAllNodesInScanResults", http.MethodPost, "/deepfence/scan/nodes-in-result",
"Get all nodes in given scan result ids", "Get all nodes in given scan result ids",
http.StatusOK, []string{tagScanResults}, bearerToken, new(NodesInScanResultRequest), new([]ScanResultBasicNode))
Expand Down
5,669 changes: 5,669 additions & 0 deletions deepfence_server/cloud_controls/aws/aws_foundational_security.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions deepfence_server/cloud_controls/aws/cis.json

Large diffs are not rendered by default.

82 changes: 82 additions & 0 deletions deepfence_server/cloud_controls/aws/gdpr.json

Large diffs are not rendered by default.

820 changes: 820 additions & 0 deletions deepfence_server/cloud_controls/aws/hipaa.json

Large diffs are not rendered by default.

644 changes: 644 additions & 0 deletions deepfence_server/cloud_controls/aws/nist.json

Large diffs are not rendered by default.

672 changes: 672 additions & 0 deletions deepfence_server/cloud_controls/aws/pci.json

Large diffs are not rendered by default.

310 changes: 310 additions & 0 deletions deepfence_server/cloud_controls/aws/soc_2.json

Large diffs are not rendered by default.

155 changes: 155 additions & 0 deletions deepfence_server/cloud_controls/azure/cis.json

Large diffs are not rendered by default.

278 changes: 278 additions & 0 deletions deepfence_server/cloud_controls/azure/hipaa.json

Large diffs are not rendered by default.

712 changes: 712 additions & 0 deletions deepfence_server/cloud_controls/azure/nist.json

Large diffs are not rendered by default.

103 changes: 103 additions & 0 deletions deepfence_server/cloud_controls/azure/pci.json

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions deepfence_server/cloud_controls/gcp/cis.json

Large diffs are not rendered by default.

104 changes: 102 additions & 2 deletions deepfence_server/cloud_controls/kubernetes/nsa-cisa.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"service": "Kubernetes",
"type": "Benchmark"
},
"documentation": "To get the latest version of the official guide, please visit [here](https://media.defense.gov/2021/Aug/03/2002820425/-1/-1/1/CTR_KUBERNETES%20HARDENING%20GUIDANCE.PDF).\n\n## Overview\n\nKubernetes is an open-source system that automates the deployment, scaling, and management of applications run in containers, and is often hosted in a cloud environment. The hardening guidance detailed in this report is designed to help organizations handle associated risks and enjoy the benefits of using this technology.\n\n## Control Categories\n\nThese are the available categories for Kubernetes Compliance controls. The category for a control reflects the security function that the control applies to.\n\n### Kubernetes Pod Security\n\nA Pod Security Policy is a cluster-level resource that controls security sensitive aspects of the pod specification. The PodSecurityPolicy objects define a set of conditions that a pod must run with in order to be accepted into the system, as well as defaults for the related fields.\n\n### Network Separation and Hardening\n\nCluster networking is a central concept of Kubernetes. Communication between containers, Pods, services, and external services must be taken into consideration. By default, there are few network policies in place to separate resources and prevent lateral movement or escalation if a cluster is compromised. Resource separation and encryption can be an effective way to limit a cyber actor’s movement and escalation within a cluster.\n",
"documentation": "To get the latest version of the official guide, please visit [here](https://media.defense.gov/2022/Aug/29/2003066362/-1/-1/0/CTR_KUBERNETES_HARDENING_GUIDANCE_1.2_20220829.PDF).\n\n## Overview\n\nKubernetes is an open-source system that automates the deployment, scaling, and management of applications run in containers, and is often hosted in a cloud environment. The hardening guidance detailed in this report is designed to help organizations handle associated risks and enjoy the benefits of using this technology.\n\n## Control Categories\n\nThese are the available categories for Kubernetes Compliance controls. The category for a control reflects the security function that the control applies to.\n\n### Kubernetes Pod Security\n\nA Pod Security Policy is a cluster-level resource that controls security sensitive aspects of the pod specification. The PodSecurityPolicy objects define a set of conditions that a pod must run with in order to be accepted into the system, as well as defaults for the related fields.\n\n### Network Separation and Hardening\n\nCluster networking is a central concept of Kubernetes. Communication between containers, Pods, services, and external services must be taken into consideration. By default, there are few network policies in place to separate resources and prevent lateral movement or escalation if a cluster is compromised. Resource separation and encryption can be an effective way to limit a cyber actor’s movement and escalation within a cluster.\n",
"children": [
"kubernetes_compliance.benchmark.nsa_cisa_v1_pod_security",
"kubernetes_compliance.benchmark.nsa_cisa_v1_network_hardening"
Expand Down
Loading

0 comments on commit 3430d2c

Please sign in to comment.