Skip to content

Install Cert-X-Gen

Install the cxg binary, confirm it runs, and see where it keeps the detection templates it fetches for itself.

Cert-X-Gen is Apache-2.0 licensed and runs on macOS and Linux, on both x86-64 and ARM64. Every release also publishes a Windows binary, which works the same way but is not covered here.

The shortest path. It detects your platform, downloads the latest release, checks it against the release’s SHA256SUMS, and installs it.

Terminal window
curl -fsSL https://raw.githubusercontent.com/Bugb-Technologies/cert-x-gen/main/install.sh | bash
╔═══════════════════════════════════════╗
║ CERT-X-GEN Installer ║
╚═══════════════════════════════════════╝
[INFO] Detected platform: darwin-arm64
[INFO] Installing version: v1.6.1
[INFO] Downloading cxg v1.6.1 for darwin-arm64...
[INFO] Verifying checksum...
cxg-darwin-arm64: OK
[INFO] Installing to /usr/local/bin/cxg...
[INFO] Installation complete!
Run 'cxg --version' to verify installation
Run 'cxg template update' to download templates
Documentation: https://github.com/Bugb-Technologies/cert-x-gen

It writes to /usr/local/bin, which usually needs sudo. Set INSTALL_DIR to put it somewhere you own instead:

Terminal window
curl -fsSL https://raw.githubusercontent.com/Bugb-Technologies/cert-x-gen/main/install.sh \
| INSTALL_DIR="$HOME/.local/bin" bash

This is the one method that follows the latest release rather than a fixed version. Today that is 1.6.1, which is what this site documents. Piping a script into a shell runs whatever that URL serves, so read install.sh first if that matters to you, or use the release-binary tab, which pins a version.

All four give you 1.6.1, which is what this site’s reference documents. Pick on toolchain and upgrade path instead.

Method Pins a version Needs a toolchain Upgrade path
Install script No, follows the latest release No Re-run it
Release binary Yes, the URL names the tag No Download the next tag
Homebrew tap Yes, the formula’s version No brew upgrade
cargo install cert-x-gen Yes, the crates.io version Rust cargo install cert-x-gen --force
Docker image Yes, the image tag No, Docker only Pull the next tag

Verified on 2026-10-19 against the v1.6.1 release: the install script resolved v1.6.1 and its download passed the release’s SHA256SUMS, the release asset passed the same check on its own, the crates.io API reports 1.6.1 as the newest cert-x-gen, the tap’s formula pins 1.6.1, and the container image tagged 1.6.1 reports it. The installer transcript above was captured with INSTALL_DIR pointed at a scratch directory; its Installing to line is shown with the default path, which is the only line that differs.

Upgrade through the method you installed with. cxg update knows the difference: it replaces only a binary that no package manager owns. A cxg in a Homebrew Cellar, in cargo’s bin directory, or inside a container is left alone, and cxg update prints the command that upgrades it and exits 3:

Terminal window
$ cxg update
cxg at /opt/homebrew/Cellar/cxg/1.6.1/bin/cxg is managed by Homebrew, so `cxg update` leaves it alone.
Upgrade it with: brew upgrade cxg
(Pass --force to replace the file anyway.)

Replacing the file behind the manager’s back would leave the manager believing the old version is installed, which is why --force is the only way past it. For a binary from the install script or the release-binary tab, cxg update does the upgrade itself, and checks the download against the release’s SHA256SUMS before it replaces anything:

Terminal window
$ cxg update
cxg is already up to date (v1.6.1)

--check only reports whether a newer release exists. cxg update no longer fetches detection templates on the way; cxg template update does that.

If you use cxg pentest, its pipeline follows the binary on its own. See after an upgrade.

Every release publishes a multi-architecture image to the GitHub Container Registry. Nothing is installed on your machine, and the image already carries its templates, so the first run scans rather than downloading a catalogue.

Terminal window
docker run --rm ghcr.io/bugb-technologies/cert-x-gen:1.6.1 version
CERT-X-GEN v1.6.1
Advanced Multi-Language Security Scanning Engine
Build Information:
Version: 1.6.1
Target: aarch64-linux
Links:
Repository: https://github.com/Bugb-Technologies/cert-x-gen
Documentation: https://docs.bugb.io/cxg/
Issues: https://github.com/Bugb-Technologies/cert-x-gen/issues

:latest also exists. Name the version if you want the run to stay reproducible.

This is also the answer to the warning further down this page. A template runs as the user who invoked cxg, with that user’s files and credentials, and a container is the layer that actually bounds what it can reach. It is not a feature of cxg and cxg makes no isolation claim of its own. See the template trust model.

Terminal window
cxg version
CERT-X-GEN v1.6.1
Advanced Multi-Language Security Scanning Engine
Build Information:
Version: 1.6.1
Target: aarch64-macos
Links:
Repository: https://github.com/Bugb-Technologies/cert-x-gen
Documentation: https://docs.bugb.io/cxg/
Issues: https://github.com/Bugb-Technologies/cert-x-gen/issues

Your Version: and Target: lines will differ. What matters is that the command prints this block rather than command not found.

Cert-X-Gen ships without detection templates, and fetches them for you. The first time you run any command on a machine with no templates, cxg announces 📦 First run detected! Installing templates from GitHub..., pulls the official repository, and then carries on with whatever you asked it to do. The line that confirms the fetch is:

[INF] Updated repositories: official

A summary follows, counting the templates it installed and breaking them down by language. Those numbers move with every template release, so treat them as a sign it worked rather than as a figure to remember.

You do not have to do anything to trigger this, and it happens once. Later runs go straight to work with no banner. It does need outbound HTTPS to github.com, so on a machine without it, fetch templates separately and copy them in. The container image is the exception: its templates are baked in at build time, so it works with no outbound access at all.

To pull the latest templates yourself, at any time:

Terminal window
cxg template update

Cert-X-Gen also checks hourly whether newer templates exist. When they do, it prints a line telling you so and leaves the decision to you, rather than updating underneath a scan you are in the middle of.

Terminal window
cxg template pwd
📂 Template Directories (priority order):
[✗] Local (project) /Users/you/work/templates
[✓] User /Users/you/.cert-x-gen/templates
[✗] System /usr/local/share/cert-x-gen/templates

Your paths will differ. A [✓] on User means the auto-install worked, and that is where cxg template update writes.

Local (project) is a templates/ directory in whatever directory you are standing in, and it wins over the other two. That is useful when you are developing templates and surprising when you are not, so it is worth checking this output if a scan runs templates you did not expect.

  • Read your first scan reads a real finding on a target you control, and explains the summary and the results file.
  • Scan a target covers scope, template selection, and output formats in full.
  • CLI reference has every command, flag, and default.