Repository navigation
PyDoctor 2.3.0: built for CI - Release 2.3.0 - #4
Merged
Merged
Conversation
Baselines - `pydoctor baseline` records current issues in .pydoctor-baseline.json; scans hide them and fail only on new issues. `--ci` updates only CI guard entries and keeps the rest. - Auto-loaded when present; --baseline FILE / --no-baseline on every scan command. Unreadable or wrong-format files exit 2. - Fingerprints are stable: vulnerabilities by package + advisory (not installed version), file findings by file + hash of the line (survive line shifts), outdated packages by name. - Scan-integrity issues (ENV_PACKAGES_UNAVAILABLE, SEC_SCAN_INCOMPLETE, SCANNER_ERROR) are never baselined. Fixed entries are reported, only for categories the scan checked. The file holds no secret previews. SARIF - --sarif FILE on every scan command writes SARIF 2.1.0 (validated against the OASIS schema). One rule per advisory with CVSS-based security-severity and an OSV link; one rule per code otherwise. - Package findings point at the declaring line in pyproject.toml or requirements*.txt; file findings at their file and line; paths are relative to the git root. Environment and broken-scan issues are left out. partialFingerprints use the baseline fingerprint. Docs links - Every issue has docs_url (JSON) and errors/criticals show a Docs line in the terminal, pointing at pydoctor-docs.thally.app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JVyXTHZGXqyzPFrUPGPkpX
GitHub Action (action.yml, composite) - Installs pydoctor in its own venv, so it doesn't change or get counted in the project's environment; the version follows the action ref (v2 → latest 2.x, v2.3.0 → exactly that) unless `version` is set - Runs `pydoctor check` (or the CI guard only), writes SARIF, uploads it to code scanning (non-fatal if code scanning isn't available), then fails the job on findings; exit code and SARIF path are outputs - Self-scan workflow runs the action from this repo on every PR - actionlint clean; scripts covered by tests pre-commit - pydoctor-ci: blocks commits that add secrets, .env files or risky workflows; isolated, no network needed - pydoctor-check: full scan with your own pydoctor at pre-push Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JVyXTHZGXqyzPFrUPGPkpX
Only full version tags (v2.3.0) publish to PyPI, so a moving v2 tag for the GitHub Action doesn't trigger a release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JVyXTHZGXqyzPFrUPGPkpX
|
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. |
On Windows runners `bash` on PATH resolves to WSL, which can't read the Windows paths the tests pass, so all seven tests failed there. The action itself runs under Git Bash on Windows; install.sh now converts RUNNER_TEMP with cygpath so the venv path works there too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JVyXTHZGXqyzPFrUPGPkpX
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.
PyDoctor 2.3.0: built for CI
2.2.0 made pydoctor's results trustworthy. 2.3.0 makes them usable in CI: existing projects can adopt it without a wall of failures, and findings show up where code is reviewed.
Baselines
A project with 89 known vulnerabilities can't turn on a gate that fails on every run.
pydoctor baselinerecords today's issues in.pydoctor-baseline.json; scans then hide them and fail only on new ones.--baseline FILE/--no-baselineon every scan command;pydoctor baseline --ciupdates only CI-guard entriesENV_PACKAGES_UNAVAILABLE,SEC_SCAN_INCOMPLETE,SCANNER_ERROR. Accepting them would turn a scan that didn't run into a passTested end to end: baseline 8 findings → exit 0; shift lines and add a new GitHub token → only the token is reported, exit 1; remove a baselined secret → "1 baselined issue is fixed".
SARIF
--sarif FILEon every scan command. Validated against the OASIS SARIF 2.1.0 schema.security-severityand an OSV link, so GitHub ranks alerts correctlypyproject.toml/requirements*.txt; secrets and workflow findings at their file and line; paths relative to the git root (works for subdirectory projects)partialFingerprintsreuse the baseline fingerprint, so alerts stay stable across runsGitHub Action
uses: iamAgbaCoder/pydoctor-cli@v2@v2→ latest 2.x,@v2.3.0→ exactly 2.3.0, or setversionexit-codeandsarif-fileoutputspre-commit
pydoctor-ci: blocks commits that add secrets,.envfiles or risky workflows. Isolated, no network. Verified withpre-commit try-repo: a staged Stripe key fails the hook, removing it passespydoctor-check: full scan at pre-push, using the user's own pydoctorDocs links
Every issue has
docs_urlin JSON (and SARIFhelpUri); errors and criticals show a Docs line in the terminal. A test pins every anchor to headings that exist on pydoctor-docs.thally.app.Release workflow
publish.ymlnow triggers onv*.*.*tags only, so moving thev2tag for the action doesn't create a PyPI release or a GitHub release named "v2".Testing
After merging
v2.3.0and push it (publishes to PyPI)git tag -f v2 v2.3.0 && git push -f origin v2