---
name: devupdate-low-trust-review
description: Review a project's low-trust dependencies with DevUpdate.io trust scores and decide, package by package, whether the project needs each one. Removes what nothing imports, replaces what the standard library or an existing dependency already covers, inlines what is small and narrowly used, and records a reasoned keep for the rest, which holds for six months or until the package's trust score falls. Use when the user asks to review, reduce or clean up dependencies, to cut low-trust or poorly maintained packages, to shrink the dependency tree, or asks "do we really need this package?". Requires the DevUpdate.io MCP server (https://api.devupdate.io/mcp).
---

# Low-trust dependency review

Many dependencies earn their place. Some are a tiny package doing one narrow
thing that the project could do in a few lines of its own, or that the
platform now does natively. Each one is still a supply-chain link someone
else controls. This skill finds the ones worth questioning and drives each to
a decision: **removed, replaced, inlined, or kept with a reason**.

DevUpdate.io supplies the part you cannot cheaply compute: a trust score for
each package (0 to 100), blended from OpenSSF Scorecard, deps.dev, GitHub and
registry signals with an OSV advisory penalty, plus the lockfile's dependency
graph (which packages are direct, which direct dependency brings in each
transitive one, and how many packages leave the tree when a direct one goes).
What it never sees is your code, so how the project *uses* a package is yours
to establish, with the working tree in front of you.

A low score is a reason to look, never a verdict. A niche but well-made
library can score low because it has no Scorecard report and few stars; the
review exists to tell that apart from a stale one-function package.

## Workflow

> **If the low-trust listing isn't working, diagnose accurately.** It is
> `get_security_issues` with `trust_below`. Load the tool by name first;
> clients expose MCP tools lazily, so an unloaded tool looks missing but
> isn't. A call that *errors* ("scope does not allow…", expired token, plan
> gate, transport/5xx) is the connection or plan: name it and point the user
> at the connector's auth or devupdate.io/pricing. A server that predates the
> low-trust review does not reject `trust_below`: it drops the argument
> without a word and answers with its security audit, so a reply about
> security issues or advisories rather than low-trust dependencies means the
> user's DevUpdate.io connection needs updating. Either way, stop and report
> the real reason rather than reviewing from guesses.

### 1. Scope to the repo and pull the list

Your token covers the whole account. Read the repo's identity with
`git remote get-url origin` and pass only its owner and name as
`repo="owner/name"`, never the URL (a remote URL can carry a credential):

```
get_security_issues(repo="owner/name", trust_below=40)
```

**Check the reply before using it.** It must be about low-trust
dependencies: every low-trust reply says "low-trust", whether it lists them,
says none is left, or says nothing in scope is checked. A list of open
security issues instead comes from a server that dropped `trust_below` (see
the callout above): stop there. Then check that the scope was honored: every
scoped reply says `in repo owner/name`, an empty one included. If no line
says so, the server answered for the whole account: work only from the
sections whose header names this repo, and tell the user their DevUpdate.io
MCP server needs updating.

40 is the Low band. Use another threshold only when the user names one,
e.g. `get_security_issues(repo="owner/name", trust_below=60)`: a higher bar
lists more packages, and every package listed costs a review.

Read the coverage notes before the list. Packages with no current trust score
are counted, not listed: they are unreviewed, not trusted. Packages dismissed
after an earlier review are hidden, and that is the point: do not ask for
them back (`include_dismissed=True`) unless the user wants the past decisions.

### 2. Triage in cost order

The expensive part of this review is reading code. Spend it where a change is
possible:

1. **Direct dependencies first.** They are the only ones the project can
   remove. Each line says how many packages leave the tree with it; a `0`
   means another direct dependency also needs it, so removing it from the
   manifest changes nothing installed.
2. **Transitive packages** are grouped under the direct dependency that
   brings them in (`via express`). The question is about that parent: is the
   parent itself worth keeping? If yes, the low-trust package stays with it;
   note it and move on. Do not reach for an override to evict a transitive
   package for minimization's sake; overrides are a security tool.
3. **No graph** (yarn, Poetry and other formats say so in the header, and so
   does a pnpm lockfile until its graph is read on the next sync),
   or a package counted as "not known to be either": read the manifests
   (`package.json` and each workspace's, `pyproject.toml`, …). A package none
   of them declares is transitive; treat it as in step 2.
4. **Reopened** packages were kept before. Either their score has since
   fallen, or the keep is six months old and due for another look (the
   line says which). Read the earlier reason first and check only what
   changed (an archived repo, a new advisory, no release in years, a usage
   that grew or shrank), not the whole usage again. Still worth keeping:
   dismiss it again with an updated reason, which keeps it for another six
   months. Asking again is the point: a keep made in passing should not
   last forever.

### 3. For each direct candidate, establish usage

Cheapest check first, and stop as soon as the outcome is clear:

1. **Is it used at all?** Search for imports and requires of the package name.
   Also check places a name appears as a string rather than an import: the
   manifest's scripts and `bin` usage, build and lint configs (plugins and
   presets are referenced by name), type-only packages, and runtime plugin
   loading. No hit anywhere means **remove**.
2. **What exactly is used?** List the imported symbols and count the call
   sites.
3. **Only if that surface is small**, read the installed package's own source
   (`node_modules/<name>`, the virtualenv's `site-packages/<name>`) for the
   functions the project calls, to see what replacing them would really take.

### 4. Decide

| Outcome | When |
|---|---|
| **Remove** | Nothing uses it (step 3.1). |
| **Replace with the platform** | The language or runtime now does it: `String.prototype.padStart` for a pad helper, global `fetch` on current Node for a fetch polyfill, `structuredClone` for a deep-clone helper, `Array.prototype.flat`, `Object.fromEntries`, Python's `pathlib`, `dataclasses`, `functools.cache`. Check the project's minimum runtime version first. |
| **Use a dependency already present** | Another direct dependency the project keeps already provides it. Never add a new dependency to replace one. |
| **Inline** | The used surface is small, pure and stable: a few dozen lines you would be glad to own. Write it with tests for the cases the code relies on (port the package's own tests where they exist). If you copy code rather than rewrite it, keep its license notice (MIT, ISC and BSD require the copyright line). |
| **Keep** | Everything else, and always the never-inline list below. |

**Never inline**, whatever the score: cryptography and hashing for security,
authentication, sessions and tokens, parsers of untrusted input (URLs, HTML,
YAML, XML, multipart, archives), sanitizers and escaping, date, time zone and
calendar logic, Unicode and locale handling, network protocol clients. A small
dependency there carries expertise you do not want to re-derive. If the score
worries you, the move is a better-maintained alternative, not your own copy.

### 5. Make the changes as one PR

- Remove packages with the project's package manager (`npm uninstall`,
  `pnpm remove`, `yarn remove`, `uv remove`, `poetry remove`) so the
  lockfile is regenerated, never by editing the lockfile by hand.
- Run the project's build, type check and tests after the changes. A
  removal that only fails at runtime (a plugin loaded by name) is exactly
  what step 3.1 tries to catch; the test run is the backstop.
- Put a table in the PR description:

  | Package | Trust | Outcome | Evidence |
  |---|---|---|---|
  | left-pad | 22 | Replaced with `padStart` | `src/format.ts:14`, the only call site |

Removed packages need nothing further: the next lockfile sync drops them from
the review on its own.

### 6. Record the keeps

Show the user the packages you recommend keeping, each with its one-line
reason, and record the ones they agree with:

```
dismiss_low_trust_dependencies(repo="owner/name", packages=["yaml"], reason="Parses user-supplied config in 9 places; never inline a parser")
```

One call per shared reason. A package with no current trust score is not
recorded (the reply names it): a dismissal is measured against the score, and
such a package is not in the listing anyway. Make the reason specific enough
that whoever
reads it when the package reopens can check it quickly: where it is used, and
why it stays. A dismissal holds until the package's trust score falls 10 or
more points below its score today, or for six months, whichever comes
first; then the package comes back marked reopened, with this reason
attached. To bring one back sooner:

```
dismiss_low_trust_dependencies(repo="owner/name", packages=["yaml"], restore=True)
```

Recording a keep needs its own permission on the connection. If the call is
refused with "scope does not allow", the connection was approved before that
permission existed: tell the user to reconnect DevUpdate.io and approve it,
and list the keeps in your report so nothing is lost meanwhile.

### 7. Report

Summarize for the user: how many low-trust dependencies were reviewed, what
was removed, replaced or inlined (with the PR), what was kept and recorded,
and what was out of reach (transitive packages whose parent stays, packages
with no current score).
