fix: resolve all security scan findings (3 HIGH, 4 MEDIUM)#3
Merged
Conversation
HIGH: - Guard float() on Retry-After header with try/except to handle RFC 7231 HTTP-date values without crashing the retry loop - Pin all GitHub Actions to full 40-char commit SHAs (H11): actions/checkout, astral-sh/setup-uv, codecov/codecov-action, actions/upload-artifact, actions/download-artifact, pypa/gh-action-pypi-publish - Make publish workflow audit step blocking (no continue-on-error); CI audit stays soft to avoid blocking development MEDIUM: - Remove raw API response data from parse_list warning logs to prevent leaking subscriber emails or custom auth headers - Validate API key is non-empty on HyperpingClient init - Add .env / .env.* / .env.local to .gitignore - Document get_headers_dict() may return sensitive header values
- Add pip-audit>=2.7 to dev dependencies so CI audit step works without fallbacks; simplify audit commands in both workflows - Add .github/dependabot.yml to auto-update pinned Action SHAs (weekly) and Python dependency lockfile (weekly) - Add SLSA build provenance attestation to publish workflow using actions/attest-build-provenance@v2 (pinned to commit SHA); build job now has attestations: write permission
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
Fixes all 7 actionable findings from the security vulnerability scan.
HIGH (3)
float()on the rawRetry-Afterheader value was unguarded. RFC 7231 allows HTTP-date strings (e.g.,"Fri, 31 Dec 2025 23:59:59 GMT"), which would throwValueErrorand crash the retry loop. Now wrapped in try/except, falling back to exponential backoff.continue-on-error: truefrompublish.ymlso vulnerable dependencies cannot ship to PyPI. CI workflow audit stays soft to avoid blocking development.MEDIUM (4)
parse_listwarning logs to prevent leaking subscriber emails or custom auth headers.HyperpingClient(api_key="")now raisesValueErrorimmediately instead of producing confusing 401 errors..gitignorehardened: Added.env,.env.*,.env.localexclusions.get_headers_dict()documented: Added warning that returned dict may contain sensitive values (e.g., Authorization tokens configured on monitors).Test plan
ruff check src tests- All checks passedmypy src- 0 errors in 19 filespytest- 177 passed, 91.5% coverage (threshold 85%)