devradarctl

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 6 Imported by: 0

README

devradarctl

CLI for the DevRadar service. It hides the by-digest / all-layers / base64 mechanics of getting an SBOM into DevRadar behind two commands:

  • devradarctl sbom — generate an all-layers CycloneDX SBOM for a container image.
  • devradarctl submit — submit an SBOM (from a file, or generated from an image).

Install

go install github.com/thingzio/devradarctl@latest

Or download a release archive from the releases page.

Prerequisites
  • syft on PATH (or pass --syft-path) — used to generate SBOMs. Only required for the sbom command and submit --image.
  • Image digest resolution is done in-process (no crane needed) and uses your ambient Docker credentials (docker login, credential helpers).

Usage

Generate an SBOM
# Print to stdout
devradarctl sbom --image alpine:3.20

# Write to a file
devradarctl sbom --image alpine:3.20 --output alpine.cdx.json

The image is pinned to its manifest digest (repo@sha256:…) before syft runs, so the SBOM carries the digest DevRadar uses to identify the image unambiguously.

Submit an SBOM

The API token is read from DEVRADAR_TOKEN, or piped via stdin.

# From an existing SBOM file
DEVRADAR_TOKEN=xxx devradarctl submit --file alpine.cdx.json --image-ref alpine@sha256:…

# From an image (resolve digest, generate, submit — one step)
echo "$DEVRADAR_TOKEN" | devradarctl submit --image alpine:3.20 --group team-x --group prod

Configuration

Flag Env var Default Description
--base-url DEVRADAR_BASE_URL https://devradar.thingz.io DevRadar service base URL
(token) DEVRADAR_TOKEN API token (or piped via stdin)
--group DEVRADAR_TAGS Grouping label(s); repeatable / comma env
--syft-path DEVRADAR_SYFT_PATH syft Path to the syft binary
--scope all-layers syft cataloging scope
--debug DEVRADAR_DEBUG false Debug logging (default level is warn)
--log-json DEVRADAR_LOG_JSON false Emit logs as JSON

Development

make build     # build ./bin/devradarctl
make test      # unit tests (race + coverage)
make lint      # go vet + golangci-lint
make snapshot  # local goreleaser snapshot build

License

MIT — see LICENSE.

Documentation

Overview

Command devradarctl is the CLI for the DevRadar service: it generates container-image SBOMs and submits them to a DevRadar instance.

Directories

Path Synopsis
internal
cli
Package cli wires the devradarctl command tree (urfave/cli v3).
Package cli wires the devradarctl command tree (urfave/cli v3).
client
Package client is a thin HTTP client for the DevRadar SBOM ingest API.
Package client is a thin HTTP client for the DevRadar SBOM ingest API.
logging
Package logging configures the process-wide structured logger for the CLI.
Package logging configures the process-wide structured logger for the CLI.
sbom
Package sbom generates and describes container-image SBOMs for devradarctl.
Package sbom generates and describes container-image SBOMs for devradarctl.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL