Files
PaperClipAI/packages
nguyenm7andClaude Opus 5 66c26bce37 fix(skills-catalog): close two holes in the discovery address guard
Ran the guard from safe-discovery.md against 41 executed cases and found two
addresses it allowed that it documents as refused.

fec0::/10 site-local was allowed. The link-local rule matches fe80-febf
(`(b[1] & 0xc0) === 0x80`); fec0-feff fell through every remaining rule and
reached `return null`. Deprecated by RFC 3879, still carried on internal
networks, so it now returns "site-local".

The 2001:db8::/32 documentation rule was dead code. It tested
`(b[2] & 0xfe) === 0x0d`, and `x & 0xfe` always clears the low bit, so an odd
0x0d is unsatisfiable for every one of the 256 possible byte values. The
equivalent IPv4 documentation ranges were already refused, so this was an
inconsistency the mask hid. Matched exactly now.

Verified by extracting the guard from the markdown and executing it: 41/41,
36 refusals and 5 allows. The allows (google.com, wisdom-api.enterpret.com,
8.8.8.8, 2607:f8b0:4009:812::200e, 2600::1) are in the same pass so the
refusal list is not just an over-blocking guard. Both new refusals and the
obfuscated 2130706433 / 0x7f.0.0.1 loopback forms are now documented with
their real output.

Manifest regenerated: only safe-discovery.md's sizeBytes/sha256, its skill
contentHash and generatedAt move. Positive control first — regenerating
before this edit reproduced the committed catalog.json byte-for-byte.
validate-catalog clean, package suite 20/20.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 21:28:52 +00:00
..