Repository navigation
ci: add tooling, offline tests and scheduled checks - #2
Merged
Merged
Conversation
Move the licence to an SPDX identifier, ship py.typed, raise requests to 2.33.0 to leave out an advisory, and read __version__ from the package metadata so pyproject.toml is the only place it is written. uv.lock is now committed and skips releases younger than three days.
Format the package, sort imports and fill in the missing type arguments. Two changes can be seen by callers: Severity is now a StrEnum, so str() gives the value, and the placeholder timestamp used when a reply has none is timezone-aware.
The only tests called the live API, so nothing could run without a key. The new ones replace the network with a stand-in and fail if anything tries to connect. The live tests moved to tests/live and run with `pytest -m live` when VULNRADAR_TOKEN is set. They no longer read .env files or fall back to a generic API_KEY variable.
Lint, strict types, tests on Python 3.11 to 3.14 and on Windows, a build that installs the wheel with the oldest allowed dependencies, a dependency audit, a gitleaks scan of the whole history and CodeQL. The schedule also reports newer releases. Actions are pinned to commits, and Dependabot waits three days after a release before proposing it.
Fail the secret scan if it reports no commits, audit the oldest versions the package allows and import it with warnings as errors, keep pushes from cancelling scheduled runs, and give Dependabot's Python updates one more day so the lockfile can always take them. The changelog now covers two behaviour changes it missed.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
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.
Builds on #1, so merge that one first. The repository had no CI, and its only tests needed a live API key.
py.typed,requests2.33.0 or newer (2.32.5 has an advisory), and__version__read from the package metadata.uv.lockis committed and skips releases younger than three days.mypy --strictpass. Two changes are visible to callers:Severityis aStrEnum, and the placeholder timestamp is timezone-aware. Both are in the changelog.tests/live, run only withpytest -m liveandVULNRADAR_TOKEN, and no longer read.envfiles or a genericAPI_KEY.The API client itself is unchanged apart from the above: it still targets the retired v2 API, which is the next piece of work.
Tested locally on Windows with Python 3.11, 3.12 and 3.13: ruff, mypy and the offline tests pass (46 tests), the live tests skip without a token, the package builds and passes
twine check --strict, and the dependency audits find nothing. Python 3.14, Linux and the gitleaks step were not run locally.