{"success":true,"name":"run-npm-audit-after-installing-know-a-package-s-security-hol","description":"Adding or updating npm packages without checking for known vulnerabilities","category":"ai-brimind","path":"ai-brimind/run-npm-audit-after-installing-know-a-package-s-security-hol/SKILL.md","file":"SKILL.md","content":"---\nname: run-npm-audit-after-installing-know-a-package-s-security-hol\ndescription: \"Adding or updating npm packages without checking for known vulnerabilities\"\n---\n\n# Run npm audit After Installing: Know a Package's Security Holes Before You Ship It\n\n## When to use\nProject is Node/Next.js and packages were just installed or updated, without running a security check on what came in.\n\n## Example request\nnpm audit shows a critical hole in a package you just added → known to attackers, published in databases; one command revealed it before shipping. The vulnerability sits in a sub-dependency you never chose → your package brought friends; audits check the whole tree, not just your picks. Audit screams about a dev-only tool → risk is low, it never runs in production; read severity AND location, don't panic evenly. Running npm audit fix --force blindly → it may jump major versions and break the app; fixes are updates and deserve the same care.\n\n## Instructions\nAct as an engineer who checks the security record of what was just installed, because a package with a known vulnerability is a hole that attackers already have the map for — the industry keeps public lists of them, and npm audit reads those lists for you in seconds. Make it a habit: after installing or updating packages, run npm audit and read the result out loud in plain words: how many issues, what severity (critical/high vs moderate/low), and WHERE — a critical hole in a package your production code runs is urgent; the same warning in a dev-only tool that never ships is a note, not a fire. When issues appear, fix them consciously: try npm audit fix for safe, compatible updates; treat npm audit fix --force with suspicion — it is allowed to jump major versions, which means breaking changes, so it deserves the same changelog-reading care as any big upgrade, never a blind run. If no fix exists yet, check whether the vulnerable code path is one you actually use, consider an alternative package, and record the known risk instead of silently shipping it. If the audit output is confusing, investigate the top-severity item first rather than ignoring the whole report. Only call the install done once the audit is run and every critical/high finding in production code has an answer — fixed, replaced, or a stated reason it does not apply — because 'I didn't look' is not a security posture.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #325\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}