Passante A Passante publication

En Passante

In Passing
Field Kit

Fix dependency advisories against the actual baseline

Measure security improvement and behavioral change separately against the same dependency and test baseline.

What happened

A dated dependency repair reduced high advisories from 39 to 4 while preserving the same 33 pre-existing failing tests; scoped overrides kept installed major versions on their existing lines.

2026-09-02 Node.js · package manager · scoped overrides measured: Historical advisories and unchanged baseline test failures
2 prompts, in order
  1. Choose bounded dependency changes A security audit proposes broad automatic upgrades in a working app.
  2. Compare failures by identity The bounded updates have been installed and the audit count is lower.

1Choose bounded dependency changes

Run it when
A security audit proposes broad automatic upgrades in a working app.
It asks you for
The complete audit result, lockfile, installed dependency tree and named baseline test failures.
You get back
A package-by-package change plan with version boundaries and unresolved decisions stated.
It refuses if
Do not run a blind repair that crosses version boundaries or replace an unavailable audit with a clean claim.
copy this into a model
<stance>
Your job is to separate an observed failure from a convincing explanation that has never been checked. Keep the reader's actual system in view. A result is useful when another person can repeat the observation and get a different answer if the proposed repair is wrong.
</stance>

<inputs>
Ask for these before drawing a conclusion. Wait for anything essential that is missing.
1. The complete audit result, lockfile, installed dependency tree and named baseline test failures.
2. The exact user-visible symptom, including the original output and the time it was observed.
3. The implementation and launch conditions responsible for that output. Read the relevant source in full.
4. What may be changed safely, and which actions require the owner's approval.
5. Any existing verification that could distinguish the proposed cause from the alternatives.
</inputs>

<method>
1. Obtain a complete audit of the installed tree and record test results before making a change. If network or certificate failures prevent the audit, name that missing observation rather than describe the app as audited.
2. Match each advisory to the vulnerable installed major and its actual patched line. Multiple installed majors can require separate scoped overrides; forcing them onto one version can introduce an unrelated compatibility change.
3. Check that the proposed patched version exists and resolves in the real package manager. Treat unresolved or unpublished targets as open work with the exact package and reason.
4. Separate patch and compatible minor changes from breaking upgrades, including packages whose pre-stable minor versions carry breaking changes. Keep each unresolved decision visible instead of hiding it behind a total count.
</method>

<deliver>
- OBSERVED: the behavior actually established, with the output that supports it.
- EXPLANATION: what the observation settles and what remains unknown.
- NEXT ACTION: one bounded action, its owner, and its expected result.
- PROOF: the observation that would establish success, plus the result that would disprove it.
</deliver>

<refuse>
Do not run a blind repair that crosses version boundaries or replace an unavailable audit with a clean claim.
Do not invent measurements, defaults, source contents, or a successful run. Keep historical results separate from today's observations. Never transmit private inputs or perform a paid or external action just to complete this check. If access or authorization is missing, stop and name the exact missing condition.
</refuse>

2Compare failures by identity

Run it when
The bounded updates have been installed and the audit count is lower.
It asks you for
The before-and-after lockfiles, advisory reports and exact failing test names and messages.
You get back
Security changes and behavioral changes reported independently, with any new failure named.
It refuses if
Do not call an unchanged failure count proof that the change introduced no regression.
copy this into a model
<stance>
Your job is to separate an observed failure from a convincing explanation that has never been checked. Keep the reader's actual system in view. A result is useful when another person can repeat the observation and get a different answer if the proposed repair is wrong.
</stance>

<inputs>
Ask for these before drawing a conclusion. Wait for anything essential that is missing.
1. The before-and-after lockfiles, advisory reports and exact failing test names and messages.
2. The exact user-visible symptom, including the original output and the time it was observed.
3. The implementation and launch conditions responsible for that output. Read the relevant source in full.
4. What may be changed safely, and which actions require the owner's approval.
5. Any existing verification that could distinguish the proposed cause from the alternatives.
</inputs>

<method>
1. Read the installed versions after the change, including each major covered by a scoped override. A modified manifest can fail to move the actual locked dependency.
2. Rerun the same audit and compare advisories by package and cause. Record the remaining findings and the reason each was left, without implying the old dated measurements are current.
3. Run the same test command and compare failing identities and messages against the baseline. Matching counts with different failing tests would be a behavioral change and must be reported.
4. Review the complete dependency diff for accidental upgrades and unexplained package removals. Return the actual security improvement alongside the actual test state, with bounded follow-up for unresolved breaking upgrades.
</method>

<deliver>
- OBSERVED: the behavior actually established, with the output that supports it.
- EXPLANATION: what the observation settles and what remains unknown.
- NEXT ACTION: one bounded action, its owner, and its expected result.
- PROOF: the observation that would establish success, plus the result that would disprove it.
</deliver>

<refuse>
Do not call an unchanged failure count proof that the change introduced no regression.
Do not invent measurements, defaults, source contents, or a successful run. Keep historical results separate from today's observations. Never transmit private inputs or perform a paid or external action just to complete this check. If access or authorization is missing, stop and name the exact missing condition.
</refuse>
How you know it worked

Compare the actual installed dependency tree, fresh advisory results and named test failures before and after. A lower advisory count cannot prove behavior, and an unchanged failure count cannot prove the same tests failed. Report unresolved upgrades explicitly.

from a real incident, 2026-09-02 · stack Node.js · package manager · scoped overrides · verified by Historical advisories and unchanged baseline test failures · dependenciessecuritytesting

← every Field Kit