Metadata-Version: 2.5
Name: hardn-cli
Version: 0.1.0
Summary: Command-line client for Hardn (hardn.si): run read-only security scans of sites you own from the terminal or CI.
Project-URL: Homepage, https://hardn.si
Project-URL: Documentation, https://hardn.si/developers#cli
Author: Infonex Pty Ltd
License: Proprietary
Keywords: ci,devsecops,hardn,scanner,security
Classifier: Environment :: Console
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# hardn-cli

Run Hardn's read-only security scans of sites you own from your terminal or CI, and fail the build when a scan
finds problems at or above the severity you choose. Python 3.9+, no dependencies.

## Install

```bash
pip install hardn-cli        # or: pipx install hardn-cli
hardn --version
```

## Use

Create an API key in Hardn (API keys → New key) and keep it as a secret.

```bash
export HARDN_API_KEY=hk_live_…
hardn targets                                   # your sites and their ids (tgt_…)
hardn scan --target tgt_… --fail-on high        # start a scan, wait, exit 1 on high or critical issues
hardn scan --target tgt_… --sarif hardn.sarif   # also write a SARIF report (GitHub code scanning)
hardn verify --target tgt_…                     # re-check ownership verification
```

Options: `--fail-on none|critical|high|medium|low|info` (default `high`), `--type public|deep`,
`--timeout <seconds>` (default 900), `--format text|json`, `--quiet`, `--api-url` (or `HARDN_API_URL`; default
`https://api.hardn.si`).

Exit codes: `0` passed, `1` issues at or above `--fail-on` (for `verify`: not verified), `2` the scan didn't
complete or timed out, or a usage or API error.

## In GitHub Actions

```yaml
- name: Hardn scan
  env:
    HARDN_API_KEY: ${{ secrets.HARDN_API_KEY }}
  run: |
    pip install hardn-cli
    hardn scan --target tgt_… --fail-on high --sarif hardn.sarif
```

Hardn only scans sites whose ownership you have verified. Docs: https://hardn.si/developers
