Repository navigation
Description
Trivy reports a misconfiguration that no issue names.
- Rule: DS-0002
- Path: .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile
- Severity: HIGH
Open alerts:
Judge it under "Judging a Trivy-config Alert" in SECURITY.md: fix the file, dismiss the alert with a reason, or add a time-limited entry to .trivyignore.yaml. The owner judges a CRITICAL alert within 24 hours. An agent judges any other alert within 14 days.
Proposed design
Problem statement
Add or refresh a dated .trivyignore.yaml entry for the harbor task-template Dockerfile. Trivy reports HIGH DS-0002 there, and alert 288 is open. The file comes from the harbor package under .venv, so this repository does not maintain it. The entry needs a reason and an expiry. No person gate or outside block applies.
Acceptance criteria
Requirement: Harbor template ignore entry
The Trivy ignore configuration SHALL hold a current dated entry for the harbor task-template Dockerfile.
Scenario: Security check validates the harbor entry
- WHEN
uv run devops ci --check --only securityruns - THEN the check exits 0 and reports no missing, invalid or expired entry for the harbor template Dockerfile.
Requirement: Alert 288 is closed
The repository MUST hold no open DS-0002 alert for the harbor template Dockerfile.
Scenario: Alert 288 state after the scan
- WHEN
gh api repos/dan-petty/devops-cli/code-scanning/alerts/288 --jq .stateruns - THEN the command prints
dismissedorfixed.
Existing Tool Considered
No alternatives check has run. Trivy is the open, maintained scanner that reports DS-0002 and reads .trivyignore.yaml. Trivy lacks a fix for third-party files under .venv; the change adds the dated ignore entry and no code.
Key questions
- Which action resolves the DS-0002 alert?: Add or refresh a dated
.trivyignore.yamlentry for the harbor task-template Dockerfile. The file is installed from theharborpackage under.venv. A local edit would not survive an environment sync. The base spec already requires a dated ignore entry for this Dockerfile. (best practice) [sources: SECURITY.md, openspec/specs/trivy-config-alerts/spec.md, .trivyignore.yaml]- Rejected: Fix the file in
.venv. Theharborpackage owns the file. The next environment sync overwrites a local edit. - Rejected: Dismiss alert 288 only. A GitHub dismissal leaves no repository record. The base spec requires a dated ignore entry.
- Chosen: Add a dated
.trivyignore.yamlentry. This is a judge option in SECURITY.md and the base spec requires it for this Dockerfile.
- Rejected: Fix the file in
- Which path pattern should the ignore entry use?: Use the glob
**/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile. The glob covers the virtualenv path and the Python version. The exact.venv/lib/python3.14/...path would stop matching after a Python or environment change. (best practice) [sources: .trivyignore.yaml]- Rejected: Exact
.venvpath. The path changes with the Python version and the environment layout. - Chosen: Package-relative glob. The glob covers the installed harbor template across environments.
- Rejected: Exact
- What expiry and statement should the entry carry?: Set
expired_atto 90 days after the change merges. Setstatementto: Third-party harbor task-template Dockerfile installed under .venv; devops-cli does not build or ship this image. The expiry forces a later review, and the statement records the reason. (best practice) [sources: SECURITY.md, .trivyignore.yaml]- Rejected: 30-day expiry. It causes avoidable churn for a third-party file.
- Chosen: 90-day expiry. It bounds the suppression and matches a normal review cycle.
- Rejected: No expiry. SECURITY.md requires a time-limited entry.
- Does the change dismiss alert 288 manually?: Add the ignore entry first. The next IaC scan should close alert 288. If alert 288 stays open after that scan, dismiss it with the statement from the entry. (best practice) [sources: SECURITY.md, .trivyignore.yaml]
- Rejected: Dismiss now. A dismissal before the scan can hide a missing or invalid ignore entry.
- Chosen: Add the entry and let the scan close the alert; dismiss only if it remains open. The scan applies
.trivyignore.yamland stops reporting DS-0002.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 20, 2026
Both address Trivy config alerts in .venv files, but #5790 changes trivy to skip .venv entirely while the candidate judges one specific alert (DS-0002, alert 288).[-]fix(security): judge Trivy-config DS-0002 in .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile[/-][+]fix(security): Judge Trivy-config DS-0002 in the task Dockerfile[/+]devops-cli-service commentedon Nov 20, 2026
The job shortened the title of this item. The summary had 129 characters, and the limit is 60. The type and the scope stay.
fix(security): judge Trivy-config DS-0002 in .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfilefix(security): Judge Trivy-config DS-0002 in the task Dockerfiledevops-cli-service commentedon Nov 20, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
dan-petty commentedon Nov 29, 2026
Closing as not planned: #5790 closed Trivy-config alert 288 (DS-0002 under
.venv, state: fixed) by skipping.venv.