comp violations¶
NAME¶
phyware comp violations — list and inspect compliance violations.
SYNOPSIS¶
DESCRIPTION¶
list¶
Returns violations detected during compliance evaluations, with optional filters by severity, rule, and date range.
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) | — | | --severity | enum | No | — | — | | --rule-id | string | No | — | — | | --from | string | No | — | — | | --to | string | No | — | — | | --limit | int | No | 20 | — |
ARGUMENTS¶
None.
INPUT¶
None.
OUTPUT¶
| Field | Type | Description |
|---|---|---|
id | string | Violation identifier |
rule_id | string | Triggering rule |
severity | string | critical/high/medium/low |
status | string | open / acknowledged |
detected | string | ISO 8601 timestamp |
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 violations
phyware comp violations list
# List critical violations
phyware comp violations list --severity critical
# List violations as JSON
phyware comp violations list --output json
# List violations for a date range
phyware comp violations list --from 2024-01-01 --to 2024-01-31
# Count open violations
phyware comp violations list --output tsv | wc -l
AGENT NOTES¶
After calling comp evaluate, poll violations list to check for new findings. Filter by --severity critical to prioritise alerts. Use --output json for machine consumption. Requires read:violations scope.
SEE ALSO¶
ERRORS¶
| Code | Message | Remediation |
|---|---|---|
FORBIDDEN | Insufficient scope | Ensure read:violations |
NOT_FOUND | Tenant not found | Check --tenant-id |