Repository navigation
radar: skip intra-project paths, Ada units, Dockerfile stages, Python stdlib (Part of #4547, #4982) - #5027
Merged
Conversation
…, Python stdlib suspects (Part of #4547, Part of #4982) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
6 tasks done
Owner
Author
|
No description provided. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
../math/Vector2.js).//../token is a project path; flagged before the prefix is stripped, any language.ads/.adb(alire-roots.ads->alire) or an Ada standard root--from=<stage>ASstage set (all Dockerfiles, read lazily from disk via the language'sclass_start), plus numeric indexes; undeclared names stay eligiblebuiltins,ubinascii)standards/stdlib_modules.py; orphan side only, sorequestss/jsonnstill fireGolden:
typosquat_hits17 -> 11 in both fixtures; alerts removed are exactly threejs x2 (Vector2/4.js),Alire/Roots, mobyregistry,ubinascii, numpybuiltins. 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.pystill 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