KubeClarity is a tool for detection and management of Software Bill Of Materials (SBOM) and vulnerabilities of container images and filesystems. It scans both runtime K8s clusters and CI/CD pipelines for enhanced software supply chain security.
KubeClarity content analyzer integrates with the following SBOM generators:
KubeClarity vulnerability scanner integrates with the following scanners:
The integrations with the SBOM generators can be found here, and the integrations with the vulnerability scanners can be found here here. To enable and configure the supported SBOM generators and vulnerability scanners, please check the “analyzer” and “scanner” config under the “vulnerability-scanner” section in Helm values.
Contributions of integrations with additional tools are more than welcome!
helm repo add kubeclarity https://openclarity.github.io/kubeclarity
helm show values kubeclarity/kubeclarity > values.yaml
values.yaml
and update the required values if neededhelm install –values values.yaml –create-namespace kubeclarity kubeclarity/kubeclarity -n kubeclarity
or for OpenShift Restricted SCC compatible install:
helm install –values values.yaml –create-namespace kubeclarity kubeclarity/kubeclarity -n kubeclarity –set global.openShiftRestricted=true \
–set kubeclarity-postgresql.securityContext.enabled=false –set kubeclarity-postgresql.containerSecurityContext.enabled=false \
–set kubeclarity-postgresql.volumePermissions.enabled=true –set kubeclarity-postgresql.volumePermissions.securityContext.runAsUser=”auto” \
–set kubeclarity-postgresql.shmVolume.chmod.enabled=false
kubectl port-forward -n kubeclarity svc/kubeclarity-kubeclarity 9999:8080
VERSION=test make docker-backend
docker run -p 8080:8080 -e FAKE_RUNTIME_SCANNER=true -e FAKE_DATA=true -e ENABLE_DB_INFO_LOGS=true -e DATABASE_DRIVER=LOCAL ghcr.io/openclarity/kubeclarity:test run
Local build:
make ui && make backend
Open KubeClarity UI in the browser: http://localhost:8080/
KubeClarity includes a CLI that can be run locally and especially useful for CI/CD pipelines. It allows to analyze images and directories to generate SBOM, and scan it for vulnerabilities. The results can be exported to KubeClarity backend.
Download the release distribution for your OS from the releases page
Unpack the kubeclarity-cli
binary, add it to your PATH, and you are good to go!
A Docker image is available at ghcr.io/openclarity/kubeclarity-cli
with list of available tags here.
make cli
Copy ./cli/bin/cli
to your PATH under kubeclarity-cli
.
A list of the content analyzers to use can be configured using the ANALYZER_LIST env variable seperated by a space (e.g ANALYZER_LIST=”syft gomod”)
kubeclarity-cli analyze –input-type -o
For example:
ANALYZER_LIST=”syft” kubeclarity-cli analyze nginx:latest -o nginx.sbom
Vulnerability scanning using multiple integrated scanners
A list of the vulnerability scanners to use can be configured using the SCANNERS_LIST env variable seperated by a space (e.g SCANNERS_LIST=”grype dependency-track”)
kubeclarity-cli scan –input-type -f
For example:
SCANNERS_LIST=”grype” kubeclarity-cli scan nginx.sbom –input-type sbom
Create an AWS IAM user with AmazonEC2ContainerRegistryFullAccess
permissions.
Use the user credentials (AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
, AWS_DEFAULT_REGION
) to create the following secret:
cat <<EOF | kubectl apply -f –
apiVersion: v1
kind: Secret
metadata:
name: ecr-sa
namespace: kubeclarity
type: Opaque
data:
AWS_ACCESS_KEY_ID: $(echo -n ‘XXXX’| base64 -w0)
AWS_SECRET_ACCESS_KEY: $(echo -n ‘XXXX’| base64 -w0)
AWS_DEFAULT_REGION: $(echo -n ‘XXXX’| base64 -w0)
EOF
Note:
ecr-sa
AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
and AWS_DEFAULT_REGION
Create a Google service account with Artifact Registry Reader
permissions.
Use the service account json file to create the following secret
kubectl -n kubeclarity create secret generic –from-file=sa.json gcr-sa
Note:
gcr-sa
sa.json
must be the name of the service account json file when generating the secretshadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…
Extract and execute a PE embedded within a PNG file using an LNK file. The…
Embark on the journey of becoming a certified Red Team professional with our definitive guide.…
This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…
This took me like 4 days (+2 days for an update), but I got it…
MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…