Repository navigation
Description
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,zizmorruns 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 .stateruns after the next scan onmain - 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 onmain - 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
.venvpath?: Keep the scan from reading.venv. The path is data of the installedharborpackage, 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
harborpackage under.venv. The repository tracks it not, and each install writes it again. - Rejected: Add a time-limited
.trivyignore.yamlentry. The entry hides one rule at one path and needs a renewal. The scan still reads package data, so the cause stays. - Chosen: Skip
.venvin 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.
- Rejected: Fix the Dockerfile. The file is data of the installed
- Which paths does the exclusion cover?:
.venvonly. The scan keeps every tracked file, and the exclusion names no other directory. (best practice) [sources: SECURITY.md]- Chosen:
.venvonly. The alert names a path under.venv. A wider exclusion would hide findings in tracked files. - Rejected: Every dependency directory, such as
.venvandnode_modules. No alert namesnode_modules, and a wider exclusion hides more than the issue shows.
- Chosen:
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 28, 2026
A live HIGH-severity security misconfiguration that must be judged within 14 days.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.yamlas 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.[-]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[/+]devops-cli-service commentedon Nov 28, 2026
The job shortened the title of this item. The summary had 129 characters, and the limit is 60. The type and the scope stay.
fix(security): judge Trivy-config DS-0029 in .venv/lib/python3.14/site-packages/harbor/cli/template-adapter/task-template/environment/Dockerfiledevops-cli-service commentedon Nov 28, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
test(security): expect --skip-dirs .venv in scan_iac test (#7559)
devops-cli-service commentedon Nov 28, 2026
Released in v0.233.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.233.0
devops-cli-service commentedon Nov 28, 2026
Live since 2026-11-28 17:56 UTC