@@ -50,29 +50,29 @@ def test_multiple_findings(self):
5050 # Test first finding
5151 finding = findings [0 ]
5252 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] " ,
5454 finding .title ,
5555 )
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 )
5959 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 '
6666 "\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 " ,
7070 finding .description ,
7171 )
7272 self .assertTrue (finding .static_finding )
7373 self .assertFalse (finding .dynamic_finding )
7474 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 )
7676
7777 # Test second finding
7878 finding = findings [1 ]
0 commit comments