AribotDevelopers Sign in

Aribot CLI

Threat modelling checks for every code change, from your terminal, pre-commit hook or CI pipeline.

pipx install aribot-cli

aribot 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

bash
pipx install aribot-cli      # or: pip install aribot-cli
aribot --version

Requires Python 3.9 or later.

Sign in

Create an API key in Aribot under Company Admin > Developer & API, then:

bash
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 key

In CI, set the key as a secret environment variable:

bash
export ARIBOT_API_KEY=...    # takes precedence over the keychain

The 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.

VariablePurpose
ARIBOT_API_KEYAPI key for CI pipelines
ARIBOT_APIAPI host, https only (default https://aribot.ayurak.com)
ARIBOT_TOKENJWT access token, for owner and security-manager actions such as signing rules
ARIBOT_CA_BUNDLEExtra CA certificate file for a self-hosted server with a private CA
ARIBOT_GATE_CONFIGGate configuration id for aribot check

Check a change

bash
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 request

Exit codes for aribot check:

CodeMeaning
0Allow (or warn, without --strict)
1Block
2Warn, with --strict
3Configuration, sign-in, git or API error

Pre-commit hook

Warn only. Add args: [--strict] to stop commits on warnings.

yaml
- repo: https://github.com/Aristiun/aribot-cli
  rev: v3.0.0
  hooks:
    - id: aribot-check

Scans and traceability

bash
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 matrix

Scans, 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

bash
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 4

The private key never leaves your machine. Only the public key and signatures are sent.

Security

Report a vulnerability to security@ayurak.com.