Skip to content

fix(security): Judge Trivy-config DS-0029 in the Dockerfile #6856

Done

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 as a HIGH misconfiguration in the harbor template Dockerfile under .venv. The file comes from the installed harbor package, not from this repository, so a local fix is overwritten. The project needs a recorded, time-limited suppression for this path. Alert 281 tracks the finding.

Acceptance criteria

Requirement: Harbor template Dockerfile ignore entry

The .trivyignore.yaml file SHALL hold a path-specific, dated ignore entry for rule DS-0029 on the harbor template Dockerfile.

Scenario: IaC scan accepts the dated ignore entry

  • WHEN The IaC scan runs with trivy config --ignorefile .trivyignore.yaml --format json .
  • THEN The JSON output holds no DS-0029 result for .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile.

Existing Tool Considered

No alternatives check has run. Trivy is the open, maintained tool that covers the need: it reports DS-0029, and its .trivyignore.yaml file records the dated suppression. The change builds no code, so it has no build cost.

Key questions

  • Which rule and path does alert 281 name?: Rule DS-0029 on .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile. [sources: openspec/specs/trivy-config-alerts/spec.md]
  • Which file holds a dated Trivy-config suppression?: The repository root file .trivyignore.yaml. The IaC scan reads it and enforces the expiry. [sources: .trivyignore.yaml, openspec/specs/trivy-config-alerts/spec.md]
  • How should the project judge the DS-0029 alert?: Add a path-specific, dated ignore entry to .trivyignore.yaml. Do not edit the file under .venv, because the harbor package owns it and an install overwrites the edit. Do not dismiss the alert only in GitHub, because the repository then holds no reason or expiry. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md, SECURITY.md, openspec/specs/trivy-config-alerts/spec.md]
    • Rejected: Fix the vendored Dockerfile. The path is under .venv site-packages; a package install overwrites the edit, and the fix belongs to harbor.
    • Rejected: Dismiss the alert in GitHub only. The repository records no reason or expiry, and the next scan can reopen the alert.
    • Chosen: Add a path-specific dated ignore entry. ADR 0005 accepts a suppression with a reason and an expiry, and the IaC scan reads .trivyignore.yaml.
  • What scope should the ignore entry use?: Use the misconfigurations list with id DS-0029 and paths set to the exact harbor template Dockerfile. A rule-only ignore would hide DS-0029 in every file. (best practice) [sources: .trivyignore.yaml]
    • Rejected: Rule-only ignore. It hides DS-0029 in every Dockerfile and hides a real defect.
    • Chosen: Path-specific ignore. It suppresses only the vendored harbor template and keeps the rule active for project files.
  • What expiry should the ignore entry have?: Set expired_at to 90 days after the merge date. The entry then forces a new judgment each quarter and gives harbor time for an upstream fix. (best practice) [sources: .trivyignore.yaml, SECURITY.md]
    • Rejected: 30 days. Too short for an upstream harbor release and a dependency update.
    • Chosen: 90 days. It gives harbor time for an upstream fix and still forces a quarterly judgment.
    • Rejected: 180 days. Too long for a HIGH alert and hides a stale suppression.
  • What reason should the ignore entry state?: State that the file is the harbor package template under .venv, that this repository does not own it, and that the entry expires after 90 days pending an upstream fix. (best practice) [sources: SECURITY.md, docs/adr/0005-review-findings-come-from-tools-not-models.md]
    • Rejected: State only the alert number. A reader cannot tell why the project suppresses the rule or when to remove the entry.
    • Chosen: State the vendored path and the upstream owner. The reason explains the false positive and the expiry gives the date to revisit it.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/security
    on Nov 23, 2026
  2. added
    status/new
    value/medium
    effort/low
    on Nov 23, 2026
  3. devops-cli-service commented on Nov 23, 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 #6748, which may ask for the same change. The model names Judge Trivy-config DS-0029 in the task-template Dockerfile (alert 281): fix the file, dismiss the alert, or add a time-limited entry to .trivyignore.yaml as the change that both ask for. Both items ask to judge the same Trivy rule DS-0029 on the same file and the same alert 281, with identical acceptance criteria. A person closes one of the two if that is so.
  4. added
    priority/p1-high
    on Nov 23, 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-config DS-0029 in the Dockerfile[/+] on Nov 23, 2026
  6. devops-cli-service commented on Nov 23, 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-config DS-0029 in the Dockerfile
    • Source of the summary: the background model
  7. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    Contributor

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

  8. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 23, 2026
  9. removed
    status/in-review
    owner/agent
    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