Skip to content

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

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

Judge the Trivy-config alert DS-0029 and stop it from returning. The alert names a Dockerfile under .venv/lib/python3.14/site-packages/harbor/, which is data of the installed harbor package and no file of this repository. The fix keeps the virtualenv out of the Trivy configuration scan, so the finding closes and no compensating code is written.

Acceptance criteria

Requirement: The Trivy configuration scan skips the virtualenv

The Trivy configuration scan SHALL skip the .venv directory of the checkout.

Scenario: The workflow check passes

  • WHEN uv run devops ci --check --only actionlint,zizmor runs on the pull request that changes the Trivy scan configuration
  • THEN The check exits 0 and reports no finding on the changed workflow.

Requirement: Pending a person after the merge: alert 281 closes as fixed

The next Trivy configuration scan on main MUST report no result for the .venv Dockerfile, so that alert 281 closes as fixed.

Scenario: Alert state after the next scan

  • WHEN devops gh api repos/dan-petty/devops-cli/code-scanning/alerts/281 --jq .state runs after the next scan on main
  • THEN The command prints fixed.

Requirement: Pending a person after the merge: no open alert holds a virtualenv path

The code-scanning alerts MUST hold no open result whose path is under .venv/.

Scenario: Open alerts after the next scan

  • WHEN devops gh api 'repos/dan-petty/devops-cli/code-scanning/alerts?state=open&per_page=100' --jq '[.[] | select(.most_recent_instance.location.path | startswith(".venv/"))] | length' runs after the next scan on main
  • THEN The command prints 0.

Existing Tool Considered

No alternatives check has run. Trivy, which the project already runs, covers the need: its --skip-dirs option keeps a directory out of the configuration scan. The proposal adds no code and no new tool. It sets that option in the existing scan, and a new alert opens if the scan reads the virtualenv again.

Key questions

  • Which procedure of the project judges this alert?: The section "Judging a Trivy-config Alert" of SECURITY.md. It allows three outcomes: fix the file, dismiss the alert with a reason, or add a time-limited entry to .trivyignore.yaml. [sources: SECURITY.md]
  • Which outcome judges DS-0029 at the .venv path?: Keep the scan from reading .venv. The path is data of the installed harbor package, so no file of the repository holds the defect. The scan change stops the finding for every rule, and the next scan closes alert 281. (best practice) [sources: SECURITY.md]
    • Rejected: Fix the Dockerfile. The file is data of the installed harbor package under .venv. The repository tracks it not, and each install writes it again.
    • Rejected: Add a time-limited .trivyignore.yaml entry. The entry hides one rule at one path and needs a renewal. The scan still reads package data, so the cause stays.
    • Chosen: Skip .venv in the Trivy configuration scan. The scan stops reading package data for every rule. The next scan closes alert 281, and a new alert opens if the scan reads the virtualenv again.
  • Which paths does the exclusion cover?: .venv only. The scan keeps every tracked file, and the exclusion names no other directory. (best practice) [sources: SECURITY.md]
    • Chosen: .venv only. The alert names a path under .venv. A wider exclusion would hide findings in tracked files.
    • Rejected: Every dependency directory, such as .venv and node_modules. No alert names node_modules, and a wider exclusion hides more than the issue shows.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @devops-cli-service
    Contributor
    • Priority: A live HIGH-severity security misconfiguration that must be judged within 14 days.
    • Possible duplicate: fix(security): Judge Trivy-config DS-0029 in the Dockerfile #7393, which may ask for the same change. The model names Judge Trivy-config DS-0029 in the task-template environment 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. Same rule DS-0029, same Dockerfile path, same alert 281, and identical acceptance criteria as issue 7393. A person closes one of the two if that is so.
  4. added
    priority/p1-high
    on Nov 28, 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 28, 2026
  6. devops-cli-service commented on Nov 28, 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 28, 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
    and removed
    status/new
    on Nov 28, 2026
  9. added
    status/in-review
    and removed
    status/in-progress
    on Nov 28, 2026
  10. removed
    status/in-review
    owner/agent
    on Nov 28, 2026
  11. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-28 17:56 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