Skip to content

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

Done

Description

@github-actions

Trivy reports a misconfiguration that no issue names.

  • Rule: DS-0002
  • Path: .venv/lib/python3.14/site-packages/harbor/cli/template-task/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-0002 at HIGH severity for the harbor template Dockerfile under .venv. The file belongs to the installed harbor package and is not tracked by this repository. The project must judge the alert and keep the IaC scan clean with a time-limited exception.

Acceptance criteria

Requirement: Harbor template Dockerfile ignore entry

The .trivyignore.yaml file SHALL hold an unexpired entry for rule DS-0002 at .venv/lib/python3.14/site-packages/harbor/cli/template-task/environment/Dockerfile.

Scenario: The IaC scan reads the entry

  • WHEN uv run devops ci --check --only trivy-config runs.
  • THEN The command exits 0 and reports no DS-0002 finding for the harbor template Dockerfile.

Requirement: Ignore entry carries an expiry

The ignore entry SHALL carry an expired_at date that is later than the merge date and a reason.

Scenario: The validator reads the expiry and reason

  • WHEN uv run devops ci --check --only trivy-config runs.
  • THEN The command exits 0 and reports the entry as valid with its expiry and reason.

Existing Tool Considered

No alternatives check has run. The open, maintained tool is Trivy's native .trivyignore.yaml filter with the expired_at field. It covers a time-limited exception for one rule and one path. It lacks a way to fix the third-party Dockerfile, which is not in the repository. The change builds no code, so it has no build cost.

Key questions

  • Should the change edit the Dockerfile under .venv?: No. The Dockerfile belongs to the installed harbor package and is not tracked. A change is lost when the package is reinstalled. The change adds a time-limited ignore entry instead. (best practice) [sources: SECURITY.md, docs/adr/0005-review-findings-come-from-tools-not-models.md]
    • Rejected: Edit the third-party Dockerfile. The file is not in the repository and is lost on reinstall.
    • Rejected: Dismiss the GitHub alert. A dismissal is GitHub state, not a reviewed, expiring project record.
    • Chosen: Add a time-limited entry to .trivyignore.yaml. The policy and ADR 0005 keep a suppression with a reason and an expiry in project configuration.
  • Which ignore mechanism holds the exception?: The .trivyignore.yaml file holds the entry. Trivy reads its expired_at field, so the finding returns after the date. (best practice) [sources: .trivyignore.yaml, openspec/specs/trivy-config-alerts/spec.md]
    • Rejected: Inline Trivy comment in the Dockerfile. The file is third-party and not tracked.
    • Chosen: .trivyignore.yaml with expired_at. Trivy reads the file and enforces the expiry.
    • Rejected: GitHub alert dismissal. The dismissal leaves no expiring project record.
  • What expiry period should the entry use?: The entry uses an expiry date 90 days after the merge date. This period covers one quarterly dependency update. (best practice) [sources: SECURITY.md, docs/adr/0005-review-findings-come-from-tools-not-models.md]
    • Rejected: 30 days. A monthly update is shorter than the project's dependency cadence.
    • Chosen: 90 days. It covers one quarterly dependency update and limits the exception.
    • Rejected: 365 days. It keeps the exception for too long and hides a stale package.
  • Which open, maintained tool covers the need?: No alternatives check has run. Trivy's .trivyignore.yaml with expired_at covers the need. The change builds no code, so it has no build cost. (best practice) [sources: .trivyignore.yaml]
    • Rejected: Custom script to filter Trivy output. It adds code to build and keep, and Trivy already reads an ignore file.
    • Chosen: Trivy .trivyignore.yaml with expired_at. The scanner reads the entry and enforces the expiry with no new code.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @devops-cli-service
    Contributor
    • Priority: P1-High. A HIGH severity security misconfiguration is open and must be judged within 14 days.
    • Related: fix(security): Judge Trivy-config DS-0002 in the task Dockerfile #6500, which asks for a different change. Both judge Trivy-config rule DS-0002 in a Dockerfile, but the candidate targets template-task/environment/Dockerfile while 6500 targets template-adapter/task-template/environment/Dockerfile.
  4. added
    priority/p1-high
    on Nov 24, 2026
  5. changed the title [-]fix(security): judge Trivy-config DS-0002 in .venv/lib/python3.14/site-packages/harbor/cli/template-task/environment/Dockerfile[/-] [+]fix(security): Judge Trivy-config DS-0002 in the task Dockerfile[/+] on Nov 24, 2026
  6. devops-cli-service commented on Nov 24, 2026

    @devops-cli-service
    Contributor

    The job shortened the title of this item. The summary had 112 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-task/environment/Dockerfile
    • After: fix(security): Judge Trivy-config DS-0002 in the task Dockerfile
    • Source of the summary: the background model
  7. devops-cli-service commented on Nov 24, 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 24, 2026
  9. removed
    status/in-review
    owner/agent
    on Nov 24, 2026
  10. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-25 00:22 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