Repository navigation
Description
Trivy reports a misconfiguration that no issue names.
- Rule: DS-0029
- 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
Trivy reports DS-0029 at HIGH severity on the harbor task-template Dockerfile that harbor 0.26.0 installs into .venv (pyproject.toml:89). No commit of this repository holds the file, and uv sync replaces any edit, so the project judges the finding under SECURITY.md and records the judgement as a dated entry in .trivyignore.yaml. The entry of the first judgement (#5947) expired on 2026-11-19, and alert 281 is open again. This change renews the entry with the exact rule and path, a statement that names the reason and the tracking issues, and an expired_at within the agent limit of 3 days and 14 days of suppression in all.
Acceptance criteria
Requirement: Dated ignore entry for DS-0029
The repository MUST hold one misconfigurations entry of .trivyignore.yaml for the rule DS-0029 on the harbor task-template Dockerfile path, with a statement that names the harbor task-template Dockerfile, issue #5947 and this renewal #6748, and an expired_at date no more than 3 days after the entry.
Scenario: The IaC scan hides the finding
- WHEN a person runs
uv run devops scan report --scanner trivy-config --sarif .data/scan.sarif .on a checkout whereuv syncinstalled harbor 0.26.0 - THEN the SARIF document holds no result with rule
DS-0029at.venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile.
Requirement: The entry is time-limited
The ignore entry MUST carry an expired_at date, so that Trivy applies it only before that date and the finding returns to the scan on that date.
Scenario: The finding returns on the expiry date
- WHEN a person runs the live check
gh api 'repos/dan-petty/devops-cli/code-scanning/alerts?state=open&per_page=100' --jq '[.[] | select(.rule.id == "DS-0029") | .most_recent_instance.location.path]'on the entry'sexpired_atday, after the nextSecurity Scanof the default branch - THEN the output lists
.venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfileagain.
Requirement: The alert closes without a dismissal
The repository MUST record the judgement so that alert 281 reaches the state fixed with no dismissal after the next scan stops reporting the finding.
Scenario: The next scan fixes the alert
- WHEN a person runs the live check
gh api repos/dan-petty/devops-cli/code-scanning/alerts/281 --jq '.state, .dismissed_reason'after the firstSecurity Scanstep of CI on the default branch that follows the merge - THEN it prints
fixedandnull.
Existing Tool Considered
Trivy covers the need with its own filter: .trivyignore.yaml holds an id, a paths list, a statement and an expired_at date for a misconfiguration (.trivyignore.yaml:1, src/devops_cli/security/trivy.py:238), so the project writes no code. Trivy lacks a way to correct a file inside an installed package: the entry hides the finding only until its date, and the finding returns then. No alternatives check has run.
Key questions
- Does the alert close without a person when the scan stops reporting the finding?: Yes. A code scanning alert has the state
fixedand the timefixed_at, which GitHub records when an analysis of the branch reports no result for the finding, and the repository's own history says a scanner's findings close once fixed. No dismissal is needed. [sources: src/devops_cli/roadmap/project_review/catalog.yaml:147, src/devops_cli/roadmap/project_review/catalog.yaml:156, CHANGELOG.md:5031] - Which id and path must the entry name so that Trivy matches alert 281?: The id
DS-0029and the full path.venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile. The base spec names both for this finding, the ignore file already holds them, and the filer reads the id fromrule.idand the path frommost_recent_instance.location.pathof the alert. [sources: openspec/specs/trivy-config-alerts/spec.md:105, .trivyignore.yaml:32, .trivyignore.yaml:34, src/devops_cli/security/alert_filer.py:37, src/devops_cli/security/alert_filer.py:44] - Which file holds the entry, and which keys carry the rule, the path, the reason and the expiry?:
.trivyignore.yaml, undermisconfigurations:, withid,paths,statementandexpired_at.TrivyConfigScannerpasses that file totrivy configwith--ignorefilewhen it exists, so the entry takes effect. [sources: .trivyignore.yaml:1, .trivyignore.yaml:32, SECURITY.md:114, src/devops_cli/security/trivy.py:238, openspec/specs/trivy-config-alerts/spec.md:105] - Which action does the policy take for a Trivy-config finding in a file that the repository does not own?: Add a dated entry to
.trivyignore.yaml. The file is installed byuv syncfrom harbor 0.26.0, so no commit holds it and an upgrade replaces any edit; SECURITY.md:114 names the entry for a finding that the project cannot fix, and the base spec requires the entry for this exact path. (best practice) [sources: SECURITY.md:112, SECURITY.md:114, openspec/specs/trivy-config-alerts/spec.md:105, pyproject.toml:89]- Chosen: Dated entry in
.trivyignore.yaml. SECURITY.md:114 names the entry for a finding that the project cannot fix, the base spec at openspec/specs/trivy-config-alerts/spec.md:105 requires it for this path, and TrivyConfigScanner passes the file to Trivy with--ignorefile(src/devops_cli/security/trivy.py:238). - Rejected: Fix the Dockerfile. The path is under
.venv/lib/python3.14/site-packages/, installed from harbor 0.26.0 (pyproject.toml:89), so no commit holds it anduv syncreplaces an edit. - Rejected: Dismiss the alert with a reason. SECURITY.md:115 leaves a dismissal to a person, and it leaves no record in the repository, so the next scan reports the finding again.
- Rejected: Skip
.venvin the IaC scan. The base spec at openspec/specs/trivy-config-alerts/spec.md:105 records the dated entry for this path as the answer; a change of the scan scope is a separate item. - Rejected: Raise the harbor pin. No source in this repository shows a harbor release that fixes the template, the base spec records the entry for this path, and a pin bump is a separate item when such a release exists.
- Chosen: Dated entry in
- Which expiry period does the entry use?: The day of the entry plus 3 days. SECURITY.md:114 limits an agent to 3 days and to 14 days of suppression in all, and the base spec caps
expired_atat 3 days after the entry; a longer date is the owner's decision, and the statement names it. (best practice) [sources: SECURITY.md:110, SECURITY.md:114, openspec/specs/trivy-config-alerts/spec.md:105, .trivyignore.yaml:36]- Chosen: 3 days. It is the agent limit of SECURITY.md:114 and the cap of the base spec at openspec/specs/trivy-config-alerts/spec.md:105, and the renewed entries still hide the finding for no more than 14 days in all.
- Rejected: 14 days in one entry. The 14 days is the total that the renewals may hide the finding, not the length of one entry, and the first entry of fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #5947 already used 3 of them.
- Rejected: 90 days. SECURITY.md:114 reserves a longer date for the owner's decision named in the statement, and the base spec caps the agent's date at 3 days; this issue records no owner decision.
- Rejected: 365 days. It hides the finding for a year and has the same defect as 90 days: only the owner may set a date past the agent limit.
- Which tracking issue does the statement name?: Both fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #5947, the first judgement that the base spec requires, and fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #6748, this renewal. A reader of the renewed entry then finds the current judgement, and the entry still meets the spec. (best practice) [sources: SECURITY.md:114, openspec/specs/trivy-config-alerts/spec.md:105, .trivyignore.yaml:35]
- Chosen: Both fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #5947 and fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #6748. SECURITY.md:114 asks for the tracking issue, the base spec names fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #5947, and fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #6748 is the judgement that renews the entry.
- Rejected: fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #6748 only. It departs from the base spec at openspec/specs/trivy-config-alerts/spec.md:105, which names fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #5947.
- Rejected: fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #5947 only. A reader of the renewed entry would not find the current judgement.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 22, 2026
A live HIGH severity security misconfiguration in a Dockerfile qualifies as a high security vulnerability.Judge Trivy-config alert DS-0029 (alert 281) in the task-template Dockerfile by fixing the file, dismissing the alert, or adding a time-limited entry to .trivyignore.yamlas the change that both ask for.Same rule DS-0029, same path, same alert 281, same severity, and same acceptance criteria as issue 6605.A person closes one of the two if that is so.[-]fix(security): judge Trivy-config DS-0029 in .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile[/-][+]fix(security): Judge Trivy DS-0029 in the task-template Dockerfile[/+]devops-cli-service commentedon Nov 22, 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-0029 in .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfilefix(security): Judge Trivy DS-0029 in the task-template Dockerfiledevops-cli-service commentedon Nov 22, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
dan-petty commentedon Nov 23, 2026
Newer issue #6856 and PR #6907 replace this item. PR #6907 renewed the dated ignore entry for DS-0029 on the Harbor task-template Dockerfile in
.trivyignore.yaml. The finding is resolved.