Skip to content

fix(security): skip .venv in TrivyConfigScanner - #7570

Merged
dan-petty merged 3 commits into
mainfrom
fix/7559-skip-venv-trivy-config
Nov 28, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/7559-skip-venv-trivy-config

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Skip .venv and **/.venv via --skip-dirs in TrivyConfigScanner.build_command so trivy config ignores installed third-party packages, and remove the four obsolete .venv/ Harbor entries from .trivyignore.yaml.

Checks:

  • uv run pytest tests/security/test_trivy_config_ignore.py tests/security/test_secops.py tests/security/test_scanner_base_and_registry.py tests/config/test_command_builders.py (50 passed, 100% diff coverage)
  • uv run devops openspec check, CI static gates (10/10), and devops ci fail-to-pass --base origin/main passed

Closes #7559

Change: openspec/changes/archive/2026-11-28-7559-skip-venv-trivy-config/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/security Security linters (trivy, bandit, gitleaks, kubeconform) and Vault labels Nov 28, 2026
@dan-petty
dan-petty marked this pull request as ready for review November 28, 2026 08:40
@dan-petty

Copy link
Copy Markdown
Owner Author

Check results

Head commit: a0bc112f02bc2627f8780741982e927260b76523

Check Conclusion Link
Tests & Coverage success run
Trivy neutral run
devops-cli success run
zizmor success run
trivy-config success run
Changed-Test Independence success run
Plan Check skipped run
CodeQL success run
Test Job Duration skipped run
Tests on Main skipped run
Dependency Freshness skipped run
Changed-Test Independence (run 3 of 3) success run
Changed-Test Independence (run 2 of 3) success run
Tests & Coverage (shard 1 of 5) success run
Tests & Coverage (shard 3 of 5) success run
Changed-Test Independence (run 1 of 3) success run
Tests & Coverage (shard 5 of 5) success run
Tests & Coverage (shard 4 of 5) success run
Runner Image success run
Design Tokens success run
Tests & Coverage (shard 2 of 5) success run
Service Image success run
Static Analysis success run
Fail-to-Pass Check success run
Semantic PR title success run
Analyze (actions) success run
Analyze (python) success run

Fail-to-pass run: https://github.com/dan-petty/devops-cli/actions/runs/46126360791/job/140921717876

Skipped check: Trivy
Skipped check: Plan Check
Skipped check: Test Job Duration
Skipped check: Tests on Main
Skipped check: Dependency Freshness

@dan-petty
dan-petty merged commit 1502b93 into main Nov 28, 2026
27 checks passed
@dan-petty
dan-petty deleted the fix/7559-skip-venv-trivy-config branch November 28, 2026 12:36
dan-petty-release Bot added a commit that referenced this pull request Nov 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.233.0](v0.232.11...v0.233.0)
(2026-11-28)


### Features

* **gh:** refuse agent deployment review routes
([#7571](#7571))
([b3c8edf](b3c8edf))


### Bug Fixes

* **ci:** run Tests & Coverage in six balanced shards
([#7572](#7572))
([e6f5026](e6f5026)),
closes [#7550](#7550)
* **roadmap:** freeze clock in alternatives gauge test
([#7584](#7584))
([611de9d](611de9d))
* **roadmap:** the other rows leave out an item that left
([#7566](#7566))
([97c4576](97c4576))
* **security:** set non-root securityContext on ollama-profiles fixture
([#7567](#7567))
([53e5aaa](53e5aaa))
* **security:** skip .venv in TrivyConfigScanner
([#7570](#7570))
([1502b93](1502b93))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/security Security linters (trivy, bandit, gitleaks, kubeconform) and Vault type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant