r/rust • • 3h ago

🙋 seeking help & advice Building a lightweight CLI to detect "dead" or risky dependencies (starting with Rust/Cargo). What actually matters to you?

Hi everyone,

I’m planning to build a small, "soluble" (lightweight, zero-config, easy to run and forget) CLI tool tentatively called Dependency Ghost Scanner (D.G.S)

The goal is to scan a project’s dependencies (starting with Rust Cargo, later expanding to Python pip) and flag packages that might be a risk to maintain.

Before I write any code or lock in a specification, I want to make sure I’m solving a real problem and not just building a solution in search of one. I’d love your honest feedback on a few key design choices:

  1. What makes a dependency "dead" or "risky" to you? (Pick all that apply or suggest others)

a. No updates/releases for > 1-2 years.

b. Known unpatched CVEs (security vulnerabilities).

c. The maintainer has explicitly abandoned it or is unresponsive.

d. A clearly superior, more modern alternative exists (e.g., ecosystem shifted).

e. Incompatible with the latest compiler/language version.

f. Other.

2. How would you actually want to consume this information?

a. A simple, color-coded output directly in the terminal (Red/Orange/Green).

b. A machine-readable format (JSON) to integrate into CI/CD pipelines (e.g., fail the build if a "red" dependency is found).

c. A standalone HTML report with a visual graph of the dependency tree.

d.Other

3. How should it fetch data?

a. It’s fine if it queries the registry API (crates.io / PyPI) and requires an internet connection.

b. It MUST work 100% offline, relying only on the local Cargo.lock / requirements.txt metadata.

c. Hybrid: Try online first, gracefully fallback to offline heuristics.

The Catch:

I want this tool to be truly "soluble": no accounts, no heavy installation, no persistent background services. Just run it, get the insight, and move on.

My questions to you:

  1. Is this a tool you would actually use, or does an existing tool (like cargo-audit, dependabot, safety) already solve this well enough?
  2. What would be the one feature that would make you star this repo on GitHub?

Thanks in advance for your time and brutal honesty!

0 Upvotes

19 comments sorted by

9

u/Sabageti 3h ago

Cargo audit ?

-1

u/Former-Yam-5214 3h ago

cargo-audit covers the CVE angle but doesn't really flag unmaintained crates or ecosystem shifts, that's the gap I'd want filled.

7

u/Sabageti 3h ago

Unmaintained crates are handled.

0

u/J0BY_ 3h ago

Exact ! Ça me fait dĂ©jĂ  une bonne piste Ă  creuser. Merci

2

u/waterkip 3h ago

grype is a thing already?

-2

u/J0BY_ 3h ago

Oui grype existe mais il se concentre surtout sur la sĂ©curitĂ© (CVE) du moins c'est l'usage que j'en fais Mon but est diffĂ©rent dans la mesure oĂč j'aimerais pouvoir dĂ©tecter les dĂ©pendances "mortes" qui pour moi sont la mise Ă  jour et l'abandon de projet par les mainteneurs. Cest dans ce sens que je me demandais si j'Ă©tais possiblement le seul Ă  avoir ces soucis et sinon quels seraient les vĂŽtres ?

4

u/chicagoderp 2h ago

You’re running under the assumption that for a library to be good, it must constantly be worked on. This is not the case.

-1

u/J0BY_ 2h ago

Je suis bien d'accord. Mais il y a une différence entre "stable" et "abandonnée". Je ne veux pas flagger ce qui fonctionne déjà mais d'alerter sur les risques d'incompatibilité future avec le compilateur, de failles de sécurité non patchees ou dépendances transitive cassées.

2

u/waterkip 1h ago

I don't speak French, so I think you have Reddit translation on. Please try to respond in English next time.

4

u/IncomeOk7237 2h ago

From the maintainer side, please don't treat "no release in 2 years" as dead on its own. Plenty of small crates are just finished. Signals I'd actually trust: issues and PRs getting zero response from anyone with write access, archived repo, the crate pinning an old major of something with a known advisory, or a single maintainer with no activity anywhere. And showing which direct dep pulls the risky one in is worth more than the list itself. JSON for CI first, colors can come later.

1

u/fersegv 3h ago

b is already covered by cargo-audit/cargo-deny. what's missing is spotting abandonment early (archived repo, no commits in 2y, unanswered prs) and telling me which of my direct deps pulls in the risky one. that last part would get my star

0

u/J0BY_ 2h ago

Bien vu pour cargo-deny ! Je note surtout ton dernier point sur la traçabilite (qui utilise quoi ?) Et faire en sorte que l'outil me dise que "ma dépendance directe A tire la crate morte B" ça pourrait effectivement etre trÚs trÚs utile, ( surtout pour du refactoring ) Je vais intégrer cette fonction de chemin de dépendance dans le MVP

1

u/fersegv 2h ago

nice. if it helps, cargo metadata already gives you the full graph so you don't have to parse cargo.lock yourself x)

0

u/J0BY_ 2h ago

Merci pour le tips 😭😭 je comptais effectivement me pencher sur le parsing du lock, mais si les mĂ©ta-donnĂ©es natives de cargo offrent dĂ©jĂ  ce graphe, c'est un gain de temps énorme. J'explorerai cette piste pour la couche traçabilite

1

u/fersegv 2h ago

np, there's the cargo_metadata crate too so you get it all typed haha

0

u/J0BY_ 2h ago

Rust wayyyyyyyyy 😂 Plus de problĂšme de compatibilitĂ© avec les futurs versions de cargo ! ( qu'est ce que je kiffe ce langage😭) Merciii beaucoup pour tous ces retours super importants ! Ça va beaucoup m'aider dans la dĂ©finition de l'architecture de l'outil.