stackradar

by LockDep

Helm chartv0.4.1App 0.4.1Apache-2.0Verified publisher

StackRadar Community Edition: what is running in your Kubernetes cluster, which of it is vulnerable, and what to move to. Installs the server, the UI, a bundled Postgres and the scanner, already scanning the cluster it lands in.

About this chart

stackradar

StackRadar Community Edition: what is running in your Kubernetes cluster, which of it is vulnerable, and what to move to. Installs the server, the UI, a bundled Postgres and the scanner, already scanning the cluster it lands in.

Homepage: https://stackradar.io

Maintainers

NameEmailUrl
StackRadar[email protected]https://stackradar.io

Source Code

Requirements

Kubernetes: >=1.25.0-0

RepositoryNameVersion
oci://ghcr.io/lockdep/chartsscanner(stackradar-scanner)0.7.1

[!IMPORTANT] Read the upgrade notes before you upgrade appVersion. StackRadar releases can carry schema migrations and breaking changes that the chart does not shield you from.

  1. The self-hosting guide covers the procedure.
  2. The release notes of every version you skip past, not just the target one.
  3. UPGRADING.md covers the chart-level changes.

Quickstart

One command on any Kubernetes 1.25+ cluster. No values file, no Postgres to bring, no second command for the scanner:

helm install stackradar oci://ghcr.io/lockdep/helm-charts/stackradar \
  --namespace stackradar --create-namespace

kubectl -n stackradar port-forward svc/stackradar-client 3000:3000

Open http://localhost:3000 and log in as [email protected] / admin. You will be asked to change the password; do it before exposing the install beyond localhost. The scanner installed alongside is already sweeping the cluster; its images appear with findings once the OSV mirror has bootstrapped (minutes, depending on your connection — the UI says so until then).

On a laptop cluster (kind, minikube, Docker Desktop) add the trimmed sizing and the two-minute Alpine-only mirror:

helm install stackradar oci://ghcr.io/lockdep/helm-charts/stackradar \
  --namespace stackradar --create-namespace \
  -f https://raw.githubusercontent.com/lockdep/helm-charts/main/charts/stackradar/values-quickstart.yaml

[!WARNING] Every secret the bare install uses is a public fixture — the database password, the service key, the encryption key, the session secret and the scanner's bootstrap key are the same on every install that leaves them at their defaults, and helm install prints a WARNING naming each one still in effect. With the fixture scanner key, any pod in the cluster that can reach the server Service can upload SBOMs as the local cluster. Before relying on the install, set your own values or reference existing Secrets (see Secrets). The chart never generates a secret for you: a generated value would change on every GitOps render and rotate the scanner key each sync.

What gets installed

ComponentDefaultNotes
server Deployment1 replica, monolith topologyThe API, the job worker and the OSV / EPSS / KEV sync schedule in one process.
client Deployment1 replicaThe web UI (Next.js), which also keeps its Auth.js tables in the auth schema of the same database.
postgresql StatefulSetbundled, 10Gi retained volumeSee Bundled Postgres.
stackradar-scannersubchart, onScans the cluster it lands in and reports to the server Service in-cluster.
worker Deployment, sync CronJobsonly with topology: splitThe cloud's shape, for installs that scale the pieces separately.
Ingress or HTTPRoute, NetworkPolicies, ServiceMonitor, PrometheusRule, PDBs, HPAsoffEnable per block.

Names are <release>-<component>: stackradar-server, stackradar-client, stackradar-postgresql, and the scanner's stackradar-scanner-watcher for helm install stackradar.

Secrets

Three application secrets, the database password and the scanner's bootstrap credential. Each follows the same rule:

  • Inline value (secrets.internalServiceKey, postgresql.auth.password, scanner.stackradar.apiKey, …) ⇒ the chart renders the Secret. The defaults are public fixtures; replace them with openssl rand -hex 32 (uuidgen | tr A-Z a-z for the cluster id).
  • existingSecret (secrets.existingSecret.name, postgresql.auth.existingSecret.name, database.existingSecret.name, scanner.stackradar.existingSecret, auth.<provider>.existingSecret.name) ⇒ the chart renders nothing and reads yours; the inline values must be left at their defaults, or the render fails rather than guess which is in effect. Compatible with external-secrets, sealed-secrets and SOPS.
  • Neither (an inline value blanked) ⇒ the render fails with the command that generates one.

A production install provisions four Secrets beforehand and references them:

secrets:
  existingSecret:
    name: stackradar-secrets        # internal-service-key, api-key-encryption-key, auth-secret, admin-password
postgresql:
  enabled: false
database:
  existingSecret:
    name: stackradar-db             # url: postgresql://…?sslmode=require
scanner:
  stackradar:
    existingSecret: stackradar-bootstrap   # cluster-id, api-key
auth:
  oidc:
    issuer: https://idp.example.com/realms/stackradar
    existingSecret:
      name: stackradar-oidc         # client-id, client-secret

The scanner's bootstrap credential is read by both sides: the scanner authenticates with it and the server creates the cluster local and that key at start-up from the same Secret. That is what makes the install one command. The proper fix — the scanner authenticating with a projected ServiceAccount token and no shared secret at all — is the first post-launch item.

Bundled Postgres

postgresql.enabled: true (the default) renders a single-replica StatefulSet on postgres:18-alpine, pinned by digest, with a retained data volume and a NetworkPolicy that admits only this release's pods — rendered whatever networkPolicy.enabled says, because a database whose password may still be the public fixture must not be reachable from every pod in the cluster. helm uninstall never deletes the volume.

What it is not: highly available, backed up, or upgraded across Postgres majors for you. There is no backup CronJob in this chart version; back it up yourself:

kubectl -n stackradar exec stackradar-postgresql-0 -- \
  pg_dump -U stackradar -Fc stackradar > stackradar.dump

Moving to your own Postgres

  1. Scale the apps down so nothing writes: kubectl -n stackradar scale deploy stackradar-server stackradar-client --replicas=0.
  2. Dump the bundle (above) and restore it into the new database: pg_restore -d "postgresql://…/stackradar?sslmode=require" --no-owner stackradar.dump. The restore needs the auth and drizzle schemas and both apps' migration journals, which -Fc carries.
  3. Put the new connection string in a Secret (url key) and flip the values: postgresql.enabled: false, database.existingSecret.name: <secret>.
  4. helm upgrade. The pods come up against the new database; the chain is already applied, so the start-up migration is a no-op.
  5. Once satisfied, delete the retained claim data-stackradar-postgresql-0.

Topology

topology: monolith (default) is server + client + the scanner. The server process runs the job worker and an in-process cron for the vulnerability feeds on the same schedules as the cloud's CronJobs, in UTC (sync.*.schedule). Replicas are safe: the queue claims with SKIP LOCKED and every sync takes a Postgres advisory lock.

topology: split renders the worker Deployment and one CronJob per feed (osv-sync, osv-bootstrap, epss-sync, kev-sync, and artifacthub-sync when vulnerabilityData.artifactHubSync.enabled), and the server is HTTP-only. Setting worker.* knobs under monolith fails the render rather than being ignored.

Vulnerability data

The server mirrors OSV, EPSS and KEV itself; nothing phones home. vulnerabilityData.osvEcosystems scopes the mirror: empty is the community default list (the base images and package managers a cluster is made of), Alpine is a 40 MB two-minute mirror for a first look, * is the whole corpus (~2.5 GB of downloads, ~12 GB on disk). Widening the list rebuilds the mirror at the next bootstrap check. The server's memory default (server.resources) is sized for the import.

Migrations and the initializer

By default every server and client pod applies its own migration chain at start-up, serialised across replicas by a Postgres advisory lock: one migrates, the rest wait and find nothing to do. This works for Helm, Flux and Argo CD with no extra configuration.

