supabase
Handles the full Supabase workflow from schema changes to deployment, with built-in security guardrails that catch common traps like RLS...
auditing-dependencies
Auditing and updating npm dependencies to prevent security vulnerabilities in TypeScript projects
Full skill instructions
Purpose: Prevent security vulnerabilities through proper npm dependency auditing, updating, and monitoring.
When to use: Before adding new dependencies, during security reviews, when setting up CI/CD pipelines, or when package.json changes.
Dependencies are attack vectors. Each package you add introduces potential vulnerabilities:
Default stance: Minimize dependencies. Every package is a liability.
Before installing any package:
npm audit
This shows:
Read the output carefully. Not all vulnerabilities affect your code:
Automatic fixes (use with caution):
npm audit fix
This updates packages to non-breaking versions that patch vulnerabilities.
Breaking changes:
npm audit fix --force
This updates to latest versions, potentially breaking your code. Use only after:
Manual selective updates:
npm update package-name
Update specific packages after reviewing their changelogs.
Block installations with vulnerabilities:
Create .npmrc in project root:
audit-level=moderate
This fails npm install if moderate or higher severity vulnerabilities exist.
In CI/CD:
- name: Security audit
run: |
npm audit --audit-level=moderate
if [ $? -ne 0 ]; then
echo "Security vulnerabilities found!"
exit 1
fi
GitHub Dependabot:
Enable in repository settings → Security → Dependabot alerts.
Automatically:
npm-check-updates:
npx npm-check-updates
Shows available updates for all dependencies.
npx npm-check-updates -u
Updates package.json (still need to run npm install).
Ask these questions:
Do I actually need this?
Is this package trustworthy?
Is this package maintained?
What are the transitive dependencies?
npm ls package-name
Each transitive dependency is another attack vector.
Avoid packages with:
@types/ package or no types at all)postinstall scripts (potential supply chain attack vector)Use built-in Node.js/browser features when possible:
import { randomBytes } from 'crypto';
const id = randomBytes(16).toString('hex');
Better than installing uuid package if you just need random IDs.
const url = new URL('/api/users', 'https://api.example.com');
url.searchParams.set('limit', '10');
Better than installing query string builder packages.
package-lock.json (npm) or yarn.lock (Yarn) must be committed:
Never:
.gitignorenpm install with --no-package-lockIn package.json, prefer exact versions for critical dependencies:
{
"dependencies": {
"express": "4.18.2",
"zod": "3.22.4"
}
}
Not:
{
"dependencies": {
"express": "^4.18.2",
"zod": "~3.22.4"
}
}
Rationale: Caret (^) and tilde (~) allow automatic updates that could introduce breaking changes or vulnerabilities.
Exception: Development dependencies can use ranges if you regularly update them.
Every CI pipeline must:
Run audit on every build:
- run: npm audit --audit-level=moderate
Check for outdated dependencies weekly:
schedule:
- cron: '0 0 * * 1'
jobs:
update-check:
- run: npx npm-check-updates
Prevent merging PRs with vulnerabilities:
- name: Security gate
run: npm audit --production --audit-level=moderate
name: Security Audit
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '0 0 * * 1'
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
- run: npm audit --audit-level=moderate
- name: Check for outdated packages
run: npx npm-check-updates
Options:
Find alternative package:
Assess actual risk:
Audit exception (last resort):
npm audit --json > audit-baseline.json
Document why exception is acceptable:
Never ignore vulnerabilities permanently.
npm install some-random-package
Correct approach:
bundlephobia.comnpm audit after installation"It's just a moderate severity in a dev dependency, doesn't matter."
Wrong. Development dependencies:
--force without understandingnpm install --force
This bypasses dependency resolution and can install incompatible versions.
Only use when:
Weekly:
npm auditMonthly:
npx npm-check-updatesQuarterly:
Check if types match runtime:
import { z } from 'zod';
const APIResponseSchema = z.object({
data: z.array(z.string()),
});
type APIResponse = z.infer<typeof APIResponseSchema>;
This ensures types and runtime validation stay synchronized.
import type { User } from 'huge-library';
This imports only types, not runtime code, reducing bundle size.
Tools:
npm audit - Built-in vulnerability scannernpm-check-updates - Dependency update checkerReferences:
Before merging any dependency changes:
npm audit passes at moderate level or higherRemember: The best dependency is the one you don't add. The second best is one that's actively maintained with a strong security track record.
Handles the full Supabase workflow from schema changes to deployment, with built-in security guardrails that catch common traps like RLS...
Comprehensive guides and best practices for Neon Serverless Postgres, covering setup, connection methods, authentication, and platform APIs.
Guide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.
A skill to evaluate how secure Firestore security rules are. Use this when Firestore security rules are updated to ensure that the generated rules are extremely secure and robust.
Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.
Complete Better Auth server and client setup with database adapters, session management, plugins, and security configuration.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Complete Cloudflare platform integration with decision trees for compute, storage, AI, networking, security, and infrastructure-as-code.
Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.
Send, read, and manage Gmail messages, drafts, labels, and account settings.
Comprehensive website auditing across 230+ rules in 21 categories including SEO, performance, security, and accessibility.
Shared authentication, CLI syntax, and output formatting patterns for gws Google Workspace commands.
Discover your celebrity doppelgänger with StarByFace!
GeoSpy: Pricing, Features, FAQs, and Alternatives for AI Teams
Detect AI-generated voices to protect against audio fraud.
Ensure Your Content's Originality with AI Plagiarism Checker
Upscale images by 400% without quality loss
Protect your social media from copyright disputes
Accurately Detect AI-Generated Content with TheChecker.AI
Chrome extension that detects and flags AI-generated content