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

17 stars

Watchers

0 watching

Forks

Repository files navigation

OpenCTEM

API CI Web CI CodeQL License: GPL-3.0

OpenCTEM is an open-source platform that shows you what attackers can reach in your estate, which weaknesses matter most, and whether the fixes really worked. It finds your internet-facing assets, gathers findings from your scanners in one place, ranks them by real risk, and follows each one until it is fixed and re-tested.

The OpenCTEM dashboard: what would cut exposure most, and the flow of findings from scanners to outcomes

Demo data only: the screenshots use a made-up organization and example domains.

What you get

  • One list of findings from many scanners and imports, de-duplicated, with known-exploited and ransomware flags and due dates.
  • A map of your attack surface: what you expose on the internet, what is new, and a grade that tells you what to fix to raise it.
  • Exposure chains: possible paths from an internet-facing entry point to an asset with a critical or known-exploited finding, ranked by urgency.
  • A fix plan: open tasks ranked by the risk each one removes, with due dates.
  • Re-tests that close the loop: a finding closes when a re-test confirms the fix.
  • Self-hosted: runs on your own Linux host with Docker Compose, or on Kubernetes.
Findings list ranked by priority, with due dates Attack surface overview with a posture grade
Findings: ranked by priority, with signals and due dates Attack surface: what you expose, and what to fix first
Exposure chains ranked by urgency Fix plan with tasks ranked by risk removed
Exposure chains: possible paths to your riskiest assets Remediation: a fix plan ranked by risk removed

Get started

On a Linux host with Docker and 4 GB of memory or more:

cd server/deploy
./install.sh

The script asks a few questions (every default is one Enter), starts the stack and prints how to sign in. Details are in Deploying below. Documentation: docs.openctem.io. Website: openctem.io.

What is in this repository

This repository holds the 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

17 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages