-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added helper method to compare sarif output
- Loading branch information
Showing
9 changed files
with
158 additions
and
209 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
55 changes: 55 additions & 0 deletions
55
.../e2e/scan/golden/k8s_scans/k8s/kubernetes_ingress_violations/kubernetes_ingress_sarif.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,55 @@ | ||
{ | ||
"version": "2.1.0", | ||
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json", | ||
"runs": [ | ||
{ | ||
"tool": { | ||
"driver": { | ||
"name": "terrascan", | ||
"version": "1.9.0", | ||
"informationUri": "https://github.com/accurics/terrascan", | ||
"rules": [ | ||
{ | ||
"id": "AC_K8S_0001", | ||
"name": "noHttps", | ||
"shortDescription": { | ||
"text": "TLS disabled can affect the confidentiality of the data in transit" | ||
}, | ||
"properties": { | ||
"category": "Network Security", | ||
"severity": "HIGH" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"results": [ | ||
{ | ||
"ruleId": "AC_K8S_0001", | ||
"level": "error", | ||
"message": { | ||
"text": "TLS disabled can affect the confidentiality of the data in transit" | ||
}, | ||
"locations": [ | ||
{ | ||
"physicalLocation": { | ||
"artifactLocation": { | ||
"uri": "file:///Users/suvarna/go/src/github.com/rchanger/terrascan/test/e2e/test_data/iac/k8s/kubernetes_ingress_violation/config.yaml" | ||
}, | ||
"region": { | ||
"startLine": 1 | ||
} | ||
}, | ||
"logicalLocations": [ | ||
{ | ||
"name": "ingress-demo-disallowed", | ||
"kind": "kubernetes_ingress" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
55 changes: 55 additions & 0 deletions
55
test/e2e/scan/golden/terraform_scans/aws/aws_ami_violations/aws_ami_violation_sarif.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,55 @@ | ||
{ | ||
"version": "2.1.0", | ||
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json", | ||
"runs": [ | ||
{ | ||
"tool": { | ||
"driver": { | ||
"name": "terrascan", | ||
"version": "1.9.0", | ||
"informationUri": "https://github.com/accurics/terrascan", | ||
"rules": [ | ||
{ | ||
"id": "AC_AWS_0001", | ||
"name": "amiNotEncrypted", | ||
"shortDescription": { | ||
"text": "Enable AWS AMI Encryption" | ||
}, | ||
"properties": { | ||
"category": "Encryption \u0026 KeyManagement", | ||
"severity": "MEDIUM" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"results": [ | ||
{ | ||
"ruleId": "AC_AWS_0001", | ||
"level": "warning", | ||
"message": { | ||
"text": "Enable AWS AMI Encryption" | ||
}, | ||
"locations": [ | ||
{ | ||
"physicalLocation": { | ||
"artifactLocation": { | ||
"uri": "file:///Users/suvarna/go/src/github.com/rchanger/terrascan/test/e2e/test_data/iac/aws/aws_ami_violation/main.tf" | ||
}, | ||
"region": { | ||
"startLine": 5 | ||
} | ||
}, | ||
"logicalLocations": [ | ||
{ | ||
"name": "awsAmiEncrypted", | ||
"kind": "aws_ami" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
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
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
Oops, something went wrong.