Skip to content

radar: skip intra-project paths, Ada units, Dockerfile stages, Python stdlib (Part of #4547, #4982) - #5027

Merged
squid-protocol merged 3 commits into
mainfrom
churn/4982-typosquat-nonpackage
Oct 13, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
churn/4982-typosquat-nonpackage

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4547. Fixes four of the six boxes of #4982 (not "Closes": Java/Groovy and mainframe boxes stay open).

Design: before the radar compares names, decide whether the token resolves to the project itself or the language stdlib.

Box Handled Mechanism
Intra-project relative paths (../math/Vector2.js) yes .//../ token is a project path; flagged before the prefix is stripped, any language
Ada child units of the project's own hierarchy yes first segment is a root of a project .ads/.adb (alire-roots.ads -> alire) or an Ada standard root
Dockerfile --from=<stage> yes project-wide AS stage set (all Dockerfiles, read lazily from disk via the language's class_start), plus numeric indexes; undeclared names stay eligible
Python/MicroPython stdlib (builtins, ubinascii) yes new frozen standards/stdlib_modules.py; orphan side only, so requestss/jsonn still fire
Java/Groovy class names no needs a per-file package map; different mechanism
JCL/PLI dataset/include names no not packages in any registry; needs a no-registry language gate

Golden: typosquat_hits 17 -> 11 in both fixtures; alerts removed are exactly threejs x2 (Vector2/4.js), Alire/Roots, moby registry, ubinascii, numpy builtins. Groovy, JCL and PLI alerts remain; no real typosquat lost. Other changed fixture files (gpu_json, graph_sqlite, llm_brief, homoglyph counts) are the same six files' rollups.

Tests: tests/core_engine/test_typosquat_nonpackage_4982.py (257 cases: whole stdlib list parametrized, prefix/extension grid, Ada with/without root file, Dockerfile same-file/sibling/numeric/undeclared, still-fires controls); 237 fail on origin/main code. test_typosquat_radar_4547.py still passes.
Gates: pr_gates --fast 5/5, --ratchets 7/7 (0 skipped); crucible_check --update both legs; scope_check attributes the diff to ada/dockerfile/javascript/python/embedded_python (rollup fields unattributed = those same files).

Cross-repo: none.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 13, 2026 08:06
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 13, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 13, 2026 13:00
@squid-protocol
squid-protocol merged commit dd87709 into main Oct 13, 2026
42 checks passed
@squid-protocol
squid-protocol deleted the churn/4982-typosquat-nonpackage branch October 13, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant