Surface aged update candidate when latest is quarantined by --min-age #28

Merged
coding-agent-marvin8 merged 0 commits from refs/pull/28/head into main 2026-06-24 06:25:58 +00:00
coding-agent-marvin8 commented 2026-06-24 03:46:47 +00:00 (Migrated from codeberg.org)

When the latest version is quarantined by --min-age but an older version has already aged past the threshold and is a genuine update over the spec, zaojun now surfaces it on the line with a compatibility icon and exits 1.

Format: ⏳ requests: ⚠️ 2.32.3 available (45 days old) — latest 2.33.0 is only 2 day(s) old (min-age: 7)

Also adds the aged candidate to JSON output (aged_version, aged_age_days, aged_status).

Closes #27

When the latest version is quarantined by `--min-age` but an older version has already aged past the threshold and is a genuine update over the spec, zaojun now surfaces it on the ⏳ line with a compatibility icon and exits 1. Format: `⏳ requests: ⚠️ 2.32.3 available (45 days old) — latest 2.33.0 is only 2 day(s) old (min-age: 7)` Also adds the aged candidate to JSON output (`aged_version`, `aged_age_days`, `aged_status`). Closes #27
coding-agent-marvin8 commented 2026-06-24 04:22:04 +00:00 (Migrated from codeberg.org)

src/zaojun/__init__.py diff position 573

A10: The index_url parameter is user-controlled (via CLI flag or config) and is passed directly to get_latest_pypi_version without any validation or allow-listing.

🔴 Not actioned — SSRF does not apply to a local CLI tool.

SSRF is a meaningful vulnerability when a server-side application accepts user input and uses it to make outbound requests on behalf of an external attacker who is distinct from the user. Here, the "attacker" and the user are the same person: the only way --index-url can be influenced is by whoever is running the command or writing their own pyproject.toml.

If you can run zaojun, you can already run curl <any-url> with the same effect. There is no server, no privilege boundary, and no third-party input path — so there is no attack surface for SSRF.

--index-url is a standard Python tooling feature supported by pip, uv, and every PyPI-compatible client. Restricting or allow-listing it would break the legitimate use case of pointing at a private index (Artifactory, Nexus, Devpi, etc.) without providing any security benefit.

[`src/zaojun/__init__.py` diff position 573](https://codeberg.org/marvin8/zaojun/pulls/28#issuecomment-17984147) > A10: The `index_url` parameter is user-controlled (via CLI flag or config) and is passed directly to `get_latest_pypi_version` without any validation or allow-listing. 🔴 Not actioned — SSRF does not apply to a local CLI tool. SSRF is a meaningful vulnerability when a *server-side* application accepts user input and uses it to make outbound requests on behalf of an external attacker who is distinct from the user. Here, the "attacker" and the user are the same person: the only way `--index-url` can be influenced is by whoever is running the command or writing their own `pyproject.toml`. If you can run `zaojun`, you can already run `curl <any-url>` with the same effect. There is no server, no privilege boundary, and no third-party input path — so there is no attack surface for SSRF. `--index-url` is a standard Python tooling feature supported by `pip`, `uv`, and every PyPI-compatible client. Restricting or allow-listing it would break the legitimate use case of pointing at a private index (Artifactory, Nexus, Devpi, etc.) without providing any security benefit.
Sign in to join this conversation.
No description provided.