Skip to content

fix: debug-info toolchain paths over-ranked as top-value strings #203

Open

Description

@unclesp1d3r

Problem statement

On a Rust binary, the top of the ranked output is dominated by compiler-embedded debug-info source paths, all scored at the maximum:

score=100 tags=['filepath'] sec=__TEXT,__cstring '/Users/.../.cargo/registry/src/index.crates.io-.../patharg-0.4.1/src/lib.rs'
score=100 tags=['filepath'] sec=__TEXT,__cstring '/Users/.../.cargo/registry/.../tempfile-3.27.0/src/error.rs'
... (dozens more identical-shaped cargo registry paths)

These .cargo/registry/.../*.rs paths are build-machine artifacts injected by rustc (panic locations, #[track_caller], etc.). They are filepath-tagged and ranked as the single most valuable strings in the binary -- ahead of URLs, format strings, and real program data. For a triage/analysis tool this is exactly backwards: the highest-signal slots are spent on the lowest-signal strings.

(Note: this is a ranking-quality problem, not a data leak -- the paths are embedded in the binary by the compiler; stringy only surfaces them.)

Format-aware extraction should know that cargo/rustc toolchain paths in a Rust binary are boilerplate, not the interesting strings -- surfacing them at score 100 is the opposite of the tool's thesis.

Proposed solution

Down-weight build-toolchain debug-info paths so they don't crowd out genuine findings. Ideas (not mutually exclusive):

  • Recognize and de-prioritize cargo/rustc registry paths (.cargo/registry/, rustc/.../library/, /rustc/<hash>/) as a known-noise class.
  • More generally, treat repetitive same-shape filepath strings from a single toolchain root as low-value and collapse/down-rank them.
  • Revisit the filepath tag's ranking weight relative to other semantic tags.

Touches: classification (ranking weights, possibly a noise heuristic for toolchain paths).

Alternatives considered

  • Filter them out entirely: too aggressive -- embedded paths can be meaningful in malware/artifacts; down-ranking preserves them without dominating.
  • Leave ranking as-is and rely on --no-tags filepath: puts the burden on the user and also drops legitimately interesting paths.

Area

Semantic classification / ranking

Activity

  1. coderabbitai commented on Jul 5, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #118 - feat(classification): add semantic classifier for URL and domain detection [merged]
    #125 - Ranking system [merged]
    #141 - feat: Stringy v1.0 -- pipeline architecture, CLI hardening, and comprehensive testing [closed]
    #147 - docs: Improve README, CLI UX, and documentation accuracy [closed]
    #190 - feat: encoding confidence close-out for issue 22 [merged]


    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions