Repository navigation
Description
Problem Description
format_network_references_table (src/devops_cli/output/formatters/tables.py) colors a network reference red when its status holds the text RISK. The status "✓ Safe / Low Risk" holds that text, so a safe reference shows in red, the color of a flagged one. The review report (review/report.py) does not do this: it colors only the status with the warning sign red.
Reproduction Steps
- Run
uv run python -c "from devops_cli.models.vulnerability import NetworkReference; from devops_cli.output.formatters.tables import format_network_references_table as f; print(f([NetworkReference(target='https://safe-corp.com', security_status='✓ Safe / Low Risk')]).rows[0][3])".
Expected vs Actual Behavior
Expected: [green]✓ Safe / Low Risk[/green].
Actual: [red]✓ Safe / Low Risk[/red].
Environment Diagnostics
devops-cli 0.16.0, Linux, Python 3.14. The probe made no network request.
Logs, Traces, or Terminal Output
[red]✓ Safe / Low Risk[/red]
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate.
Source: found while working on #2504.
Proposed design
Problem statement
The network references table colors a safe low-risk reference red. The status text "✓ Safe / Low Risk" holds the substring "RISK", so the condition on line 214 of tables.py matches it and assigns the red color. The review report in reference_extractor.py already handles this case by excluding "LOW" from the RISK check. The table formatter is missing that exclusion.
Acceptance criteria
Requirement: Safe low-risk status is green
A network reference whose security_status holds the text "Low Risk" SHALL be colored green.
Scenario: Safe low-risk reference renders green
- WHEN A NetworkReference has security_status of "✓ Safe / Low Risk"
- THEN The status cell in the table row is wrapped in [green]...[/green] markup
Requirement: Flagged status is red
A network reference whose security_status holds "
Scenario: High-risk reference renders red
- WHEN A NetworkReference has security_status of "
⚠️ High Risk Detected" - THEN The status cell in the table row is wrapped in [red]...[/red] markup
Requirement: Unchecked status is yellow
A network reference whose security_status holds "UNCHECKED" and does not hold a red trigger SHALL be colored yellow.
Scenario: Unchecked reference renders yellow
- WHEN A NetworkReference has security_status of "Unchecked"
- THEN The status cell in the table row is wrapped in [yellow]...[/yellow] markup
Existing Tool Considered
No external tool or library covers this need. The fix is a one-line change to a string condition in the project's own code. The written cost is the tokens to edit one condition, add one test case, and verify the output, plus the elapsed time of one pull request cycle.
Key questions
- What condition should trigger the red color for a network reference status?: Use the same pattern as reference_extractor.py line 609: red when the status holds "
⚠️ ", or holds "RISK" and does not hold "LOW", or holds "MALICIOUS". This excludes "Low Risk" from the red trigger while keeping "High Risk" and "⚠️ " statuses red. (best practice) [sources: src/devops_cli/security/reference_extractor.py:609, src/devops_cli/output/formatters/tables.py:214]- Chosen: Exclude "LOW" from the RISK check. Matches the existing pattern in reference_extractor.py:609. Keeps "High Risk" red and makes "Low Risk" green.
- Rejected: Check only for "
⚠️ " as the red trigger. The issue mentions the review report colors only the warning sign red. But this would leave "MALICIOUS" and "High Risk" without the warning sign uncolored red, losing information. - Rejected: Use a structured severity field instead of string matching. A larger refactor. The NetworkReference model does not expose a severity enum. The string-based approach is the existing convention in this codebase.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Oct 29, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
The table formatter incorrectly colors a safe status red because it matches the substring RISK.It misleads users about security status but does not corrupt data or expose a vulnerability.A user reading the table may believe a safe reference is flagged, causing confusion and wasted triage.The fix is a one-line condition change in format_network_references_table to match the warning sign instead of the word RISK.Both deal with NetworkReference.security_status and the 'safe' concept, but #2636 fixes model defaults while this fixes the table color logic.devops-cli-service commentedon Oct 30, 2026
Status set to Ready at 0b7e190 (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
Staged: branch
fix/2646-the-network-table-colors-a-safe, draft pull request #3150. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
docs(openspec): fix the plan for #2646
docs(openspec): fix two sentences of the plan for #2646
docs(openspec): plan #2646 fix network table low-risk color (#3150)
10 remaining items
devops-cli-service commentedon Nov 3, 2026
Cleared the stop at group 1 by the rule
digest: the runner image changed since the stop, from sha256:ef0d0ace3359daaf57e2bb1904dd131a16eca5fd52c54ffdcfeb5cf25f2c41f8 to sha256:71484cc064d6ab241bf53e6464dad843cc76f71025f0e46dc59adee51ae9b14f. The item is Planned again, and the Service takes it in the next round. The Service clears a stop one time for each runner image. A new stop on this image waits for a commentimplement: retry.devops-cli-service commentedon Nov 4, 2026
Pull request #3442 is ready for review. The checks passed.
Spend: 54 model requests, 2878517 input tokens, 9265 output tokens.
devops-cli-service commentedon Nov 4, 2026
The runner Job devops-cli-runner-20261104-082834-0aee ended: succeeded.
Image digest: sha256:68ba10ea2a5e3536c67a726812a8aaac645a24539797eb2a7cf907c8762cdf68
The last lines of its log:
test(output): parametrize the network table color cases (#2646)
devops-cli-service commentedon Nov 4, 2026
Released in v0.55.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.55.2
devops-cli-service commentedon Nov 4, 2026
Live since 2026-11-04 14:17 UTC