initializer.enabled: true moves that to two pre-install/pre-upgrade hook Jobs (the server image with MIGRATE_EXIT_AFTER=true, then the client's), and the app pods skip it. Do note:

  • Everything the Jobs read must exist before the release does. A Helm hook runs before the chart's own Secrets and before the bundled StatefulSet, so the initializer requires an external database (postgresql.enabled: false, database.existingSecret.name) and the application secrets from secrets.existingSecret.name. The render fails otherwise.
  • The Jobs run on every sync. Argo CD runs pre-install hooks as a PreSync step and re-runs them each sync, which is safe because the chain no-ops when the database is current. If your team disables Helm hooks in Argo CD, leave the initializer off.

Sign-in

Local username/password is on by default (auth.local.*); the first admin is created at start-up and must change the password on first login. Add auth.oidc.* for any OpenID Connect provider (callback <externalUrl>/api/auth/callback/oidc), or auth.github.* / auth.google.*. auth.local.enabled: false hides the form once your identity provider works; the render refuses a configuration with no sign-in method at all. Locked out:

kubectl -n stackradar exec deploy/stackradar-client -- node scripts/admin-reset-password.mjs [email protected]

The local sign-in's per-address rate limit is in-process; with more than one client replica, rate-limit POST /api/auth/local at the ingress.

Reaching it

Port-forward (the default; NOTES prints the commands), ingress.* or httpRoute.* — never both. Both route / to the client; exposeApi: true adds /v1 to the server for uploading SBOMs from outside the cluster (the bundled scanner needs no route). externalUrl pins the browser-facing URL when it cannot be derived from the hostname.

OpenShift compatibility

The chart targets parity with OpenShift's restricted-v2 SCC and the Pod Security Admission restricted profile. Every pod ships with allowPrivilegeEscalation: false, capabilities.drop: [ALL], runAsNonRoot: true, seccompProfile.type: RuntimeDefault, readOnlyRootFilesystem: true, no host namespaces, no ports below 1024 and no NodePort default. OpenShift assigns UIDs per namespace, so null the pod-level contexts and let the SCC pick them:

server:
  podSecurityContext: ~
client:
  podSecurityContext: ~
postgresql:
  podSecurityContext: ~

Upgrading

helm upgrade stackradar oci://ghcr.io/lockdep/helm-charts/stackradar \
  --namespace stackradar --version <version> -f my-values.yaml

A helm upgrade with no value changes changes nothing: no Secret is rewritten, no key rotates, and the start-up migration finds nothing to do. Image tags default to the chart's appVersion; a tag from another major is refused by the render.

Values

KeyTypeDefaultDescription
auth.github.clientIdstring""
auth.github.clientSecretstring""
auth.github.existingSecret.clientIdKeystring"client-id"
auth.github.existingSecret.clientSecretKeystring"client-secret"
auth.github.existingSecret.namestring""
auth.google.clientIdstring""
auth.google.clientSecretstring""
auth.google.existingSecret.clientIdKeystring"client-id"
auth.google.existingSecret.clientSecretKeystring"client-secret"
auth.google.existingSecret.namestring""
auth.local.adminEmailstring"[email protected]"
auth.local.adminPasswordstring"admin"Used exactly once: the first login forces a change. Read from secrets.existingSecret (adminPasswordKey) when that is set.
auth.local.enabledbooltrueLocal username/password sign-in. The first admin is created at start-up with the email and password below and must change the password on first login. false hides the form once an identity provider below works.
auth.oidc.adminGroupstring""Members of this group (in groupsClaim) are platform admins, re-evaluated on every sign-in. Empty: admins are managed in StackRadar only.
auth.oidc.clientIdstring""
auth.oidc.clientSecretstring""
auth.oidc.existingSecret.clientIdKeystring"client-id"
auth.oidc.existingSecret.clientSecretKeystring"client-secret"
auth.oidc.existingSecret.namestring""Name of an existing Secret holding the client id and secret.
auth.oidc.groupsClaimstring""The claim that carries groups. Empty: groups.
auth.oidc.issuerstring""

|

Deploy stackradar with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has stackradar on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartstackradar is pinned at v0.4.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply