@@ -50,29 +50,29 @@ def test_multiple_findings(self):
50
50
# Test first finding
51
51
finding = findings [0 ]
52
52
self .assertEqual (
53
- "Apk Add Using Local Cache Path - FROM={{registry.gitlab.com/evilorg.com/infra/images/go-lang-1.18-alpine3.17:latest as builder}}.{{RUN apk add --update make git musl-dev gcc}} " ,
53
+ "Bucket usage logs should be enabled - google_storage_bucket[elastic-snapshots] " ,
54
54
finding .title ,
55
55
)
56
- self .assertEqual ("Info " , finding .severity )
57
- self .assertEqual ("Dockerfile " , finding .file_path )
58
- self .assertEqual (8 , finding .line )
56
+ self .assertEqual ("Low " , finding .severity )
57
+ self .assertEqual ("states/dev/storage.tf " , finding .file_path )
58
+ self .assertEqual (1 , finding .line )
59
59
self .assertIn (
60
- "**Rule**: Apk Add Using Local Cache Path (ID: `4ac84116-456f-4d60-9e12-187607266faf `)\n "
61
- "**Severity**: Info \n "
62
- "**Resource**: `FROM={{registry.gitlab.com/evilorg.com/infra/images/go-lang-1.18-alpine3.17:latest as builder}}.{{RUN apk add --update make git musl-dev gcc}} `\n "
63
- "**File**: `Dockerfile `\n "
64
- "**Line**: 8 \n "
65
- " **Code Snippet**: ```\n RUN apk add --update make git musl-dev gcc \n ```\n "
60
+ "**Rule**: Bucket usage logs should be enabled (ID: `bd9e69dd-93a1-4122-900a-992135c62572 `)\n "
61
+ "**Severity**: Low \n "
62
+ "**Resource**: `google_storage_bucket[elastic-snapshots] `\n "
63
+ "**File**: `states/dev/storage.tf `\n "
64
+ "**Line**: 1 \n "
65
+ ' **Code Snippet**: ```\n resource "google_storage_bucket" "elastic-snapshots" { \n ```\n '
66
66
"\n **Finding Details**:\n "
67
- "- **Expected**: 'RUN ' should not contain 'apk add' command without '--no-cache' switch \n "
68
- "- **Found**: 'RUN' contains 'apk add' command without '--no-cache' switch \n "
69
- "- **File Type**: DOCKERFILE " ,
67
+ "- **Expected**: 'logging ' should be set \n "
68
+ "- **Found**: 'logging' is undefined \n "
69
+ "- **File Type**: TERRAFORM " ,
70
70
finding .description ,
71
71
)
72
72
self .assertTrue (finding .static_finding )
73
73
self .assertFalse (finding .dynamic_finding )
74
74
self .assertTrue (finding .active )
75
- self .assertEqual ("4ac84116-456f-4d60-9e12-187607266faf " , finding .vuln_id_from_tool )
75
+ self .assertEqual ("bd9e69dd-93a1-4122-900a-992135c62572 " , finding .vuln_id_from_tool )
76
76
77
77
# Test second finding
78
78
finding = findings [1 ]
0 commit comments