CLI & CI Reference · live
The sf CLI integrates Sovereign Frontier verification into development workflows, CI pipelines, and automated policy gates.
| Flag | Type | Description |
|---|---|---|
| --artifact <id> | string | Artifact ID in the form stage/name, e.g. hardened/ds-coder-v3. |
| --tier <tier> | string | Minimum required tier (ingress / processing / quarantine / hardened / sealed). Exits non-zero if artifact tier is below threshold. |
| --allow-quarantine | bool | Explicitly allow pulling Quarantine-tier artifacts. Prints a warning. Cannot be combined with --tier hardened. |
| --out <path> | path | Write artifact to this path. Defaults to ./sf-cache/. |
| --pin-tlog-head | bool | After pull, write the current signed tlog head to .sf-tlog-pin for subsequent offline verification. |
| --format <fmt> | json|text | Output format. JSON includes full structured attestation bundle; text is human-readable. |
Policy gates use a simple boolean expression language over artifact metadata fields. Expressions are evaluated server-side during sf pull and can also be embedded as YAML in CI config files.
| Policy preset | Expression | Enforcement |
|---|---|---|
| hardened-only | tier == "hardened" && ancestry.revocation_count == 0 | BLOCK on fail |
| no-scrutinized-origin | origin != "scrutinized" && origin != "interdicted" | BLOCK on fail |
| allow-quarantine-warn | tier != "interdicted" | WARN on fail |
| cleared-publisher-only | publisher.cleared == true && publisher.revoked == false | BLOCK on fail |
| no-unresolved-findings | findings.open_critical_count == 0 && findings.open_high_count == 0 | BLOCK on fail |
SF_API_URL and SF_API_TOKEN as repository secrets. The token should be scoped to read-only verify access — never use a publisher or admin token in CI.
Use sf verify --offline when network access is unavailable or undesirable. Requires a previously-pinned tlog head on disk.
sf sync --tlog-head-only runs (e.g. daily) to keep the pin fresh even in low-bandwidth environments.
| Code | Meaning |
|---|---|
| 0 | All checks passed. Artifact meets policy. |
| 1 | Policy check failed (tier below threshold, open findings, or ancestry revocations). |
| 2 | Artifact explicitly interdicted. Pull blocked unconditionally. |
| 3 | Signature verification failed. Artifact may have been tampered with. |
| 4 | Merkle inclusion proof invalid. tlog entry unverifiable. |
| 5 | Network/API error. Pass --offline to use pinned head. |