Skip to content

bug: Export tag over-applied to ~55% of Mach-O symbol strings #204

Open

Description

@unclesp1d3r

Problem statement

Classifying a Mach-O Rust binary tags an implausible share of strings as Export:

total rows: 47,820
tag counts: {'Export': 26,233, 'Import': 1,196, 'filepath': 977, 'b64': 11, 'Url': 8, 'fmt': 5}
rows with section == null: 26,199   # lines up almost 1:1 with the Export count

26,233 of 47,820 rows (55%) are tagged Export. A typical Rust binary exports almost nothing -- this strongly suggests local/private symbol-table entries are being classified as exports. This cuts against stringy's core thesis: "format-aware, meaningful strings, not raw strings" is undermined when more than half the output is mis-tagged symbol-table junk. The ~26k null-section rows are the same set (symbol-sourced strings carry no section, per GOTCHAS), so over-tagging is also what floods the output with section-less noise.

Proposed solution

  1. Audit how Mach-O symbols are mapped to the Export tag (via goblin): confirm we are only tagging true exported/external symbols, not all symbol-table entries (locals, debug syms, stabs).
  2. Add a regression fixture asserting a bounded, sane export count for a known binary.

Touches: container (Mach-O symbol handling), classification (Import/Export tagging).

Alternatives considered

  • Suppress the volume in output only (e.g., via the default-limit issue): hides the symptom but leaves the mislabel; downstream --only-tags Export would still be wrong.

Area

Container parsing (ELF / PE / Mach-O)

Notes

Related to the default-output-limit and ranking-noise issues, but this one is about tag correctness, not volume. Evidence gathered from target/debug/stringy (Mach-O, arm64).

Activity

  1. coderabbitai commented on Jul 5, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #125 - Ranking system [merged]
    #131 - feat(classification): add semantic pattern matching for GUID, email, base64, format strings, and user agents [merged]
    #141 - feat: Stringy v1.0 -- pipeline architecture, CLI hardening, and comprehensive testing [closed]
    #147 - docs: Improve README, CLI UX, and documentation accuracy [closed]
    #174 - feat: Import/Export symbol classification pipeline [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

    Labels

    area:analyzerBinary analyzer functionalitybugSomething isn't workinglang:rustRust implementationpriority:highHigh priority task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions