Skip to content

fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #6748

Not planned

Description

@github-actions

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 where uv sync installed harbor 0.26.0
  • THEN the SARIF document holds no result with rule DS-0029 at .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's expired_at day, after the next Security Scan of the default branch
  • THEN the output lists .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile again.

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 first Security Scan step of CI on the default branch that follows the merge
  • THEN it prints fixed and null.

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 fixed and the time fixed_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-0029 and 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 from rule.id and the path from most_recent_instance.location.path of 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, under misconfigurations:, with id, paths, statement and expired_at. TrivyConfigScanner passes that file to trivy config with --ignorefile when 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 by uv sync from 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 and uv sync replaces 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 .venv in 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.
  • 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_at at 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]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/security
    on Nov 22, 2026
  2. added
    status/new
    effort/low
    value/high
    on Nov 22, 2026
  3. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor
    • Priority: P1-High. A live HIGH severity security misconfiguration in a Dockerfile qualifies as a high security vulnerability.
    • Possible duplicate: fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #6605, which may ask for the same change. The model names 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.yaml as 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.
  4. added
    priority/p1-high
    on Nov 22, 2026
  5. changed the title [-]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[/+] on Nov 22, 2026
  6. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    The job shortened the title of this item. The summary had 129 characters, and the limit is 60. The type and the scope stay.

    • Before: fix(security): judge Trivy-config DS-0029 in .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile
    • After: fix(security): Judge Trivy DS-0029 in the task-template Dockerfile
    • Source of the summary: the background model
  7. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  8. dan-petty commented on Nov 23, 2026

    @dan-petty
    Owner

    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.

  9. removed
    status/new
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p1-highscope/securitytype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions