Skip to content

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

Closed

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 the Dockerfile rule DS-0029 at HIGH severity for a file that the harbor package installs into the local virtualenv. Alert 281 names the path .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile. No commit of the repository holds that file, so the project cannot correct it. The alert stays open until the repository records a judgment.

Acceptance criteria

Requirement: The ignore entry names the rule and the path

The .trivyignore.yaml file SHALL hold one misconfigurations entry that names the rule DS-0029 and the harbor template Dockerfile.

Scenario: The entry matches the alert

  • WHEN A test reads .trivyignore.yaml and selects the entry whose paths holds .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile.
  • THEN The test finds one entry, and its id ends with DS-0029.

Requirement: The entry states the cause and holds a date

The entry SHALL give a statement that names the cause and an expired_at date.

Scenario: The statement names the package and the date parses

  • WHEN A test reads the entry whose paths names the harbor template Dockerfile.
  • THEN The statement is not empty and holds harbor, and expired_at parses as an ISO 8601 date.

Requirement: The entry is narrow and the other entries stay

The change SHALL keep each entry of the base file and SHALL put no wildcard in the path of the new entry.

Scenario: The new entry adds no broad rule

  • WHEN A test compares .trivyignore.yaml with the file at the base commit.
  • THEN Each base entry is still present, and the paths of each DS-0029 entry holds one path with no *.

Existing Tool Considered

No alternatives check has run. Trivy covers the need with its own ignore file: a misconfigurations entry in .trivyignore.yaml takes id, paths, statement and expired_at, so the project writes no code. Trivy lacks a way to correct a file that a dependency installs. The entry suppresses the alert only until its expired_at date. A reinstall of the harbor package writes the file again.

Key questions

  • Where does the flagged Dockerfile come from?: The path is under .venv/lib/python3.14/site-packages/, the install tree of the local virtualenv. The harbor package ships the file. The code of this repository lives under src/devops_cli, so no commit holds the flagged file, and a reinstall writes it again. [sources: SECURITY.md, CONTEXT.md]
  • Which judgment does SECURITY.md require for a HIGH config alert on a file that the project does not hold?: Add one time-limited entry to .trivyignore.yaml. Scope it to the rule and the one path, and give it a statement and an expired_at date. The scan then reports no DS-0029 for that path, and the entry expires by itself. (best practice) [sources: SECURITY.md, openspec/specs/trivy-config-alerts/spec.md]
    • Chosen: Add a dated .trivyignore.yaml entry. The file is not the code of the project, and SECURITY.md names the ignore file with an expiry as one judgment. The entry is in the repository, so a review reads it.
    • Rejected: Correct the Dockerfile in the virtualenv. The harbor package installs the file. A reinstall or a version bump writes the file again.
    • Rejected: Dismiss alert 281 on GitHub with a reason. The reason lives on the host, and no commit records the judgment. The next scan of the path reports the alert again.
    • Rejected: Skip .venv in the IaC scan. The item names no scan configuration, so this change cannot show the file that sets the scope of the scan. A later item can narrow the scan and then drop the entry.
  • Which rule ID form does the entry name?: Use the form that the existing misconfigurations entries of .trivyignore.yaml use. Trivy reports a Dockerfile check as AVD-DS-0029, and the alert names the short form DS-0029. Each form ends with DS-0029. (best practice) [sources: .trivyignore.yaml]
    • Chosen: Use the form of the existing entries. One file holds one ID form, and the scan matches the ID that it reports.
    • Rejected: Use DS-0029 alone. The file then holds two ID forms, and a reader cannot tell which form the scan matches.
  • Which expiry date does the entry take?: The day of the entry plus 3 days, as SECURITY.md sets for an ignore entry. A renewal keeps the entry and its renewals within 14 days in all. A later fix of the path then removes the entry. (best practice) [sources: SECURITY.md]
    • Chosen: 3 days, then a renewal. SECURITY.md gives this date for a new ignore entry and caps the entry and its renewals at 14 days in all.
    • Rejected: 14 days in one entry. The document gives 14 days as the cap on the renewals, not as the date of a first entry.
    • Rejected: No expiry date. SECURITY.md requires a date, and an entry with no date hides the alert for good.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @devops-cli-service
    Contributor
    • Priority: P1-High. A live HIGH severity security misconfiguration alert that must be judged within 14 days.
    • Possible duplicate: fix(security): trivy config skips .venv, node_modules and tests/fixtures #5790, which may ask for the same change. The model names Judge Trivy-config DS-0029 in the task-template environment Dockerfile: fix the file, dismiss alert 281, or add a time-limited entry to .trivyignore.yaml as the change that both ask for. Same rule DS-0029, same file path, same alert 281, and identical body text as item 5790. A person closes one of the two if that is so.
  4. added
    priority/p1-high
    on Nov 16, 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 16, 2026
  6. devops-cli-service commented on Nov 16, 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 16, 2026

    @devops-cli-service
    Contributor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

  8. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 16, 2026
  9. removed
    status/in-review
    on Nov 16, 2026
  10. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-16 14:50 UTC

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