r/devtools • • 5d ago

Strand-dependency/impact analysis engine

Strand - what it does

Strand is a command-line tool and desktop app for analyzing dependencies and bugs in source code. It builds a graph of how code connects - which files import which, which functions call which - and answers questions like "what breaks if I change this?" or "can user input reach a dangerous call?"

Two modes:

  1. Dependency scanning (strand scan) - fast, static. Walks a project directory, reads imports/manifests/lockfiles across Rust, Python, JavaScript/TypeScript, and Go (plus ~25 lockfile formats and config files), and produces a .strand graph file you can query: impact analysis, "why does A depend on B" paths, cycle detection, build ordering, risk ranking. All deterministic, scriptable JSON output, sub-second on large repos.
  2. Deep analysis (strand deep) - slower, deeper. Runs the same scan, then adds interprocedural analysis: it tracks values across function boundaries through a call-graph solver and reports concrete findings with evidence: Findings include the call path and a confidence score, and the tool honestly reports what it couldn't resolve rather than guessing.

    • Taint flows - untrusted data (env vars, HTTP input, file contents) reaching dangerous sinks (shell commands, SQL queries, eval)
    • Null/None/nil/Option bugs - values that may be empty reaching dereferences or unwraps
    • Resource leaks - opened files/sockets/locks that escape without closing

Key properties: fully offline, no build step or compiler needed, no cloud, no account. Source/sink definitions are plain TOML files you can extend. Everything is a Rust library too - strand-core for graph algorithms, strand-deep for the analysis engine - so it embeds into other tools.

Who it's for: developers auditing a codebase for dependency risk or security bugs without setting up heavyweight tooling (CodeQL, Infer, language servers), and teams who want dependency/impact questions answered from the CLI or a desktop GUI in seconds.

Install: cargo install strand-cli (CLI) or cargo install strand-gui (GUI), cargo install strand-gui strand-clifor both or grab prebuilt binaries from GitHub Releases.

1 Upvotes

6 comments sorted by

1

u/kantorcodes1 5d ago

The part that stood out to me in strand deep is that it says what it could not resolve instead of guessing. When a taint path runs through a dynamic call it cannot follow, does the finding get dropped, or reported with lower confidence?

1

u/B33TheCoder 3d ago

Good question - it's neither dropped nor down-ranked, it's handled a third way.

When the analyzer hits a call it can't resolve, taint keeps flowing through it conservatively: any tainted argument makes the return value tainted under a call:name label. So subprocess.call(transform(os.environ["X"])) still produces a finding even if transform is a dynamic dispatch or reflection call - the source just reads call:transform instead of src:Env, so the degraded provenance is visible in the output rather than hidden.

Confidence scores are unchanged (direct hits 100%, interprocedural 90%, leaks/null-derefs 80%) - the honesty lives in the source label and the stats, not the number.

Every function that touched an unresolvable call gets counted in a "blind spots" line in the output, and unresolved dynamic imports are listed by name. That count is the real signal for how much of a result rests on conservative propagation vs. resolved paths.

The deliberate tradeoff: this can false-positive (a sanitizer hiding behind dynamic dispatch won't stop taint) but shouldn't false-negative. May-analysis errs toward reporting.

If you're seeing call: sources dominate a report, that's the cue that the codebase is too dynamic for static resolution - the findings are still real taint paths, just with an unverifiable middle hop.

1

u/kantorcodes1 3d ago edited 3d ago

The blind spots count does it. Most tools would drop the paths they could not resolve and look surer than they are.

Strand belongs in Tools & Integrations in HOL's awesome-ai-plugins catalog. Here's your line, ready to paste:

  • Strand - Rust CLI that maps how a codebase connects and tracks taint from untrusted input to dangerous calls, labeling the findings it could not fully resolve instead of guessing. <!-- platform: standalone -->

Open a PR with that line and Strand is in. The contributing guide has the format details: https://github.com/hashgraph-online/awesome-ai-plugins/blob/main/CONTRIBUTING.md

1

u/B33TheCoder 3d ago

Alright thank you. I will.

1

u/kantorcodes1 1d ago edited 1d ago

Leaving this here for when you have a minute, no rush at all. The Strand entry goes in the catalog README under Tools & Integrations, in your own words, and this guide covers the format: https://github.com/hashgraph-online/awesome-ai-plugins/blob/main/CONTRIBUTING.md

Happy to help if any part of it is unclear.

2

u/B33TheCoder 14h ago

My bad, I've been really busy these past few days I will add it in a few minutes. Thank you for the reminders.