Skip to content
Documentation

CHAMPREP QA commands

champrep qa works with CHAMPREP QA from your terminal: activate repositories, run scans and watch them finish, filter and triage findings, check a quality gate, start preview environments, and open cloud IDE workspaces. It acts as you, with your normal CLI sign-in. QA checks your role in the repository at its source (CHAMPREP Code, GitHub, GitLab or Bitbucket) on every call, and your plan’s allowances apply.

  1. Install the CLI and sign in with champrep auth login.
  2. Your plan must include CHAMPREP QA. Connect GitHub, GitLab or Bitbucket in the QA web app first if you use them; CHAMPREP Code repositories need no extra connection.

QA names a repository by its key, which champrep qa repos ls and champrep qa repos available print:

SourceKey
CHAMPREP Codecode:<project-uuid>
GitHubgithub:<id>
GitLabgitlab:<id>
Bitbucketbitbucket:<workspace>/<slug>

--workspace picks the QA workspace to act in: personal, organization:<id> or team:<id>. It decides which workspace’s repositories you see and which workspace a scan, an activation, a preview or an IDE workspace is charged to. Without it, QA uses your default workspace, as the web app does.

CommandPurpose
champrep qa repos lsList the workspace’s active repositories with their gate and last scan. --source code|github|gitlab|bitbucket, --gate passed|failed|not_scanned|scanning, --search, --all (also inactive), --limit (1-100).
champrep qa repos available --provider PList the repositories a source offers you and whether each is active.
champrep qa repos activate REPO...Start analysing up to 100 repositories. Each counts toward your repository allowance.
champrep qa repos deactivate REPO...Stop analysing repositories.
champrep qa repos sync --provider gitlab|bitbucketRead GitLab projects or Bitbucket repositories again from your connected account.
champrep qa repos sync code:<uuid>Refresh one CHAMPREP Code project’s default-branch head. GitHub repositories sync on their own.
CommandPurpose
champrep qa scan REPOStart a scan of the default branch, or --ref BRANCH. --watch (-w) follows it to the end; --timeout (default 30m) limits the wait; --profile picks a scan profile when your organization asks each time.
champrep qa scans lsList the scans you started, a repository’s (--repo REPO), or the workspace’s (--org). --run queued,running,held,passed,failed,canceled; --limit.
champrep qa scans show SCAN_IDShow a scan: branch, commit, run state, gate, new and fixed findings, minutes, any error or hold.

Scans of CHAMPREP Code and GitHub repositories run from the CLI. A scan is charged to you once. When CHAMPREP Code handles the request as its own CHAMPREP QA check, the CLI says so and you follow it with champrep qa scans ls --repo REPO.

CommandPurpose
champrep qa findings lsList findings, open ones by default. Filters below. --page, --limit (1-100).
champrep qa findings show FINDINGShow one finding by ID or QA number, such as QA-0970: severity, state, rule, CWE, location, snippet.
champrep qa findings dismiss FINDING --reason RDismiss a finding. --comment; --secret-revoked for secrets.
champrep qa findings reopen FINDINGUndo a dismissal, acceptance or resolution: the finding goes back to Needs triage.
FilterValues
--repo REPOOne repository; without it, the whole workspace.
--severitycritical, high, medium, low, info, unknown (comma separated)
--cweOne CWE, such as 79 or CWE-79
--branchFindings on this branch
--statedetected (Needs triage), confirmed, dismissed, accepted, resolved, or all. Default: detected,confirmed
--typesast, secret, iac, dependency
--searchText search, 3 characters or more
--mineFindings assigned to you

Dismissal reasons are false_positive, acceptable_risk, mitigating_control, used_in_tests and not_applicable. Dismissing needs the Maintainer role or above. Dismissing a secret also needs --secret-revoked: confirm the secret was revoked or was never valid.

CommandPurpose
champrep qa gates status REPOShow whether the repository passes its quality gate on the default branch or --branch, with each condition’s count and limit.

gates status exits with code 1 when the gate fails, so you can use it to guard a script or a deployment step.

CommandPurpose
champrep qa previews lsList your live previews. --ended, --org (the whole workspace), --repo REPO, --limit.
champrep qa previews show PREVIEW_IDShow a preview, its address and when it expires.
champrep qa previews createBuild and start a preview. Requires --provider and --repo owner/name; also --branch, --code-project ID, --port.
champrep qa previews extend PREVIEW_ID --minutes NKeep a preview running longer: 5 to 1440 minutes, up to its hard expiry.
champrep qa previews stop PREVIEW_IDStop a preview.

For CHAMPREP Code, --repo is the project path, such as acme/web.

CommandPurpose
champrep qa ide lsList your running IDE workspaces (--ended for past ones). --json leaves out each workspace’s idePath, which holds its session token.
champrep qa ide startStart a workspace on --provider and --repo owner/name (--branch, --work-branch, --code-project), or an empty one with --scratch.
champrep qa ide open SESSION_IDPrint the workspace’s address; --browser opens it.
champrep qa ide stop SESSION_IDStop a workspace. Changes not pushed are kept for recovery for a while.

ide open prints https://qa.champrep.com/workspaces/<id>. The address carries no credential: you sign in to CHAMPREP QA in the browser as usual.

Activate a CHAMPREP Code repository and scan it:

Terminal window
champrep qa repos available --provider code
champrep qa repos activate code:7d0c5c6e-0b6a-4e2b-9a55-0f8e6c1d2a10 --yes
champrep qa scan code:7d0c5c6e-0b6a-4e2b-9a55-0f8e6c1d2a10 --ref main --watch --yes

Review the most serious findings and dismiss a test fixture:

Terminal window
champrep qa findings ls --repo code:7d0c5c6e-0b6a-4e2b-9a55-0f8e6c1d2a10 --severity critical,high
champrep qa findings ls --cwe 89 --branch main
champrep qa findings show QA-0970
champrep qa findings dismiss QA-0970 --reason used_in_tests --comment "fixture key" --yes
champrep qa findings reopen QA-0970 --yes

Stop a deployment when the gate fails:

Terminal window
champrep qa gates status code:7d0c5c6e-0b6a-4e2b-9a55-0f8e6c1d2a10 --branch main \
&& ./deploy.sh

Preview a branch, then open an IDE on it:

Terminal window
champrep qa previews create --provider code --repo acme/web --branch feature/login --yes
champrep qa previews extend 6731c0ffee0000000000abcd --minutes 60 --yes
champrep qa ide start --provider code --repo acme/web --branch feature/login --yes
champrep qa ide open 6731c0ffee0000000000beef --browser

Commands that change something or spend your allowance ask first: repos activate and deactivate, scan, findings dismiss and reopen, previews create, extend and stop, and ide start and stop. Answer y on a terminal, or pass --yes (-y) in a script. Without a terminal and without --yes the command refuses and changes nothing. scan, previews create and ide start carry an idempotency key, so the CLI’s automatic retry after a network error never starts two.

Add --json to print what QA returned. The exit code stays the same with --json: scan --watch --json prints the finished scan and exits 1 when the scan or its gate fails, gates status --json exits 1 on a failing gate, and repos activate --json exits 1 when a repository was refused. IDE workspace answers are printed without idePath: it holds the workspace’s session token. Open a workspace with ide open instead.

Terminal window
champrep qa findings ls --severity critical --json | jq -r '.[] | "\(.qaId) \(.title)"'

scan --watch exits with code 1 when the scan fails or its gate fails.

MessageWhat to do
payment required … (REPOSITORY_ALLOWANCE_EXCEEDED)Your plan’s repository allowance is used. Deactivate a repository or add capacity in CHAMPREP Billing. Exit code 1.
not allowed for your role … (SOURCE_ROLE_REQUIRED), (SECURITY_MANAGE_REQUIRED), (ROLE_REQUIRED)Your role at the source or in the workspace does not allow it. Dismissing and accepting findings needs Maintainer or above.
needs your web session … (SESSION_REQUIRED), (IMPERSONATION_NOT_ALLOWED)Only you, signed in to the QA web app, can take this decision.
not available to your account …Your plan or organization policy does not include CHAMPREP QA or this feature.
http 422 … (QA_PROVIDER_NOT_SCANNABLE_YET)Scans of GitLab and Bitbucket repositories are not available yet.
not found … (REPO_NOT_FOUND), (SCAN_NOT_FOUND)The repository is not active in this workspace, or you cannot open it.

Every refusal above exits with code 1; a gateway rate limit exits 5. A refused repos activate prints each refused repository with its reason and exits 1; the others are still activated.