Skip to content

Commit

Permalink
🐛 fix private image container scans (#1070)
Browse files Browse the repository at this point in the history
* fix private image container scans

Signed-off-by: Ivan Milchev <[email protected]>

* fix tests

Signed-off-by: Ivan Milchev <[email protected]>

---------

Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev authored Mar 26, 2024
1 parent 15b620d commit 220eb5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 5 additions & 5 deletions controllers/container_image/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ func CronJob(image, integrationMrn, clusterUid, privateImageScanningSecretName s

cmd := []string{
"cnspec", "scan", "k8s",
"--config", "/etc/opt/mondoo/mondoo.yml",
"--inventory-file", "/etc/opt/mondoo/inventory.yml",
"--config", "/etc/opt/mondoo/config/mondoo.yml",
"--inventory-file", "/etc/opt/mondoo/config/inventory.yml",
"--score-threshold", "0",
}

Expand Down Expand Up @@ -89,7 +89,7 @@ func CronJob(image, integrationMrn, clusterUid, privateImageScanningSecretName s
{
Name: "config",
ReadOnly: true,
MountPath: "/etc/opt/",
MountPath: "/etc/opt/mondoo/config",
},
{
Name: "temp",
Expand Down Expand Up @@ -118,7 +118,7 @@ func CronJob(image, integrationMrn, clusterUid, privateImageScanningSecretName s
LocalObjectReference: corev1.LocalObjectReference{Name: ConfigMapName(m.Name)},
Items: []corev1.KeyToPath{{
Key: "inventory",
Path: "mondoo/inventory.yml",
Path: "inventory.yml",
}},
},
},
Expand All @@ -127,7 +127,7 @@ func CronJob(image, integrationMrn, clusterUid, privateImageScanningSecretName s
LocalObjectReference: m.Spec.MondooCredsSecretRef,
Items: []corev1.KeyToPath{{
Key: "config",
Path: "mondoo/mondoo.yml",
Path: "mondoo.yml",
}},
},
},
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/audit_config_base_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -1119,13 +1119,11 @@ var (
}
defaultK8sNodePolicyMrns = []string{
"//policy.api.mondoo.app/policies/platform-eol",
"//policy.api.mondoo.app/policies/platform-vulnerability",
"//policy.api.mondoo.app/policies/mondoo-kubernetes-security",
"//policy.api.mondoo.app/policies/mondoo-linux-security",
}
defaultOsPolicyMrns = []string{
"//policy.api.mondoo.app/policies/platform-eol",
"//policy.api.mondoo.app/policies/platform-vulnerability",
"//policy.api.mondoo.app/policies/mondoo-linux-security",
}
)
Expand Down

0 comments on commit 220eb5a

Please sign in to comment.