Mitigation guidance
Use this guide when Guard blocks or flags a dependency and you need to recover safely. The order is: confirm the finding, fix the dependency, and only then consider an exception.
1. Confirm the findingDirect link to 1. Confirm the finding
Re-run the decision for the exact package version, then look at the workspace as a whole.
hol-guard supply-chain explain <package>@<version> --ecosystem <ecosystem>
hol-guard supply-chain scan --json
explain shows the advisory evidence and the ecosystem coverage behind the verdict. --ecosystem is npm (the default), pypi, cargo, go, maven, packagist, or rubygems. If the advisory data on the machine is old, run hol-guard supply-chain sync first. See Supply chain and package advisories for what each command reads and sends.
Check the ecosystem label too. A Protected ecosystem can be blocked before the install runs. A Beta or Monitor-only ecosystem is inspected or recorded, so a missing block there is not proof that a package is safe.
2. Prefer the fixDirect link to 2. Prefer the fix
- Upgrade to the recommended safe version.
- Re-run the install through Guard.
hol-guard protect -- npm install <package>@<safe-version>
hol-guard protect --dry-run -- <install command> previews the verdict without running anything.
3. Handle a verified false positiveDirect link to 3. Handle a verified false positive
Only after you have verified the finding is wrong:
- Approve the narrowest scope that works. Allow the held install once first, from the Inbox or with
hol-guard approvals approve <request-id>. Save a This project approval only when the same install will keep recurring. - For an allowance that must be recorded, owned, and expire, request a Cloud exception, or save a local rule with
--expires-in-hours. See Exceptions and expiring windows. - Re-run the blocked command through Guard to confirm it now behaves as intended.
Avoid broad or permanent exceptions. Remove a temporary one as soon as the upstream data is corrected. hol-guard exceptions lists the ones that have an expiry.
Package approval reuseDirect link to Package approval reuse
A saved This project approval is portable only between linked Git worktrees of the same repository whose package execution context is identical. Guard binds the decision to:
- the repository identity and the workspace-relative location,
- the package manager executable,
- manifests and lockfiles,
- registry and proxy settings,
- lifecycle hooks, overrides, patches, and workspace configuration,
- the environment policy that applies.
The approval card names the component that changed when Guard asks again. Guard ignores approvals saved by the earlier portable format. It limits the decision to This retry only when a required input is unreadable, unsupported, oversized, a symlink, or loaded dynamically. That can add a prompt for unusual package-manager setups or projects with local lifecycle hooks, and it keeps an incomplete context from widening an old approval. Registry credentials and configuration values are never stored in approval evidence. Only digests and safe component labels are kept.
Private and unpublished packagesDirect link to Private and unpublished packages
Guard pauses a package it cannot identify in a Protected or Beta ecosystem, instead of treating a record-only result as permission to install. To approve a private package:
- Configure the private registry in the package manager's project-scoped configuration, such as
.npmrc,pip.conf, or the manager's equivalent. - Review the exact package request.
- Save a This project approval when that is appropriate.
The approval stays bound to the ecosystem and normalized package name, the source, the requested and resolved versions, the package manager, and the fingerprinted execution context. A change to the registry, proxy, credential policy, executable, manifest, lockfile, or a hook makes Guard ask again. Secret registry values are hashed before they enter the context evidence.
4. Keep the trailDirect link to 4. Keep the trail
Guard records each decision as a receipt, and package decisions also appear in the local dashboard under Evidence. Use hol-guard receipts and hol-guard history explain <receipt-id> to review what was blocked and what you approved. See Receipts, changes, and history.
5. Recover a package-manager shimDirect link to 5. Recover a package-manager shim
Start in the local dashboard's Supply chain page and its Package Firewall panel. When the daemon is paired, the panel can protect, repair, test, audit, sync, or remove package-manager shims.
From the terminal:
hol-guard package-shims status --json
hol-guard package-shims install --manager npm --manager pip --json
hol-guard package-shims repair --manager npm --json
hol-guard package-shims test --manager npm --json
hol-guard package-shims uninstall --manager npm --json
| Step | Command | Use it to |
|---|---|---|
| 1 | status | Check the current shim state. |
| 2 | install | Install interception for the managers you name. |
| 3 | repair | Fix missing or tampered shims. |
| 4 | test | Prove the shim intercepts installs from the current shell. |
| 5 | uninstall | Remove the shim for a manager. |
If a result reports path_repair_required, prepend the shim directory it returns to your PATH, using the shell hint in the JSON, and restart the shell before you test again. The CLI test checks the PATH of the shell you run it from. The dashboard Test button checks the Guard block in your shell profiles instead, because the background daemon does not load them.
install and test need a connected Guard Cloud account that includes the package firewall, and they exit with status 2 and a reason when it is missing. status, repair, and uninstall do not. When the approval gate is on, all four actions that change or test shims ask for your password or app code first.