Repository navigation
Security review fixes, a single eggfetch-core 0.4.1, and 0.1.4 release prep - #12
Merged
Merged
Conversation
- Resolve the body framing from the head before anything is written or read. An unparseable Content-Length used to mean "no body", so its bytes were parsed as the next request line and could carry a second request past the gate. - Refuse a shape a proxy in front of the server could have framed differently: a Content-Length that is not all digits, unequal duplicates, a Content-Length alongside Transfer-Encoding, and any transfer-coding list other than exactly one chunked. - Accept equal duplicate lengths, since header rewriting produces them and they frame the same message. The socket tests send a complete second request behind the bad head: a proceed-and-panic gate proves the 400 comes from the framing decision, and the read to end-of-file proves the second request never got served.
- Give the request head one absolute budget measured from its first byte. The idle timeout resets on every read, so a peer that dribbled one byte at a time never tripped it; that reset now bounds only the wait for the first byte. - Give a body a no-progress budget instead of a total, so an upload on a slow link still finishes as long as it keeps moving. - Arm the read timeout immediately before each read, from the reader that is about to read. SO_RCVTIMEO belongs to the socket and the writer is a dup of it, so the value set once per request loop was overwritten by the next body read. - Grow the body buffer with the bytes that arrive rather than reserving the announced size before any of it has been sent, for both a declared length and a chunk. A short end-of-file is now an error instead of a silently truncated body. - Expose head_timeout_seconds (60) and body_stall_timeout_seconds (120) under [server], each floored at one second.
- Describe the config's api_key field and the endpoint's authentication as the code implements them. With neither an issued key nor a config key the server refuses every request with `401 no_api_key` and `eggpass run` will not start, and revoking the last key closes the endpoint instead of reopening it. - Leave the shipped plans that describe the old open state as they were written: they are a record of what was decided then, not a claim about this build.
- Resolve every third-party action in the three publish workflows to the commit its tag pointed at on 2026-11-30 and pin that SHA. A tag can be moved or retargeted, so a release could otherwise run different code than the one that was reviewed. - The pins cover actions/checkout, actions/setup-python, actions/upload-artifact, actions/download-artifact, Swatinem/rust-cache, PyO3/maturin-action and pypa/gh-action-pypi-publish: 18 references across the crates, auth and auth-pypi workflows. The CI and release workflows are unchanged.
- Split the EDITOR/VISUAL value into a program and its own arguments instead of passing the whole string as one executable path, which made the common `code --wait` and `vim -f` forms fail to launch. - Keep a backslash that escapes nothing as written, so a Windows path survives, and treat an unbalanced quote as an error naming the variable and its value rather than silently falling back to another editor.
- Record the review's accepted findings and the corrective plan for each, so the reasoning behind the five stage commits sits in the history next to them. - Include what was reviewed and deliberately left alone, the measured test counts per commit, and the tag-to-commit pins resolved for the three publish workflows.
- Resolve every eggfetch use in the repository to a single `eggfetch-core` 0.4.1: the CLI's updater adapter, the `eggpass-auth` crate, and the vendored copy the Python bindings build. `eggup-eggfetch` 0.2.2 accepts `^0.4.0`, so the updater keeps its published adapter and shares one version instead of resolving a second line alongside it. - Bump `eggpass` to 0.1.4 and `eggpass-auth` to 0.1.2, and point the CLI's dependency requirement at the new crate version. - Record the release in CHANGELOG.md: the framing refusal, the request deadlines, the editor argument split, the pinned publish actions, and the dependency alignment, all under 0.1.4 alongside the media and non-text work that had accumulated in Unreleased.
- The README's documentation table skipped docs/eggpool.md, which docs/README.md lists, leaving the reverse-tunnel contract unreachable from the front page.
- Say what a reader hits when they run the CLI release checks before the new `eggpass-auth` version is on crates.io: `cargo package` cannot resolve the requirement, because the packaged CLI needs the published crate rather than the path dependency. - Name that as a wrong ordering rather than a broken CLI, so the runbook's own verification step is not mistaken for a failure to fix in the CLI.
- The PyPI distribution vendors the `eggpass-auth` crate, whose source moved from 0.1.1 to 0.1.2 with the `eggfetch-core` 0.4.1 alignment. A 0.1.2 artifact is already published, so source that changed needs its own version rather than a republish of the same one. - Keep `pyproject.toml` and the maturin wrapper crate equal, which is what the PyPI workflow asserts, and leave the vendored crate at 0.1.2: that is the library version it contains.
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.
Prepares the
0.1.4release and lands the security-review corrective work.Security review (F1–F5)
server: refuse ambiguous request framing— the body framing is decided before anything is written or read, so a malformed announcement is no longer answered with100 Continueand its bytes cannot prefix the next request. Refuses an unparseable or conflictingContent-Length,Content-LengthalongsideTransfer-Encoding, and any coding list other than exactlychunked; equal duplicates are still accepted.server: bound request reads and allocate from received bytes— one absolute head budget measured from the first byte, a no-progress body stall budget,SO_RCVTIMEOarmed per read from the reading handle, and body buffers that grow with bytes received. Addsserver.head_timeout_seconds(60) andserver.body_stall_timeout_seconds(120).docs: state the key requirement the code enforces— the endpoint has no open state; the docs no longer claim it accepts anything when no key exists.ci: pin publish actions to commit SHAs— 18 references across the three publish workflows.cli: accept editor arguments in EDITOR and VISUAL.Release prep
eggfetch-core0.4.1 across the CLI,eggpass-auth, and the vendored Python snapshot.eggup-eggfetch 0.2.2accepts^0.4.0, so no Eggup bump was needed and a single version resolves in both workspaces.eggpass0.1.3 → 0.1.4,eggpass-auth0.1.1 → 0.1.2, with a0.1.4CHANGELOG section covering everything sincev0.1.3.docs/releasing.mdrecords the failure mode behind the auth-first publish order.Verification (local)
cargo fmt --check,cargo clippy --workspace --all-targets --locked -- -D warnings, and the full suites in both workspaces (568 root, 32 Python) pass; the installer suite CI runs passes 58/0;cargo build --release --lockedsucceeds;cargo packageverifieseggpass-auth0.1.2.Release order
Publish
eggpass-auth-v0.1.2beforev0.1.4. Until the auth crate is on crates.io,cargo package -p eggpasscannot resolveeggpass-auth = "^0.1.2", because the packaged CLI must resolve the published crate rather than the path dependency.Not done here
No merge, tag, GitHub release, or crates.io publication is part of this change; the Python distribution stays at 0.1.2 and needs its own bump before it can be republished.