Skip to content

fix(security): replace credential-shaped fixtures and raise DoS floors - #73

Open
tao-hpu wants to merge 6 commits into
masterfrom
cursor/security-fixture-and-deps-b62d
Open

tao-hpu wants to merge 6 commits into
masterfrom
cursor/security-fixture-and-deps-b62d

Conversation

@tao-hpu

@tao-hpu tao-hpu commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What

Replaces the Telegram-bot and Google-API-key shaped strings in the four test files named by secret scanning with shorter synthetic samples, and raises the locked floors for soupsieve and opentelemetry-api.

The samples still exercise the same checks: a bot<id>:<mixed segment> path is redacted, and an AIza prefix of at least 20 characters is treated as a key. They are not the published credential shapes (8-10 digits plus 34-35 characters, or an AIza prefix plus 35 characters).

soupsieve is now >=4.1.3 and opentelemetry-api is now >=1.45.2. Installing FIM One requires Python 3.11.5 or newer, because no patched soupsieve release installs before that. The lock no longer carries soupsieve 2.10 or 3.0.4.

The sandbox proxy now ends the write side of a refusal (403, 401, 502, 503) before the socket is closed. A client that was turned away receives that status. The request is still not forwarded.

CI's Python matrix and the workflow-editor smoke set UV_PYTHON through setup-uv's python-version, which overrides .python-version. Each of those jobs fails if uv run python is a different minor version. A background-task test waits for the done callback before asserting removal; the assertion is unchanged.

Unused frontend imports and state that eslint warned about are removed. No lint rule is disabled. Chinese, Japanese, Korean, German, and French install lines now say Python 3.11.5+. Only that version string was edited.

Dependabot PRs #65, #67, and #74 were not merged or closed. PR #69 and PR #77 were not touched. Alerts were not closed and history was not rewritten.

Why

Secret scanning #3 (Telegram) and #2 (Google API key) point at test fixtures.

Published advisories, checked again on 2026-11-25 against the GitHub Advisory Database and OSV, and releases checked on PyPI:

  • soupsieve GHSA-mmhr-3c5m-f64f is fixed in 4.0.0. GHSA-6655-6qjp-jx7x and GHSA-7g44-g9rc-x53w still apply to the old locked 2.10 and are fixed in 3.0.2. 4.0.1 through 4.1.3 each fix more quadratic or polynomial selector matching of the same class. 4.1.3 (2026-11-20) is the lowest release that includes all of them, including the filter() / of-type fixes that 4.1.2 does not have. It requires Python >=3.11.5. No newer advisory asks for a higher floor. PyPI hashes for 4.1.3 match uv.lock.
  • opentelemetry-api GHSA-mf5v-w3w3-f6cg is fixed in 1.45.2, which is still the latest release. It requires Python >=3.10.

uv python install 3.12 did not change what uv sync or uv run executed. With .python-version set to 3.11, the 3.12 and 3.13 jobs, and the smoke backend (uv run python), ran 3.11. setup-uv's python-version input sets UV_PYTHON, and uv run honors that over the pin. uv python find does not, so the jobs assert on uv run python.

On Python 3.13.18, TestOverTheWire.test_only_the_application_may_connect failed 5/5 with ConnectionResetError after the proxy logged the refusal. Closing a socket that still held the unread request aborted it, so the 403 never arrived. Half-closing the write side first delivers the response. The test still requires HTTP/1.1 403 and an empty daemon request list.

Type

  • Bug fix
  • Security patch
  • Documentation
  • New feature (discussed in issue first)
  • Refactoring
  • Test coverage
  • Translation / i18n

Checklist

  • uv run ruff check on docker_proxy.py
  • uv run mypy src/fim_one/ on Python 3.11.18: no issues
  • Local uv run pytest -m "not docker" with UV_PYTHON forcing the interpreter:
    • 3.11.18: 9152 passed, 532 skipped, 6 deselected
    • 3.12.16: 9152 passed, 532 skipped, 6 deselected
    • 3.13.18: 9152 passed, 532 skipped, 6 deselected
  • Hosted CI run 45645988253 on a0e89b4a, UV_PYTHON confirmed in each job:
    • Python 3.11: CPython 3.11.18, 9150 passed, 534 skipped, 6 deselected
    • Python 3.12: CPython 3.12.16, 9150 passed, 534 skipped, 6 deselected
    • Python 3.13: CPython 3.13.18, 9150 passed, 534 skipped, 6 deselected
    • Workflow editor smoke: CPython 3.12.16, 21 passed
    • Frontend: pnpm lint clean, 681 tests passed, build succeeded
    • Docs links: clean
  • Local frontend, Node 22.23.4, pnpm 9.15.9: eslint --max-warnings 0 clean, vitest 681 passed, pnpm build succeeded
  • Non-English install lines manually set to Python 3.11.5+ (no translation script)

Remaining

  • Git history still contains the previous fixtures. This PR does not rewrite it, rotate anything, or close alerts.
  • tests/audit/test_no_secret_in_rows.py still builds a bot-token-shaped string at runtime from a short marker plus padding. The source has no contiguous credential of that shape.
  • Hosted pytest skips two more tests than the local run (534 vs 532). The jobs are green; those skips were not turned into failures.
  • soupsieve 4 changes <template> and <iframe> selector behavior for HTML parsed through Beautiful Soup.
  • Next.js security bumps stay on Dependabot build(deps): bump next from 15.5.28 to 15.5.29 in /frontend #74. The other application hardening stays on PR fix(security): harden execution, sessions, MCP HTTP, and first admin #77.
Open in Web Open in Cursor 

cursoragent and others added 6 commits November 19, 2026 05:45
Synthetic samples still trip path-token and Google-key redaction, and
they are shorter than the published credential shapes. soupsieve is
floored at 4.1.2 and opentelemetry-api at 1.45.2. Python 3.11.5 is
required because no patched soupsieve installs on an earlier 3.11.

Co-authored-by: Tao An <tao-hpu@users.noreply.github.com>
…oval

On Python 3.12, await task can resume before the queued done callback
drops the task from the registry. The assertion is unchanged.

Co-authored-by: Tao An <tao-hpu@users.noreply.github.com>
setup-uv's python-version sets UV_PYTHON, which overrides
.python-version for uv sync and uv run. Installing an interpreter
without that still ran 3.12 and 3.13 jobs on 3.11. The workflow
editor smoke uses the same pin so its backend is 3.12, and each job
fails if uv run python is a different minor version.

Co-authored-by: Tao An <tao-hpu@users.noreply.github.com>
Closing the socket while the client's request was still unread aborted
the connection, so a refused client saw a reset instead of the status
line. The proxy now ends the write side before that close. soupsieve
4.1.3 is the first release that also includes the quadratic filter and
of-type fixes published after 4.1.2.

Co-authored-by: Tao An <tao-hpu@users.noreply.github.com>
The admin model screen no longer keeps an unread env-fallback value or
an unused select import. The playground drops an unused icon and an
unread history flag, and the hook playground drops an unused toast
import. No lint rule is disabled.

Co-authored-by: Tao An <tao-hpu@users.noreply.github.com>
Only the install requirement string changes. The rest of each
translation is left as it was.

Co-authored-by: Tao An <tao-hpu@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants