Skip to content

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

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 inside the virtualenv. The repository cannot change that third-party file. Add a time-limited ignore entry to .trivyignore.yaml with a reason and an expiry date. The next Trivy config scan then closes alert 281.

Acceptance criteria

Requirement: DS-0029 harbor template ignore entry

The .trivyignore.yaml file MUST hold a misconfiguration entry for rule DS-0029 with the harbor task-template Dockerfile path, a statement, and an expired_at date in YYYY-MM-DD format.

Scenario: Trivy config scan ignores the harbor template Dockerfile

  • WHEN A person runs trivy config --ignorefile .trivyignore.yaml --severity HIGH,CRITICAL --exit-code 1 .
  • THEN The command exits 0 and reports no DS-0029 finding for a path that ends with harbor/cli/template-adapter/task-template/environment/Dockerfile.

Requirement: Expired DS-0029 ignore entry

The ignore entry MUST stop hiding DS-0029 after its expired_at date.

Scenario: An expired entry reports the finding again

  • WHEN A person sets the entry's expired_at to a past date and runs trivy config --ignorefile .trivyignore.yaml --severity HIGH,CRITICAL --exit-code 1 .
  • THEN The command exits 1 and reports DS-0029 for the harbor task-template Dockerfile.

Existing Tool Considered

No alternatives check has run. Trivy is the open, maintained tool that covers the need. Its .trivyignore.yaml supports a misconfigurations entry with paths, statement and expired_at. It lacks nothing for this need. The repository already uses Trivy for config scans, so no custom code is needed.

Key questions

  • How should the repository judge the DS-0029 alert on the harbor task-template Dockerfile?: Add a time-limited entry to .trivyignore.yaml. The file is in the virtualenv and belongs to the harbor package, so the repository cannot fix it. The entry keeps the scan result stable until an upstream fix is available. (best practice) [sources: SECURITY.md, openspec/specs/trivy-config-alerts/spec.md]
    • Rejected: Fix the harbor template Dockerfile. The file is inside .venv and is not source of this repository.
    • Rejected: Dismiss alert 281 with a reason. A manual dismissal does not stop the next Trivy scan from reporting the same finding.
    • Chosen: Add a time-limited ignore entry. The policy allows a dated ignore entry, and Trivy supports it in .trivyignore.yaml.
  • Which expiry date should the ignore entry use?: Use the same expiry duration as the existing dated entries in .trivyignore.yaml. If no dated entry exists, set expired_at to 90 days after the merge date. (best practice) [sources: .trivyignore.yaml]
    • Chosen: Copy the existing expiry duration. The file already holds dated entries, so the new entry follows the same convention.
    • Rejected: Use no expiry. The policy requires a time-limited entry.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @devops-cli-service
    Contributor
    • Priority: P1-High. HIGH severity security misconfiguration with a 14-day judgment deadline.
    • Possible duplicate: fix(security): Judge Trivy DS-0029 in the task-template Dockerfile #6501, which may ask for the same change. The model names Judge Trivy-config DS-0029 alert 281 in the task-template environment Dockerfile as the change that both ask for. Same rule DS-0029, same file path, same alert 281, and identical acceptance criteria. A person closes one of the two if that is so.
  4. added
    priority/p1-high
    on Nov 21, 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 21, 2026
  6. devops-cli-service commented on Nov 21, 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 21, 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/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions