Repository navigation
Release 2.2.0 - #2
Merged
Merged
Conversation
PyDoctor read Python version, pip version and virtualenv status from its own interpreter, and listed packages with `pip list` inside the project. Under pipx/uv tool, or in uv environments (which have no pip), scans saw 0 packages and reported every check as OK with exit code 0. - Probe the project interpreter (stdlib-only script, run from an empty temp dir) for version, venv status, distributions, requirements, marker environment and pip version - Virtualenv status comes from the probe; the old check compared an interpreter path with a prefix directory and was always true - New --python option / PYDOCTOR_PYTHON; the chosen interpreter and why are shown in the report - Interpreter discovery: drop dev/test/prod/kernel names in the parent directory; label parent-directory venvs; prefer python on PATH over PyDoctor's own interpreter - pipdeptree runs from PyDoctor's interpreter with --python - Without pip: dependency check uses package metadata, outdated check uses `uv pip list --outdated`, or is reported as skipped - ENV_PACKAGES_UNAVAILABLE (error) when the environment can't be read; ENV_DEPS_NOT_INSTALLED (warning) when none of the declared dependencies are installed in the scanned interpreter - The no-venv prompt in `diagnose` now works, and never blocks non-interactive runs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JVyXTHZGXqyzPFrUPGPkpX
- Compute the CVSS v3.0/3.1 base score from the vector (spec formula, checked against reference scores). The old heuristic labelled any network-reachable, no-privilege vector HIGH, so a 3.1 (Low) and a 9.8 (Critical) vulnerability were both shown as critical and each cost 25 points. - GitHub's MODERATE label maps to MEDIUM (it fell through to warning) - CVSS v4/v2-only advisories are UNKNOWN instead of guessed - Fixed version comes from the range containing the installed version (Django 5.1.2 now targets 5.1.4, not 4.2.17). `fix` uses this value. - Skip withdrawn advisories - Fetch sparse advisories in parallel instead of one at a time - Write the cache once per batch instead of once per package - --no-cache ignores cached results (and refreshes them) instead of deleting the whole cache; cache keys are versioned so results cached with the old severity logic aren't reused - Recommendations name the fixed version Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JVyXTHZGXqyzPFrUPGPkpX
`check --ci` reported "CI/CD and Secrets secure" for a project with a
hardcoded Django SECRET_KEY, a Stripe live key, a committed .env holding
a database password and an OpenAI key, and a pull_request_target
workflow that checked out PR code with write-all permissions.
Secrets
- Scan files tracked by git plus untracked files that aren't ignored,
of any text type (outside git: Python and config files)
- Provider patterns: AWS, GitHub, PyPI, Stripe live, OpenAI, Anthropic,
Slack, Google API keys, private keys, database URLs with passwords
(local hosts skipped), framework SECRET_KEY settings
- Generic rule only when the name ends with a secret word and the
literal looks random; never in docs/examples, hashes or workflows
- Line numbers and redacted previews; `# pydoctor: ignore` per line
- CI_ENV_FILE_COMMITTED (error) / CI_ENV_FILE_NOT_IGNORED (warning);
templates (.env.example) and test fixtures are fine
- Checked against flask, requests, httpx, fastapi, django, DRF, pip and
this repo: zero findings. All 8 issues in the test project found.
Workflows (with line numbers)
- CI_PULL_REQUEST_TARGET_CHECKOUT (critical), CI_SCRIPT_INJECTION
(untrusted ${{ github.event.* }} inside run:), CI_BROAD_PERMISSIONS
- Unpinned-action check reads `uses:` lines instead of any "@main"
- CI_CLEARTEXT_ENV now catches literal secret values, not only keys
starting with SECRET_, and ignores throwaway CI service passwords
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVyXTHZGXqyzPFrUPGPkpX
- scan-security --json: `advisory` is the GHSA/CVE id (it was the string "SEC_VULNERABILITY" for every finding); adds aliases, fixed_in, cvss_score and summary; `code` keeps the issue code - JSON output includes `health` (score and verdict) - Health score: a package costs the penalty of its worst advisory, not one penalty per advisory; each category has a cap with diminishing returns, so fixing packages visibly moves the score; any critical issue caps the score at 69; scans with checks that couldn't run are labelled "Incomplete" - Unused scanner: database drivers, password hashers and cache clients selected by Django settings strings or database URLs (psycopg, mysqlclient, argon2-cffi, bcrypt, redis, ...) count as used - `import pydoctor.scanners.<x>` no longer fails with a circular import - Remove the unused pydoctor.performance package - `github <repo>` says remote repositories aren't supported instead of silently ignoring the argument; `docker` is labelled a preview - Replace the "Entropy Check: PASS" log line with the scanned interpreter - Docs links point to pydoctor-docs.thally.app Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JVyXTHZGXqyzPFrUPGPkpX
`fix` checked the installed version with `pip list`, so in uv environments it couldn't tell whether an upgrade happened. It now reads the version through the environment probe (pip as fallback) and prints the change, e.g. "requests upgraded (2.31.0 → 2.34.2)". Also makes the base-interpreter test locate the interpreter from sys.base_prefix, which works on Python 3.10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JVyXTHZGXqyzPFrUPGPkpX
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.
No description provided.