Skip to content

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

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 alert 281 reports DS-0029 in a Dockerfile under .venv/lib/python3.14/site-packages/harbor/. The file is a template of the installed harbor package, not a tracked Dockerfile of this repository. The Trivy config scan includes the virtualenv and reports a false positive. The change makes the scan skip .venv, which removes the finding at its cause and closes the alert after the next scan.

Acceptance criteria

Requirement: The Trivy config scan skips the virtualenv

The Trivy config scan workflow MUST pass --skip-dirs .venv to Trivy.

Scenario: The workflow validator accepts the change

  • WHEN uv run devops ci --check --only actionlint,zizmor runs on the pull request
  • THEN the command exits 0 and reports no workflow error.

Requirement: Pending a person after the merge

A person MUST merge the pull request, and the next Trivy config scan on main MUST close alert 281.

Scenario: The post-merge scan

  • WHEN the pull request checks pass and a person merges it
  • THEN the next Trivy config scan runs on main and alert 281 is closed.

Existing Tool Considered

No alternatives check has run. Trivy (aquasecurity/trivy) covers the need: its config scan supports --skip-dirs .venv and already produces the alert. It lacks a default exclusion for a local virtualenv, so the proposal passes --skip-dirs .venv in the existing scan. The change builds no code.

Key questions

  • Should the scan skip .venv, or should the project add a .trivyignore.yaml entry for DS-0029?: Skip .venv in the Trivy config scan. The Dockerfile is a template in the installed harbor package, not a tracked Dockerfile of this repository. A path ignore would be version-specific and would hide a future real finding. (best practice) [sources: SECURITY.md, AGENTS.md]
    • Chosen: Skip .venv in the Trivy config scan. Removes the false positive at its cause and keeps the scan on tracked files.
    • Rejected: Add a .trivyignore.yaml entry for DS-0029. The path is version-specific and the entry hides the rule for that path until it expires.
    • Rejected: Dismiss alert 281 only. The next scan reports the same finding again.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @devops-cli-service
    Contributor
    • Priority: A HIGH severity security misconfiguration is open and must be judged within 14 days.
  4. added
    priority/p1-high
    on Nov 26, 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 26, 2026
  6. devops-cli-service commented on Nov 26, 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
    • Source of the summary: the background model
  7. devops-cli-service commented on Nov 26, 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 28, 2026

    @dan-petty
    Owner

    Closing as a duplicate of #7559 (Alert 281, DS-0029 on .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile). PR #7570 skips .venv and **/.venv in TrivyConfigScanner and removes the obsolete .venv/ .trivyignore.yaml entries.

  9. removed
    status/new
    on Nov 28, 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