-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get k8s artifacts error: could not parse reference: docker-pullable #5791
Labels
kind/bug
Categorizes issue or PR as related to a bug.
target/kubernetes
Issues relating to kubernetes cluster scanning
Comments
$ kind version
kind v0.25.0 go1.23.3 darwin/arm64
$ kind create cluster
...
$ trivy k8s --report=all --scanners misconfig the full log2025-02-03T18:16:52+06:00 INFO Node scanning is enabled
2025-02-03T18:16:52+06:00 INFO If you want to disable Node scanning via an in-cluster Job, please try '--disable-node-collector' to disable the Node-Collector job.
2025-02-03T18:16:52+06:00 INFO Scanning K8s... K8s="kind-kind"
namespace: local-path-storage, deployment: local-path-provisioner (kubernetes)
Tests: 158 (SUCCESSES: 144, FAILURES: 14)
Failures: 14 (UNKNOWN: 0, LOW: 9, MEDIUM: 3, HIGH: 2, CRITICAL: 0)
AVD-KSV-0001 (MEDIUM): Container 'local-path-provisioner' of Deployment 'local-path-provisioner' should set 'securityContext.allowPrivilegeEscalation' to false
════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
A program inside the container can elevate its own privileges and run as root, which might give the program control over the container and node.
See https://avd.aquasec.com/misconfig/ksv001
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
namespace: local-path-storage, deployment: local-path-provisioner:18-36
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
18 ┌ - command:
19 │ - local-path-provisioner
20 │ - --debug
21 │ - start
22 │ - --helper-image
23 │ - docker.io/kindest/local-path-helper:v20230510-486859a6
24 │ - --config
25 │ - /etc/config/config.json
26 └ env:
..
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
AVD-KSV-0003 (LOW): Container 'local-path-provisioner' of Deployment 'local-path-provisioner' should add 'ALL' to 'securityContext.capabilities.drop'
════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
The container should drop all default capabilities and add only those that are needed for its execution.
See https://avd.aquasec.com/misconfig/ksv003
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
namespace: local-path-storage, deployment: local-path-provisioner:18-36
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
18 ┌ - command:
19 │ - local-path-provisioner
20 │ - --debug
21 │ - start
22 │ - --helper-image
23 │ - docker.io/kindest/local-path-helper:v20230510-486859a6
24 │ - --config
25 │ - /etc/config/config.json
26 └ env:
..
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
AVD-KSV-0011 (LOW): Container 'local-path-provisioner' of Deployment 'local-path-provisioner' should set 'resources.limits.cpu'
════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Enforcing CPU limits prevents DoS via resource exhaustion.
See https://avd.aquasec.com/misconfig/ksv011
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
namespace: local-path-storage, deployment: local-path-provisioner:18-36
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
18 ┌ - command:
19 │ - local-path-provisioner
20 │ - --debug
21 │ - start
22 │ - --helper-image
23 │ - docker.io/kindest/local-path-helper:v20230510-486859a6
24 │ - --config
25 │ - /etc/config/config.json
26 └ env:
..
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
AVD-KSV-0012 (MEDIUM): Container 'local-path-provisioner' of Deployment 'local-path-provisioner' should set 'securityContext.runAsNonRoot' to true
════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Force the running image to run as a non-root user to ensure least privileges.
See https://avd.aquasec.com/misconfig/ksv012
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
namespace: local-path-storage, deployment: local-path-provisioner:18-36
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
18 ┌ - command:
19 │ - local-path-provisioner
20 │ - --debug
21 │ - start
22 │ - --helper-image
23 │ - docker.io/kindest/local-path-helper:v20230510-486859a6
24 │ - --config
25 │ - /etc/config/config.json
26 └ env:
..
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
AVD-KSV-0014 (HIGH): Container 'local-path-provisioner' of Deployment 'local-path-provisioner' should set 'securityContext.readOnlyRootFilesystem' to true
════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
An immutable root file system prevents applications from writing to their local disk. This can limit intrusions, as attackers will not be able to tamper with the file system or write foreign executables to disk.
See https://avd.aquasec.com/misconfig/ksv014
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
namespace: local-path-storage, deployment: local-path-provisioner:18-36
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
18 ┌ - command:
19 │ - local-path-provisioner
20 │ - --debug
21 │ - start
22 │ - --helper-image
23 │ - docker.io/kindest/local-path-helper:v20230510-486859a6
24 │ - --config
25 │ - /etc/config/config.json
26 └ env:
..
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
AVD-KSV-0015 (LOW): Container 'local-path-provisioner' of Deployment 'local-path-provisioner' should set 'resources.requests.cpu'
════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
When containers have resource requests specified, the scheduler can make better decisions about which nodes to place pods on, and how to deal with resource contention.
See https://avd.aquasec.com/misconfig/ksv015
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
namespace: local-path-storage, deployment: local-path-provisioner:18-36
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
18 ┌ - command:
19 │ - local-path-provisioner
20 │ - --debug
21 │ - start
22 │ - --helper-image
23 │ - docker.io/kindest/local-path-helper:v20230510-486859a6
24 │ - --config
25 │ - /etc/config/config.json
26 └ env:
..
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────────────── |
it works correctly with the latest Trivy. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/bug
Categorizes issue or PR as related to a bug.
target/kubernetes
Issues relating to kubernetes cluster scanning
Discussed in #5685
Originally posted by AkikoOrenji November 30, 2023
Description
Trying to run a k8 audit just to see misconfigurations of the local cluster e.g. permissions, groups etc
Desired Behavior
run trivy and get a report about kube
Actual Behavior
FATAL get k8s artifacts error: could not parse reference: docker-pullable://OUR-PRIVATE-DOCKER-REPO.ap-southeast-2.compute.internal:12376/cilium/cilium@sha256:somesha256sum
Reproduction Steps
Target
Kubernetes
Scanner
Misconfiguration
Output Format
None
Mode
Standalone
Debug Output
Operating System
Redhat EL
Version
Checklist
trivy image --reset
The text was updated successfully, but these errors were encountered: