comp rules¶
NAME¶
phyware comp rules — manage PhyComp compliance rules.
SYNOPSIS¶
DESCRIPTION¶
list¶
Lists all compliance rules registered for the active tenant.
load-defaults¶
Loads the built-in industry-standard rule set (ISO 27001, SOC 2, GDPR relevant checks) into the tenant's rule catalogue. Safe to run multiple times (idempotent).
OPTIONS¶
| Flag | Type | Required | Default | Env |
|---|---|---|---|---|
--url | string | No | http://localhost:8001 | PHYCOMP_URL |
--api-key | string | No | — | PHYCOMP_API_KEY |
--output | enum | No | table | — |
| --tenant-id | string | No | (active) | — | | --category | string | No | — | — | | --limit | int | No | 20 | — |
ARGUMENTS¶
None.
INPUT¶
None.
OUTPUT¶
| Field | Type | Description |
|---|---|---|
id | string | Rule identifier |
name | string | Rule name |
category | string | Compliance category |
severity | string | critical/high/medium/low |
description | string | Rule description |
EXIT CODES¶
| Code | Meaning |
|---|---|
0 | Success |
1 | Generic / connection error |
2 | Authentication / authorisation error |
3 | Resource not found |
4 | Validation error |
5 | Server-side error |
EXAMPLES¶
# List all rules
phyware comp rules list
# List rules as JSON
phyware comp rules list --output json
# Load industry defaults
phyware comp rules load-defaults
# List rules filtered by category
phyware comp rules list --category gdpr
# List rules for a specific tenant
phyware comp rules list --tenant-id ten_abc123
AGENT NOTES¶
Call load-defaults once after comp register to populate the rule set. Use list --output json | jq to extract rule IDs for comp evaluate. Requires read:rules (list) or write:rules (load-defaults) scope.
SEE ALSO¶
ERRORS¶
| Code | Message | Remediation |
|---|---|---|
FORBIDDEN | Insufficient scope | Ensure write:rules |
NOT_FOUND | Tenant not found | Check --tenant-id |