Skip to content

fix: alias slugs, .pi untracking, release scan tuning, API key settings follow-ups - #96

Merged
mrgoonie merged 9 commits into
mainfrom
sx-bugs-47-49-61-79
Oct 20, 2026
Merged

mrgoonie merged 9 commits into
mainfrom
sx-bugs-47-49-61-79

Conversation

@mrgoonie

@mrgoonie mrgoonie commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Tests

pnpm typecheck clean, pnpm --filter web build ok. New: api.alias-slug-routes.test.ts, extended release-scan.test.ts, release-budget-order.test.ts, user-api-keys-route.test.ts, api-key-settings.test.ts. The full suite passes except packages/cli/src/lib/git-tree-tar.test.ts, which timed out in a hook in one run and passed in another (untouched by this PR).

Review follow-ups

  • Oversized (>4 MiB) BOM-marked UTF-16 is now quarantined (danger:text-too-large) instead of slipping past the raw-byte secret scan.
  • Syntax relaxation applies only to licence files (upper-case LICENSE/LICENCE/COPYING/NOTICE/AUTHORS, optional upper-case -MIT/-APACHE-2.0 style suffix, .txt/.md/.markdown only; never binaries; a licence file is always also an instruction document); every other licence-like name (NOTICE-install, LICENSE_MIT, PATENTS, license, ...) and every .txt keeps every rule. A latin-1 licence file is instruction-scanned under both its lossy UTF-8 and latin-1 readings; invalid-UTF-8 markup (incl. LICENSE.md) is quarantined as non-utf8-text.
  • Lone UTF-16 surrogates rejected via isWellFormed(); MZ binaries under scripts/ need a real PE header; secret windows open one byte early and ignore a match at that extra byte; a match ending exactly at a non-final window edge is left to the next window, but only when it lies wholly in the overlap (long tokens that began earlier still count).
  • resolveSkillIdsBySlugs tested against a real migrated SQLite DB.
  • Same-origin guard for favorite/vote/rate/review tracked in fix(web): same-origin check on cookie-authenticated mutations (favorite, vote, rate, review) #101.
  • .pi/ has left HEAD but stays in git history; history is intentionally not rewritten.

Closes #47
Closes #49
Closes #61
Closes #79

🤖 Generated with Claude Code

mrgoonie and others added 9 commits October 20, 2026 09:02
… usage routes

Closes #47

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Closes #49

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…efore scan

Closes #61

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Closes #79

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ndow edges

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…indow-edge false positives

A licence file that is not valid UTF-8 skipped the instruction scan entirely.
It is now decoded lossily and scanned; markup such as LICENSE.md never gets the
latin-1 allowance and is quarantined as non-UTF-8 text.

A secret token ending exactly at a non-final window edge was matched because
the end of the string acted as a word boundary; those matches are now left to
the next window, which sees the following bytes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ence names, keep long tokens at window edges

A non-UTF-8 licence file is now scanned as lossy UTF-8 and as latin-1 (soft
hyphens removed), so NBSP or soft-hyphen tricks that only a latin-1 reader
sees no longer slip past the instruction scan.

Only a match lying wholly inside the window overlap is treated as a cut
artifact; a long secret that began before the overlap is still reported.

Licence names are upper-case LICENSE/LICENCE/COPYING/NOTICE/AUTHORS with an
optional upper-case suffix and .txt/.md/.markdown; free suffixes such as
NOTICE-install or LICENSE.rst keep every rule.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nical names

Licence-like names in any spelling (NOTICE-install, LICENSE_MIT, PATENTS,
license) are instruction documents again, so injection, shell/URL syntax and
non-UTF-8 text are all checked. Only the canonical upper-case names get the
syntax and latin-1 exemptions.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A licence file is always an instruction document, and the canonical licence
suffix is narrowed to a subset of the broad licence-like pattern, so a name
such as LICENSE-GPL.V2 can no longer get the latin-1 allowance without a
content scan.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment