Aribot CLI
Threat modelling checks for every code change, from your terminal, pre-commit hook or CI pipeline.
pipx install aribot-cliaribot asks the Aribot server for a decision on your change. You get the threats, requirements and findings that touch the lines you changed, each with its fix, and a gate result your pipeline can act on. Only file paths and changed line ranges leave your machine. File contents never do.
Install
pipx install aribot-cli # or: pip install aribot-cli
aribot --versionRequires Python 3.9 or later.
Sign in
Create an API key in Aribot under Company Admin > Developer & API, then:
aribot login # prompts for the key (hidden) and stores it in the OS keychain
aribot auth status # shows the host and the key's last four characters
aribot logout # removes the stored keyIn CI, set the key as a secret environment variable:
export ARIBOT_API_KEY=... # takes precedence over the keychainThe key is never accepted as a command-line argument, never written to a plain file and never printed. To stop a key working, revoke it in Aribot.
| Variable | Purpose |
|---|---|
ARIBOT_API_KEY | API key for CI pipelines |
ARIBOT_API | API host, https only (default https://aribot.ayurak.com) |
ARIBOT_TOKEN | JWT access token, for owner and security-manager actions such as signing rules |
ARIBOT_CA_BUNDLE | Extra CA certificate file for a self-hosted server with a private CA |
ARIBOT_GATE_CONFIG | Gate configuration id for aribot check |
Check a change
aribot check --gate-config 12 # git diff against the base branch
aribot check --gate-config 12 --staged # staged changes only
aribot check --gate-config 12 --sarif out.sarif # also write SARIF 2.1.0 for code scanning
aribot --json check --gate-config 12 # machine-readable decision
aribot explain src/orders/views.py:42 # requirements, threats, findings and fix steps
aribot explain src/orders/views.py --apply-patch # asks before writing the suggested patch
aribot gate status --pr 7 # latest gate decision for a pull requestExit codes for aribot check:
| Code | Meaning |
|---|---|
| 0 | Allow (or warn, without --strict) |
| 1 | Block |
| 2 | Warn, with --strict |
| 3 | Configuration, sign-in, git or API error |
Pre-commit hook
Warn only. Add args: [--strict] to stop commits on warnings.
- repo: https://github.com/Aristiun/aribot-cli
rev: v3.0.0
hooks:
- id: aribot-checkScans and traceability
aribot scan ./src --diagram <diagram-uuid> --wait # upload local source and scan it
aribot verify <scan_id> --trigger --wait # verify every threat in the diagram against the code
aribot traceability <scan_id> # architecture, code and compliance matrixScans, uploads and rule management change data, so they need a signed-in user's access token (ARIBOT_TOKEN). API keys can run checks (check, explain, gate status) and read results.
Signed rule sets
aribot keys init # Ed25519 key at ~/.config/aribot/signing_key (mode 600)
aribot rules list
aribot rules import rules.json
aribot rules dry-run 3 --gate-config 12
aribot rules sign 3
aribot rules bind 3 4The private key never leaves your machine. Only the public key and signatures are sent.
Security
- HTTPS only; plain http is accepted for
localhostalone. - TLS is always verified. There is no option to switch it off.
- Redirects are not followed, so the key is never sent to another host.
- Only read requests are retried, honouring
Retry-After. Uploads and AI work never run twice. - Errors are typed: a missing licence (HTTP 402) tells you which feature to enable.
Report a vulnerability to security@ayurak.com.