Skip to main content
RelixQ
Menu

CLI: platform and QAST commands

The commands that talk to your tenant — login, org, use, remote-scan, submit, report, rules — plus the `pentest` group for quantum exposure assessment and the release gate.

Distribution
Single static binary
QAST group
pentest
CI credential
RELIXQ_API_TOKEN
Browse the Developer Guide

Local commands vs platform commands

One binary, two kinds of command. The local half — scan, scan deps, scan tls, baseline, doctor, version, self-update — needs no network and no account, and runs entirely on your machine.

This page covers the other half — the commands that call your tenant API and, unless noted, require an authenticated session. There is no offline fallback for them, with one deliberate exception described under the release gate.

Authentication and configuration

Credentials resolve in a fixed order: RELIXQ_API_TOKEN (then the legacy RELIXQ_TOKEN) from the environment, then the OS keychain — Windows Credential Manager, macOS Keychain, or Linux Secret Service — populated by relixq login. If neither yields a token, platform commands fail with not logged in.

Environment variableMeaning
RELIXQ_API_URLPlatform API base URL; overrides remote.api_url in relixq.yaml
RELIXQ_API_TOKENAPI token — the canonical name for CI. Checked before the OS keychain.
RELIXQ_TOKENLegacy alias, checked second
RELIXQ_PROJECTActive project; overrides project in relixq.yaml
RELIXQ_BASE_SARIFFallback for --base-sarif on pr-comment
GITHUB_TOKEN, GITHUB_REPOSITORY, GITHUB_SHARequired to publish to GitHub from pr-comment and pentest gate
GITHUB_EVENT_PATHAuto-detects the pull-request number on pull_request events
yamlThe platform-relevant part of relixq.yaml
version: 1
project: payments-api        # active project for platform commands
default_branch: main

remote:
  api_url: https://api.relixq.io

gate:
  fail_on_score_drop: 5      # see relixq pentest gate

Session and workspace commands

relixq login / logout / whoami
login runs the device-code flow: it prints a verification URL and a short code, you approve in a browser, and the resulting access and refresh tokens are stored in your OS keychain — never on disk in plain text. logout removes them. whoami currently confirms that a stored credential exists; it does not yet call a profile endpoint.
relixq org list / org use <slug>
org list prints the organizations you belong to with slug, name, role, and join date. org use switches your active organization: the platform re-mints your access token scoped to the target org, so every subsequent command operates in that context. Exits 1 if the slug is not among your memberships.
relixq use <project-slug>
Sets the active project by writing the project field into relixq.yaml in the current directory, creating the file if absent and preserving other settings. Purely local — no API call.

Getting results into your tenant

relixq remote-scan [--wait]
Triggers a scan on the platform for the active project. Without --wait it prints the scan run id and returns. With --wait it polls every 3 seconds until the run reaches a terminal state, then prints the findings in your configured output format. Exits 1 if the scan ends failed or cancelled.
relixq submit [findings.jsonl]
Uploads local scan results so they appear in your workspace alongside server-side scans. Reads JSONL from the file argument or from stdin, so it pipes directly from a local scan.
relixq report --scan-id <id>
Downloads the report for a completed platform scan. --format accepts markdown, sarif, json, or html; -o writes to a file.
relixq rules list / install / update / show
Manages rule packs through the platform rule registry. These are not a local pack manager and require login. For local scans, point --rules at a rule directory instead.
console
# Scan locally, then publish the findings to your tenant
relixq scan --format jsonl | relixq submit

# Or have the platform do the scanning
relixq remote-scan --wait

relixq pr-comment

Reads a SARIF file produced by relixq scan --format sarif, then posts or updates an idempotent summary comment on the pull request and creates a GitHub check run with inline annotations, capped at 50. The comment leads with the RelixQ Score; pass --base-sarif with a scan of the base branch to show a before-and-after delta.

FlagDefaultMeaning
--sarif(required)SARIF file from relixq scan --format sarif
--base-sarif$RELIXQ_BASE_SARIFSARIF scan of the base branch; enables the score delta
--modewarnobserve | warn | block
--fail-oncriticalSeverity that fails the check run in block mode
--pr-numberauto-detectPull request number

The pentest command group

The QAST honesty stance applies verbatim to every subcommand: adversary modeling, reachability, and a consent-gated PQC-readiness probe. No decryption is performed.

CommandPurpose
relixq pentest run --project <id> [--active]Starts a QAST run. Passive is the default — classification and attack-path projection over already-discovered evidence, zero network probing. --active opts into read-only PQC-handshake observation and is refused with HTTP 403 without a signature-verified Rules of Engagement. There is no override flag.
relixq pentest report --project <id> --run <id> --download [-o <file>]Downloads the QAST report. The explicit --download flag is required — the command refuses to run without it.
relixq pentest retest --project <id> --run <id>Re-runs a prior assessment against the same scope to verify remediation.
relixq pentest gate ...The release gate — see Release gates.
console
$ relixq pentest run --project payments-api
QAST run started: 7d31c0aa-....
  mode:   passive
  status: queued
  QAST - adversary-modeling + reachability + consent-gated PQC-readiness probe;
  no decryption is performed.

With --quiet, only the run id is printed, which is script-friendly. Exit codes: 1 on the RoE refusal, when no project is set, or on any API error; 0 when the run is accepted.

relixq pentest gate flags

FlagMeaning
--project <id>Project id; overrides relixq.yaml and RELIXQ_PROJECT
--run <id>(required) QAST run id for the scanned (head) ref
--base-run <id>QAST run id for the base ref; enables the new-exposure diff
--modeobserve | warn | block (default warn) — only block can fail the merge
--fail-onMinimum new relevance or severity that fails the gate in block mode (default critical)
--findings-sarifHead-ref static-findings SARIF; adds the finding-severity and regression conditions
--base-findings-sarifBase-ref findings SARIF; enables net-new-finding and score-regression gating
--fail-on-score-drop <n>A score regression of at least n points blocks in block mode. 0 disables (warn-only).
--exception "<fingerprint-or-*>[:reason]"Repeatable local stand-in for a scoped exception; downgrades a matching block to a warn
--sarif <file>Write a SARIF of HNDL exposures and attack paths for code scanning
--audit <file>Write the gate-result audit event JSON
--jsonEmit the canonical decision JSON to stdout
--dry-runCompute the decision fully offline: no GitHub API, no files written. Implies --json.
--no-publishCompute the decision, and write SARIF, without posting to GitHub
--local / --no-remoteForce findings-only: never contact the platform or the OS keychain

Exit codes: 1 when the verdict is fail — which only block mode produces — or when the command itself errors; 0 otherwise. The exit code, the JSON verdict, the check-run conclusion, and the PR comment always agree.

Related pages