Skip to content

Security review fixes, a single eggfetch-core 0.4.1, and 0.1.4 release prep - #12

Merged
dbowm91 merged 10 commits into
mainfrom
fix/pypi-classifiers-0.1.1
Nov 30, 2026
Merged

dbowm91 merged 10 commits into
mainfrom
fix/pypi-classifiers-0.1.1

Conversation

@dbowm91

@dbowm91 dbowm91 commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Prepares the 0.1.4 release and lands the security-review corrective work.

Security review (F1–F5)

  • F1 server: refuse ambiguous request framing — the body framing is decided before anything is written or read, so a malformed announcement is no longer answered with 100 Continue and its bytes cannot prefix the next request. Refuses an unparseable or conflicting Content-Length, Content-Length alongside Transfer-Encoding, and any coding list other than exactly chunked; equal duplicates are still accepted.
  • F4 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_RCVTIMEO armed per read from the reading handle, and body buffers that grow with bytes received. Adds server.head_timeout_seconds (60) and server.body_stall_timeout_seconds (120).
  • F3 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.
  • F2 ci: pin publish actions to commit SHAs — 18 references across the three publish workflows.
  • F5 cli: accept editor arguments in EDITOR and VISUAL.

Release prep

  • One eggfetch-core 0.4.1 across the CLI, eggpass-auth, and the vendored Python snapshot. eggup-eggfetch 0.2.2 accepts ^0.4.0, so no Eggup bump was needed and a single version resolves in both workspaces.
  • eggpass 0.1.3 → 0.1.4, eggpass-auth 0.1.1 → 0.1.2, with a 0.1.4 CHANGELOG section covering everything since v0.1.3.
  • Docs: the README documentation table links the EggPool guide; docs/releasing.md records 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 --locked succeeds; cargo package verifies eggpass-auth 0.1.2.

Release order

Publish eggpass-auth-v0.1.2 before v0.1.4. Until the auth crate is on crates.io, cargo package -p eggpass cannot resolve eggpass-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.

- 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.
@dbowm91
dbowm91 merged commit f4aecc3 into main Nov 30, 2026
141 of 151 checks passed
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.

1 participant