ci: add security and coverage guardrails - #363
Draft
thodson-usgs wants to merge 2 commits into
Draft
Conversation
Gate package branch coverage at a reported 90%, enable Ruff security checks with narrow documented exceptions, audit the latest core dependency resolution, and reduce merge-workflow token and action supply-chain exposure.
Keep vulnerability reporting available in the scheduled and manual code-health artifact without adding network and resolution time to every pull request or mandatory local feedback loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pip-audit==2.10.1to the weekly/manual advisory Code Health report rather than every pull requestRationale
This follows up on Lessons from three months of vibe coding. The repository already has most of the feedback loop the article recommends: Ruff, strict mypy, offline tests, pre-commit, cyclomatic and cognitive complexity ratchets, Wily trends, Pyscn duplication/dead-code reports, Import Linter contracts, ADRs, and installed-wheel smoke tests.
This PR adds only distinct gaps. The coverage floor is aggregate and intentionally leaves cross-platform margin below the current 93.75%. Project-path
pip-auditchecks the latest compatible core resolution; it does not claim to cover every allowed version or optional extra. It runs with the Monday/manual health scan so advisory lookup and dependency resolution do not add about 34 seconds to every PR.Validation
pre-commit run --all-filescoverage run -m pytest tests/ && coverage report -m: 767 passed, 93.75% package branch coveragepython -m pip_audit --strict --progress-spinner off .: no known vulnerabilitiespython -m pip wheel --no-deps --wheel-dir <temporary-directory> .Not Added
Srules provide the same static security-smell category without another scanner.Repository Follow-Ups
These cannot be delivered by this PR:
main; the existing merge checks should be required for these gates to block merges.