Skip to content

Commit 98cb1a3

Browse files
janiszclaude
andcommitted
Use publicly available nginx:1.14 image
Replace unavailable custom image with nginx:1.14 which is publicly accessible and has known CVEs for testing. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent edfdd03 commit 98cb1a3

2 files changed

Lines changed: 5 additions & 17 deletions

File tree

smoke/smoke_test.go

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func TestSmoke_RealCluster(t *testing.T) {
5353
},
5454
"get_deployments_for_cve with known CVE": {
5555
toolName: "get_deployments_for_cve",
56-
args: map[string]any{"cveName": "CVE-2023-32697"},
56+
args: map[string]any{"cveName": "CVE-2019-11043"},
5757
validateFunc: func(t *testing.T, result string) {
5858
t.Helper()
5959
var data struct {
@@ -64,22 +64,10 @@ func TestSmoke_RealCluster(t *testing.T) {
6464
}
6565
require.NoError(t, json.Unmarshal([]byte(result), &data))
6666

67-
// The deployment might not be scanned yet, so we'll be lenient
6867
if len(data.Deployments) == 0 {
69-
t.Log("Warning: No deployments found with CVE-2023-32697. Deployment may not be scanned yet.")
68+
t.Log("Warning: No deployments found with CVE. Deployment may not be scanned yet.")
7069
} else {
71-
found := false
72-
for _, dep := range data.Deployments {
73-
if dep.Name == "vulnerable-app" && dep.Namespace == "vulnerable-apps" {
74-
found = true
75-
break
76-
}
77-
}
78-
if found {
79-
t.Log("Successfully found vulnerable-app deployment")
80-
} else {
81-
t.Logf("Found %d deployment(s) with CVE, but not the expected vulnerable-app", len(data.Deployments))
82-
}
70+
t.Logf("Found %d deployment(s) with CVE", len(data.Deployments))
8371
}
8472
},
8573
},

smoke/testdata/vulnerable-deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ spec:
2222
spec:
2323
containers:
2424
- name: vulnerable-app
25-
image: quay.io/rhacs-eng/qa:sqlite-jdbc-CVE-2023-32697
25+
image: nginx:1.14
2626
ports:
27-
- containerPort: 8080
27+
- containerPort: 80
2828
resources:
2929
requests:
3030
cpu: "0"

0 commit comments

Comments
 (0)