docs: say in SECURITY.md that hostile captures are a live risk, not a closed one - #611
Conversation
… closed one `SECURITY.md` was rewritten from GitHub's template in #550 and its facts still check out, so this is the one gap that review found rather than a rework. * The threat model promised that parse errors "are supposed to arrive as" `pcapkit.utilities.exceptions` types. `MemoryError` appears nowhere in `pcapkit/`, so the hierarchy demonstrably does not cover it and the sentence over-claimed. Reworded to intent plus a known shortfall, keeping the class in scope for reports. * Added "Handling untrusted captures", giving callers the advice the threat model implied but never stated: bound memory and time out of process, expect built-in exception types the hierarchy misses, and revalidate any parsed field that carries a security decision. A short read can pad to a value instead of raising, so the last one is not hypothetical. Deliberately non-specific: no amplification figures, capture shapes or issue numbers. The open vectors stay described where they already are, in `docs/source/changelog/1.5.0.rst`, which is a record of what was measured; this file only needs to stop implying the work is finished. No changelog bullet, following #550, which rewrote this file wholesale and added none -- repository policy documents are not a release note here.
|
✅ GOOD TO MERGE — head |
Cross-review appendix — PR #611Reviewer: Sonnet; PR authored on Opus 5. Reviewed at head CIRollup The premise — checked, not assumedThe PR's argument for publishing rests on: "
This is public (it is the source The
|
Reviewing
SECURITY.mdagainst the ask "see if any updates needed". It was rewritten from GitHub's unedited template in #550 one day ago, so the first job was establishing whether it was already current rather than assuming it needed work.What I verified, and what held up
Everything factual in the file checks out. Recorded here so the next review does not have to redo it:
pcapkit/__init__.py→1.5.0b4docs/source/changelog/— highest non-1.5 entry is1.4.1.rstunit-tests.ymlandpython-compatibility.ymlboth matrix 3.10–3.14, 3.15 asexperimental: truerequires-python = ">=3.6, <4"pyproject.toml:49requires-python"pyproject.toml:41-48GET /repos/JarryShaw/PyPCAPKit/private-vulnerability-reporting→{"enabled":true}CODE_OF_CONDUCT.mdjarryshaw@icloud.comdpktscapypysharkpypcappcap-ctpypcapfile, all real extras inpyproject.tomlSo no correction was needed to the supported versions, the reporting channel, or the response expectations. This PR does not touch any of them.
The one gap
The threat model is written for a reporter — it says which classes of defect are in scope. It never tells a user that defects of exactly those classes are present and unfixed right now, and one sentence actively implied the opposite:
MemoryErrorappears nowhere inpcapkit/(grep -rn MemoryError pcapkit/→ no matches), so the hierarchy provably does not cover it. Stated as a bare promise, that is the same species of untrue documentation #550 set out to remove. Reworded to intent plus a known shortfall, keeping the class in scope for reports.The new Handling untrusted captures section then gives callers the advice the threat model implied but never stated: bound memory and time out of process, expect built-in exception types the hierarchy misses, and revalidate any parsed field that carries a security decision.
That last point is not hypothetical — a short read can pad to a value rather than raise, so a caller trusting the value gets a wrong answer with no error. Note the existing out-of-scope bullet ("a capture that parses to the wrong values without any security consequence") is saved only by its qualifier; a reporter skimming it may self-triage that class away. Flagged for your call, not changed here.
What this deliberately does not publish
No amplification figures, no capture shapes, no issue numbers. The open vectors stay described where they already are —
docs/source/changelog/1.5.0.rstalready states the crafted shape, the ratio, the retained bytes and that the 16-bit band is deliberately untouched, in far more operational detail than a policy file would carry. Nothing here is news to an attacker, and this file only needs to stop implying the work is finished. Whether to go further and name the open vector explicitly in the policy is your decision.Also noticed, not changed
.github/dependabot.ymlcoverspiponly. There is nogithub-actionsecosystem entry, so the action versions pinned across the workflows never get update PRs. Adding it is a real if small hardening, but it would open a wave of PRs at once, so it is left for you to decide.No changelog bullet, following #550, which rewrote this file wholesale and added none — repository policy documents are not a release note here.
Docs-only; no code touched, no tests run.