Skip to content
openctemioPublic

About

Open-source Continuous Threat Exposure Management (CTEM) platform: asset discovery, attack surface management, risk-based prioritization, validation and remediation in one place. Go API + Next.js web UI.

Topics

Resources

Contributing

Security policy

Stars

14 stars

Watchers

0 watching

Forks

Repository files navigation

OpenCTEM

API CI Web CI CodeQL License: GPL-3.0

Open-source Continuous Threat Exposure Management platform. This repository holds the two parts that ship together:

Directory What Image
server/ Go API server, migrations, admin CLI (module github.com/openctemio/openctem/server) ghcr.io/openctemio/openctem-server (openctem-api up to v0.22.x)
web/ Next.js web console, and the platform console for platform administrators (same source, console build target) ghcr.io/openctemio/openctem-web, ghcr.io/openctemio/openctem-console
deploy/allinone/ API + web + platform console + gateway in one container (Postgres/Redis external) ghcr.io/openctemio/openctem

Released separately, in their own repositories: sensor (runs scans in your networks), sdk-go, ctis (shared contract), ci (CI/CD runner and pipeline integrations), sast-rules (the signed SAST rules pack for opengrep), helm-charts, openctem-ansible (hardened VM install kit), docs (public documentation, published at docs.openctem.io).

Repository layout & history

The monorepo was formed on 2026-10-02 (RFC-020):

  • openctemio/api → this repository. It was renamed, so its issues, pull requests, releases (v0.1.x–v0.8.0) and old links carry over and redirect here. Its Go code moved to server/; the module path is now github.com/openctemio/openctem/server.
  • openctemio/ui → web/. Its full history was imported under web/, and openctemio/ui is archived (read-only); its old releases stay there. Cite its PRs as openctemio/ui#NNN: a bare #NNN means this repository.
  • ui/vX.Y.Z tags are the ui repository's tags, imported for history only. They release nothing; only vX.Y.Z tags do (see Releases).
  • Images moved from ghcr.io/openctemio/api / ui to openctem-api / openctem-web at v0.9.0. The server image is openctem-server from v0.23.0; openctem-api and api keep their v0.22.x and earlier tags and receive no new ones.
  • openctemio/agent had already become openctemio/sensor (RFC-023).

More: repository map, CI/CD and releases.

Quick start (development)

make setup     # go mod download, npm ci, enable git hooks
make dev-api   # see server/README.md for Postgres/Redis
make dev-web   # http://localhost:3000
make check     # what CI runs, both components

Deploying

Quick start (self-hosting with Docker Compose)

On a Linux host with 4 GB of memory or more, from a checkout of a release tag (or the release's verified openctem-compose-vX.Y.Z.tar.gz bundle, see the guide):

cd server/deploy
./install.sh

It checks Docker and the host, asks for the host name, the TLS mode, the first administrators and the bundled sensor (Enter accepts each default), writes .env with generated secrets, verifies the image signatures, starts the stack, waits until it is healthy and prints the URLs and how to sign in. ./install.sh --help lists the options for unattended installs.

  • Compose, one HTTPS port: server/deploy/docker-compose.yml runs the gateway (server/deploy/gateway, Caddy), web, the platform console, API, the job signer, Postgres and Redis, plus one-shot migration and bootstrap containers; only the gateway is published.
  • All-in-one image: ghcr.io/openctemio/openctem embeds the same gateway.
    docker run -d -p 443:443 -v openctem-data:/data \
      -e OPENCTEM_HOSTNAME=ctem.example.com \
      -e DB_HOST=db.example.com -e DB_PASSWORD=... -e DB_SSLMODE=require \
      -e REDIS_HOST=redis.example.com -e REDIS_PASSWORD=... -e REDIS_TLS_ENABLED=true \
      -e APP_ENCRYPTION_KEY=... \
      -e FINGERPRINT_KEY=... \
      ghcr.io/openctemio/openctem:vX.Y.Z
    An unset APP_ENV means production, so the container refuses to start until the production checks pass: DB_SSLMODE require or verify-full, a Redis password of 32+ characters with REDIS_TLS_ENABLED=true (plus REDIS_TLS_CA_FILE for a private CA), an APP_ENCRYPTION_KEY (openssl rand -hex 32; keep it, the stored credentials need it), a FINGERPRINT_KEY (openssl rand -hex 32; keep it, never rotate it), and no secret left at example text. The session secret AUTH_JWT_SECRET is derived from APP_ENCRYPTION_KEY when unset; set it (64+ characters, openssl rand -hex 64) to rotate the two independently. For a throwaway trial without TLS to the datastores, set APP_ENV=development explicitly; never for real data. --entrypoint /opt/openctem/api/server ... -check-config validates the settings without starting anything. GATEWAY=on (default) serves only :443 (OPENCTEM_TLS_MODE internal | acme | files | http, as in the Compose gateway); GATEWAY=off serves the API on :8080 and the web on :3000 for your own proxy. /data keeps attachments and the gateway's CA: mount a volume.
  • Kubernetes: helm-charts.

Installation, configuration and operations are documented at docs.openctem.io/install.

Releases

One tag, vX.Y.Z, releases every image from the same commit: openctem-server, openctem-web, openctem (all-in-one), openctem-gateway, migrations, seed, all openctem-web, openctem-console, openctem (all-in-one), openctem-gateway, migrations, seed, admin-cli, all multi-arch (amd64, arm64), signed with cosign, with a signed SPDX SBOM attestation (also attached to the release) and a signed SLSA build provenance per image. The release notes carry the cosign verify and cosign verify-attestation --type spdxjson commands for the tag. The pre-monorepo names ghcr.io/openctemio/api and ghcr.io/openctemio/ui receive best-effort copies during a transition window (v0.9.0 has no ui copy); use the current names. See .github/workflows/docker-publish.yml.

The API contract

server/api/openapi/swagger.yaml is generated from the Go handler annotations (gated by server/scripts/check-openapi.sh), and the web wire types in web/src/lib/api/generated/api.types.ts are generated from that file. Neither is committed: run make generate after cloning or pulling (make generate-docker needs only Docker). CI type-checks the web against the contract a pull request produces, so a change to the API contract and the web code that consumes it land in one pull request, and it posts the contract changes (breaking changes, route gate changes) on the pull request.

Documentation

Contributing / security

See CONTRIBUTING.md. Report vulnerabilities privately as described in SECURITY.md, never in a public issue.

About

Open-source Continuous Threat Exposure Management (CTEM) platform: asset discovery, attack surface management, risk-based prioritization, validation and remediation in one place. Go API + Next.js web UI.

Topics

Resources

Contributing

Security policy

Stars

14 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages