r/devtools • u/B33TheCoder • 7d 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:
- 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.strandgraph 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. 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.
View all comments
Show parent comment
1
u/B33TheCoder 6d 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:namelabel. Sosubprocess.call(transform(os.environ["X"]))still produces a finding even iftransformis a dynamic dispatch or reflection call - the source just readscall:transforminstead ofsrc: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.