test_every_subprocess_call_in_the_package_is_bounded

Tests › tests/test_security_surface.py

passed Passed in the packaged run.

What this test is for

Why it exists

A MISSING TIMEOUT IS A HANG SOMEONE ELSE PAYS FOR. The gate runs inside a developer's commit; the MCP server runs for a session; both call git and cargo against trees they did not write. `cargo metadata` on a hostile `Cargo.toml` and `git ls-files` on a huge tree were both unbounded before the 1.1.0 audit.

Verifies REQ-DDB-PIPE-014

Given

  1. unbounded = [ f"{path}:{call.lineno}" for path, call in _subprocess_calls() if call.func.attr == "run" and not any(kw.arg == "timeout" for kw in call.keywords) ]
→

When

  1. —
→

Then

  1. ✓ unbounded is false

tests/test_security_surface.py:69 · its file's page

What it checks (1)

  1. assert not unbounded, ( "these subprocess.run calls carry no timeout, so a hostile or merely huge repository " f"can hang the build, the gate or the server indefinitely: {unbounded}" ) observes _subprocess_calls via unbounded

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_every_subprocess_call_in_the_package_is_bounded→_subprocess_calls

What it reaches

Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-PIPE-014catalogunknown