Skip to content

ci: migrate dependency security scan from Safety to pip-audit - #252

Open
mikelane wants to merge 5 commits into
mainfrom
issue-251-security-scanner
Open

ci: migrate dependency security scan from Safety to pip-audit#252
mikelane wants to merge 5 commits into
mainfrom
issue-251-security-scanner

Conversation

@mikelane

Copy link
Copy Markdown
Owner

Summary

Migrate the Dependency Security Scan workflow from the deprecated safety check command to the auth-free pip-audit==2.10.1 scanner.

Changes

  • .github/workflows/security.yml: replace Safety CLI with pinned pip-audit; run scans via uv run --with pip-audit==2.10.1; add uv lock --check and --locked export so the scan reflects the committed uv.lock; keep the production scan as a hard gate while the development scan reports without blocking; rename artifact to security-report.
  • docs/deployment.md and SECURITY.md: update manual audit examples, supported versions, and CI snippets to reference pip-audit.
  • CHANGELOG.md: record the migration under Migrate Dependency Security Scan from deprecated safety check to auth-free scanner #251 and clarify the fix: update vulnerable transitive deps and modernize security scan workflow #248 entry.
  • tests/test_security_workflow_*_feature.py: add workflow-consistency and adversarial tests covering lock validation, version pinning, hard/soft gates, artifact upload permissions, and failure masking.

Testing

  • Full test suite passes (1374 passed, 23 skipped) using the canonical pytest -n auto -q --ignore=tests/bdd command.
  • Pre-commit hooks (ruff, mypy, isort, tox parallel tests) pass.
  • Workflow action versions and inputs validated by existing workflow tests.

Closes #251

🤖 Generated with Claude Code

mikelane added 5 commits June 29, 2026 19:38
- Replace deprecated safety check with pip-audit==2.10.1
- Use uv export --no-dev for production and --all-groups for dev
- Keep production scan as hard gate; dev scan reports without blocking
- Rename artifact from safety-report to security-report
- Update CHANGELOG, SECURITY.md, and deployment docs
Avoid uv pip install --system, which fails on PEP 668 externally managed

environments. Sync deployment.md to describe pip-audit instead of

Safety check. Add workflow consistency tests to prevent regressions.
Add adversarial QA tests requiring uv lock validation and --with pip-audit

in documentation examples so manual audit instructions work on a clean clone.
…tests

Ensure SBOM generation docs also validate uv.lock and use uv --with

for non-project tools. Add adversarial QA tests verifying lock order,

version pinning, hard/soft gates, failure masking, and artifact glob matching.
Update SECURITY.md supported versions, pytest pin, and CI example.

Update deployment.md Security Workflow job list and manual audit examples.

Wrap CHANGELOG #251 entry and clarify #248 does not claim migration.

Rename workflow tests to follow project test_*_feature.py convention.
@github-actions

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.82%. Comparing base (87de372) to head (682808a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #252   +/-   ##
=======================================
  Coverage   98.82%   98.82%           
=======================================
  Files          50       50           
  Lines        3074     3074           
=======================================
  Hits         3038     3038           
  Misses         36       36           
Flag Coverage Δ
unittests 98.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87de372...682808a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Dependency Security Scan from deprecated safety check to auth-free scanner

1 participant