Skip to content

Commit 70dd572

Browse files
authored
fix(report): use AWS_REGION env for secrets in asff template (#6011)
1 parent 13f797f commit 70dd572

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

contrib/asff.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
{
129129
"SchemaVersion": "2018-10-08",
130130
"Id": "{{ $target }}",
131-
"ProductArn": "arn:aws:securityhub:{{ env "AWS_DEFAULT_REGION" }}::product/aquasecurity/aquasecurity",
131+
"ProductArn": "arn:aws:securityhub:{{ env "AWS_REGION" }}::product/aquasecurity/aquasecurity",
132132
"GeneratorId": "Trivy",
133133
"AwsAccountId": "{{ env "AWS_ACCOUNT_ID" }}",
134134
"Types": [ "Sensitive Data Identifications" ],
@@ -145,7 +145,7 @@
145145
"Type": "Other",
146146
"Id": "{{ $target }}",
147147
"Partition": "aws",
148-
"Region": "{{ env "AWS_DEFAULT_REGION" }}",
148+
"Region": "{{ env "AWS_REGION" }}",
149149
"Details": {
150150
"Other": {
151151
"Filename": "{{ $target }}"

integration/testdata/secrets.asff.golden

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"Findings": [{
33
"SchemaVersion": "2018-10-08",
44
"Id": "deploy.sh",
5-
"ProductArn": "arn:aws:securityhub:::product/aquasecurity/aquasecurity",
5+
"ProductArn": "arn:aws:securityhub:test-region::product/aquasecurity/aquasecurity",
66
"GeneratorId": "Trivy",
77
"AwsAccountId": "123456789012",
88
"Types": [ "Sensitive Data Identifications" ],
@@ -19,7 +19,7 @@
1919
"Type": "Other",
2020
"Id": "deploy.sh",
2121
"Partition": "aws",
22-
"Region": "",
22+
"Region": "test-region",
2323
"Details": {
2424
"Other": {
2525
"Filename": "deploy.sh"
@@ -31,7 +31,7 @@
3131
},{
3232
"SchemaVersion": "2018-10-08",
3333
"Id": "deploy.sh",
34-
"ProductArn": "arn:aws:securityhub:::product/aquasecurity/aquasecurity",
34+
"ProductArn": "arn:aws:securityhub:test-region::product/aquasecurity/aquasecurity",
3535
"GeneratorId": "Trivy",
3636
"AwsAccountId": "123456789012",
3737
"Types": [ "Sensitive Data Identifications" ],
@@ -48,7 +48,7 @@
4848
"Type": "Other",
4949
"Id": "deploy.sh",
5050
"Partition": "aws",
51-
"Region": "",
51+
"Region": "test-region",
5252
"Details": {
5353
"Other": {
5454
"Filename": "deploy.sh"

0 commit comments

Comments
 (0)