Skip to content

0.3.1: security and data-loss fixes from the post-launch audit - #1

Open
cloudhobbit wants to merge 3 commits into
mainfrom
fix/0.3.1
Open

cloudhobbit wants to merge 3 commits into
mainfrom
fix/0.3.1

Conversation

@cloudhobbit

Copy link
Copy Markdown
Owner

Fixes from the post-launch audit. 0.3.0 was never published to npm, so 0.3.1 becomes the first npm release.

Security

  • GitLab token followed redirects to other hosts. It's now sent as Authorization: Bearer, which fetch drops on a cross-origin redirect. A regression test uses two real local servers.
  • GITLAB_TOKEN was sent to any GitLab-looking host named in origin. It now goes only to gitlab.com, to GITLAB_HOST, or to the GitLab CI job's own instance.
  • --api-url on an unrecognised host received GITHUB_TOKEN. Such hosts now get the enterprise tokens only.

Data loss and correctness

  • Incremental fetches lost old comments that were edited after the previous fetch started, and the reviews of PRs updated during a --time-budget pause. They now keep everything created in the window.
  • GitLab corpora are stamped with the fetch's start time, not its end.
  • The MCP server hung for good when the index-builder child process died.
  • rules status falsely flagged no-recent-support.
  • run --demo started a real run.
  • run --format agents|cursor and export overwrote each other.
  • $ in rule text was mangled when managed blocks were rewritten.
  • --llm rules lost their cited examples.
  • Rule file names could end in -, and the tool couldn't read them back.
  • generate didn't record the rules it wrote.
  • Smaller fixes:
    • ssh.github.com and :443 remotes are treated as github.com;
    • owner/repo names match case-insensitively;
    • GitHub Enterprise and GitLab PR links in rule sources are read.

Each fix has a regression test (375 → 386 tests). The evals are unchanged, and audit:all and claude plugin validate pass. See the CHANGELOG [Unreleased] section.

🤖 Generated with Claude Code

cloudhobbit and others added 3 commits October 28, 2026 11:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GitLab: send the token as `Authorization: Bearer`, which fetch drops on
  a cross-origin redirect; PRIVATE-TOKEN followed an SSO/proxy redirect.
- GitLab: GITLAB_TOKEN / GITLAB_ACCESS_TOKEN go only to gitlab.com, the
  host in GITLAB_HOST, or the GitLab CI job's own instance, not to any
  GitLab-looking host a checkout's origin names.
- GitHub: a host that isn't recognisably github.com or GHE.com (an
  --api-url on an intranet name) gets the enterprise tokens, never
  GH_TOKEN / GITHUB_TOKEN.
- ssh.github.com and :443 normalise to their host.

Found in the post-launch audit; each has a regression test (the redirect
one with two real local servers).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Incremental fetches keep everything created in the window (keepSince),
  not only since the last fetch: old comments edited, and PRs first
  listed (e.g. updated during a --time-budget pause), after the previous
  fetch started were dropped for good.
- GitLab corpora are stamped with the fetch's start time.
- The MCP index child always settles: one killed by a signal or OOM made
  every later call for the repo hang.
- rules status: no top-50 cut before the window/path filters.
- run --demo runs the demo; other commands refuse --demo (it was ignored
  and a real run started).
- AGENTS.md: the generator and `export` use separate markers; cursor
  --force skips files export wrote.
- "$" in rule text stays literal when managed blocks are rewritten.
- --llm rules use the parsed examples heading; slugs never end in "-";
  generate records its rules in the manifest.
- Case-insensitive owner/repo matching; rule sources read GHES/GitLab
  PR links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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