Skip to content

fix(security): Judge Trivy-config DS-0002 in the task Dockerfile #6500

Not planned

Description

@github-actions

Trivy reports a misconfiguration that no issue names.

  • Rule: DS-0002
  • 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

Add or refresh a dated .trivyignore.yaml entry for the harbor task-template Dockerfile. Trivy reports HIGH DS-0002 there, and alert 288 is open. The file comes from the harbor package under .venv, so this repository does not maintain it. The entry needs a reason and an expiry. No person gate or outside block applies.

Acceptance criteria

Requirement: Harbor template ignore entry

The Trivy ignore configuration SHALL hold a current dated entry for the harbor task-template Dockerfile.

Scenario: Security check validates the harbor entry

  • WHEN uv run devops ci --check --only security runs
  • THEN the check exits 0 and reports no missing, invalid or expired entry for the harbor template Dockerfile.

Requirement: Alert 288 is closed

The repository MUST hold no open DS-0002 alert for the harbor template Dockerfile.

Scenario: Alert 288 state after the scan

  • WHEN gh api repos/dan-petty/devops-cli/code-scanning/alerts/288 --jq .state runs
  • THEN the command prints dismissed or fixed.

Existing Tool Considered

No alternatives check has run. Trivy is the open, maintained scanner that reports DS-0002 and reads .trivyignore.yaml. Trivy lacks a fix for third-party files under .venv; the change adds the dated ignore entry and no code.

Key questions

  • Which action resolves the DS-0002 alert?: Add or refresh a dated .trivyignore.yaml entry for the harbor task-template Dockerfile. The file is installed from the harbor package under .venv. A local edit would not survive an environment sync. The base spec already requires a dated ignore entry for this Dockerfile. (best practice) [sources: SECURITY.md, openspec/specs/trivy-config-alerts/spec.md, .trivyignore.yaml]
    • Rejected: Fix the file in .venv. The harbor package owns the file. The next environment sync overwrites a local edit.
    • Rejected: Dismiss alert 288 only. A GitHub dismissal leaves no repository record. The base spec requires a dated ignore entry.
    • Chosen: Add a dated .trivyignore.yaml entry. This is a judge option in SECURITY.md and the base spec requires it for this Dockerfile.
  • Which path pattern should the ignore entry use?: Use the glob **/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile. The glob covers the virtualenv path and the Python version. The exact .venv/lib/python3.14/... path would stop matching after a Python or environment change. (best practice) [sources: .trivyignore.yaml]
    • Rejected: Exact .venv path. The path changes with the Python version and the environment layout.
    • Chosen: Package-relative glob. The glob covers the installed harbor template across environments.
  • What expiry and statement should the entry carry?: Set expired_at to 90 days after the change merges. Set statement to: Third-party harbor task-template Dockerfile installed under .venv; devops-cli does not build or ship this image. The expiry forces a later review, and the statement records the reason. (best practice) [sources: SECURITY.md, .trivyignore.yaml]
    • Rejected: 30-day expiry. It causes avoidable churn for a third-party file.
    • Chosen: 90-day expiry. It bounds the suppression and matches a normal review cycle.
    • Rejected: No expiry. SECURITY.md requires a time-limited entry.
  • Does the change dismiss alert 288 manually?: Add the ignore entry first. The next IaC scan should close alert 288. If alert 288 stays open after that scan, dismiss it with the statement from the entry. (best practice) [sources: SECURITY.md, .trivyignore.yaml]
    • Rejected: Dismiss now. A dismissal before the scan can hide a missing or invalid ignore entry.
    • Chosen: Add the entry and let the scan close the alert; dismiss only if it remains open. The scan applies .trivyignore.yaml and stops reporting DS-0002.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @devops-cli-service
    Contributor
  4. changed the title [-]fix(security): judge Trivy-config DS-0002 in .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile[/-] [+]fix(security): Judge Trivy-config DS-0002 in the task Dockerfile[/+] on Nov 20, 2026
  5. devops-cli-service commented on Nov 20, 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-0002 in .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfile
    • After: fix(security): Judge Trivy-config DS-0002 in the task Dockerfile
    • Source of the summary: the background model
  6. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor

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

  7. dan-petty commented on Nov 29, 2026

    @dan-petty
    Owner

    Closing as not planned: #5790 closed Trivy-config alert 288 (DS-0002 under .venv, state: fixed) by skipping .venv.

  8. removed
    status/new
    on Nov 29, 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/p2-mediumscope/securitytype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions