-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
192 additions
and
6 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
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
29 changes: 29 additions & 0 deletions
29
...ritising/min_severity_with_skip_rule/k8s/k8s_file_setting_min_severity_with_skip_rule.txt
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"results": { | ||
"violations": null, | ||
"skipped_violations": [ | ||
{ | ||
"rule_name": "ensurePrivateIP", | ||
"description": "Vulnerable to CVE-2020-8554", | ||
"rule_id": "AC-K8-NS-SE-M-0188", | ||
"severity": "HIGH", | ||
"category": "Network Security", | ||
"skip_comment": "reason to skip the rule", | ||
"resource_name": "allowed-external-ip", | ||
"resource_type": "kubernetes_service", | ||
"file": "config.yaml", | ||
"line": 1 | ||
} | ||
], | ||
"scan_summary": { | ||
"file/folder": "/Users/suvarna/go/src/github.com/rchanger/terrascan/test/e2e/test_data/iac/resource_prioritising/min_severity_with_skip_rule/k8s", | ||
"iac_type": "k8s", | ||
"scanned_at": "2021-05-28 07:33:23.686144 +0000 UTC", | ||
"policies_validated": 8, | ||
"violated_policies": 0, | ||
"low": 0, | ||
"medium": 0, | ||
"high": 0 | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
..._severity_with_skip_rule/terraform/terraform_file_setting_min_severity_with_skip_rule.txt
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"results": { | ||
"violations": [ | ||
{ | ||
"rule_name": "rdsIamAuthEnabled", | ||
"description": "Ensure that your RDS database has IAM Authentication enabled.", | ||
"rule_id": "AWS.RDS.DataSecurity.High.0577", | ||
"severity": "HIGH", | ||
"category": "Data Security", | ||
"resource_name": "PtShGgAdi4", | ||
"resource_type": "aws_db_instance", | ||
"module_name": "root", | ||
"file": "main.tf", | ||
"plan_root": "./", | ||
"line": 1 | ||
} | ||
], | ||
"skipped_violations": [ | ||
{ | ||
"rule_name": "rdsHasStorageEncrypted", | ||
"description": "Ensure that your RDS database instances encrypt the underlying storage. Encrypted RDS instances use the industry standard AES-256 encryption algorithm to encrypt data on the server that hosts RDS DB instances. After data is encrypted, RDS handles authentication of access and descryption of data transparently with minimal impact on performance.", | ||
"rule_id": "AWS.RDS.DataSecurity.High.0414", | ||
"severity": "HIGH", | ||
"category": "Data Security", | ||
"skip_comment": "need to skip this rule", | ||
"resource_name": "PtShGgAdi4", | ||
"resource_type": "aws_db_instance", | ||
"module_name": "root", | ||
"file": "main.tf", | ||
"plan_root": "./", | ||
"line": 1 | ||
} | ||
], | ||
"scan_summary": { | ||
"file/folder": "/Users/suvarna/go/src/github.com/rchanger/terrascan/test/e2e/test_data/iac/resource_prioritising/min_severity_with_skip_rule/terraform", | ||
"iac_type": "terraform", | ||
"scanned_at": "2021-05-28 07:38:52.873682 +0000 UTC", | ||
"policies_validated": 8, | ||
"violated_policies": 1, | ||
"low": 0, | ||
"medium": 0, | ||
"high": 1 | ||
} | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
test/e2e/test_data/iac/resource_prioritising/min_max_both_severity_set/k8s/config.yaml
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: allowed-external-ip | ||
annotations: | ||
runterrascan.io/minseverity: High | ||
runterrascan.io/maxseverity: Low | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: MyApp | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 80 | ||
targetPort: 8080 | ||
externalIPs: | ||
- 192.168.10.10 | ||
- 8.8.8.8 | ||
- 203.0.113.0 |
15 changes: 15 additions & 0 deletions
15
test/e2e/test_data/iac/resource_prioritising/min_max_both_severity_set/terraform/main.tf
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
resource "aws_db_instance" "PtShGgAdi4" { | ||
#ts:minseverity=High | ||
#ts:maxseverity=Low | ||
allocated_storage = 20 | ||
storage_type = "gp2" | ||
engine = "mysql" | ||
engine_version = "5.7" | ||
instance_class = "db.t2.micro" | ||
name = "ptshggadi4" | ||
backup_retention_period = 0 | ||
ca_cert_identifier = "rds-ca-2019" | ||
username = "slaflheafllaflaehf" | ||
password = "something" | ||
skip_final_snapshot = true | ||
} |
20 changes: 20 additions & 0 deletions
20
test/e2e/test_data/iac/resource_prioritising/min_severity_with_skip_rule/k8s/config.yaml
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: allowed-external-ip | ||
annotations: | ||
runterrascan.io/minseverity: High | ||
runterrascan.io/skip: "[{\"rule\": \"AC-K8-NS-SE-M-0188\", \"comment\": \"reason to skip the rule\"}]" | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: MyApp | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 80 | ||
targetPort: 8080 | ||
externalIPs: | ||
- 192.168.10.10 | ||
- 8.8.8.8 | ||
- 203.0.113.0 |
15 changes: 15 additions & 0 deletions
15
test/e2e/test_data/iac/resource_prioritising/min_severity_with_skip_rule/terraform/main.tf
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
resource "aws_db_instance" "PtShGgAdi4" { | ||
#ts:minseverity=High | ||
#ts:skip=AWS.RDS.DataSecurity.High.0414 need to skip this rule | ||
allocated_storage = 20 | ||
storage_type = "gp2" | ||
engine = "mysql" | ||
engine_version = "5.7" | ||
instance_class = "db.t2.micro" | ||
name = "ptshggadi4" | ||
backup_retention_period = 0 | ||
ca_cert_identifier = "rds-ca-2019" | ||
username = "slaflheafllaflaehf" | ||
password = "something" | ||
skip_final_snapshot = true | ||
} |