runtz

CLI

Use the runtz CLI to run scans.

CLI

The runtz CLI is written in Go. The implemented commands are sca, sast, host, container and k8s.

Every scan command requires --endpoint and --token. For the Runtz SaaS engine, use:

https://runtz-engine.rawdevops.io

Run an SCA scan

From the runtz/ project root:

cd cli
go run ./cmd/runtz sca \
  --file ../frontend/package.json \
  --endpoint https://runtz-engine.rawdevops.io \
  --token rtz_live_...

Expected output:

SCA scan completed and sent to Runtz Platform.
Project: frontend
Dependencies: 42
Vulnerabilities: 0

Run a SAST scan

The first SAST scanner uses local static rules for high-signal checks such as committed secrets, dynamic code execution, disabled TLS verification and weak hash usage.

cd cli
go run ./cmd/runtz sast \
  --path ../frontend/src \
  --endpoint https://runtz-engine.rawdevops.io \
  --token rtz_live_...

Run a host package scan

The first host scanner reads the package database from a dpkg-based root filesystem.

cd cli
go run ./cmd/runtz host \
  --endpoint https://runtz-engine.rawdevops.io \
  --token rtz_live_...

Use --hostname when you want the scan to appear under a specific hostname in the platform. Use --rootfs only when scanning packages from another mounted root filesystem.

Run a container package scan

The first container scanner pulls and reads the image layers directly. It does not call Trivy or Grype.

cd cli
go run ./cmd/runtz container \
  --image ubuntu:22.04 \
  --endpoint https://runtz-engine.rawdevops.io \
  --token rtz_live_...

For an image that exists only in the local Docker daemon, add --local:

cd cli
go run ./cmd/runtz container \
  --image gataria-backend-payments:latest \
  --local \
  --endpoint https://runtz-engine.rawdevops.io \
  --token rtz_live_...

Run a Kubernetes scan

The Kubernetes scanner uses your current kubectl connection by default. The user running the command must already be authenticated to a cluster.

cd cli
go run ./cmd/runtz k8s \
  --endpoint https://runtz-engine.rawdevops.io \
  --token rtz_live_...

Scope a live cluster scan to one namespace:

go run ./cmd/runtz k8s \
  --context production \
  --namespace payments \
  --endpoint https://runtz-engine.rawdevops.io \
  --token rtz_live_...

Use --path when you want to scan YAML/JSON manifests from a repo or rendered chart instead of the live cluster:

go run ./cmd/runtz k8s \
  --path ../helm/runtz/templates \
  --endpoint https://runtz-engine.rawdevops.io \
  --token rtz_live_...

Flags

FlagDescriptionDefault
--fileSCA path to package.jsonpackage.json
--pathSource path for SAST, or optional manifest path for KubernetesSAST: ., Kubernetes: live cluster
--targetKubernetes target name shown in the platformcurrent context or directory name
--kubectlkubectl binary path for Kubernetes scanskubectl
--kubeconfigkubeconfig path for Kubernetes scansKUBECONFIG
--contextKubernetes context overridecurrent context
--namespaceNamespace to scan instead of all namespacesunset
--all-namespacesScan all namespaces when --namespace is not settrue
--rootfsHost root filesystem path whose dpkg package database is scanned/
--hostnameHostname override for host scanslocal hostname
--imageContainer image referenceRUNTZ_CONTAINER_IMAGE
--localRead the container image from the local Docker daemon instead of a registryRUNTZ_CONTAINER_LOCAL
--endpointBackend endpointrequired
--tokenToken generated in the platformrequired
--projectProject name overrideRUNTZ_PROJECT
--sourceSource path or repository URLRUNTZ_SOURCE
--github-tokenOptional GitHub token for higher API limitsGITHUB_TOKEN
--osv-urlOptional OSV API base URL for host/container CVE matchinghttps://api.osv.dev

Advisory sources

The SCA command uses GitHub Global Security Advisories and queries npm advisories with the affects=package@version filter.

Reference: GitHub REST API endpoints for global security advisories.

The host and container commands read etc/os-release and var/lib/dpkg/status, normalize installed packages and query OSV for Ubuntu/Debian package CVEs.

The SAST and Kubernetes commands send normalized findings to the backend and use the same workspace token model as the other scan types.

On this page