Skip to main content
skill CX Codex

vulnerability-scanning · secondsky — Claude Code skill: security scanning

This skill outlines checks for dependencies, source code, and container images. Use it to review a project before deployment or add security checks to CI/CD.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add secondsky/claude-skills --skill vulnerability-scanning -a claude-code
Open on GitHub

What vulnerability-scanning does

The skill covers dependency checks with npm audit and Snyk, container and filesystem scans with Trivy, and Python code analysis with Bandit. It includes commands for each tool, such as trivy image myapp:latest --severity HIGH,CRITICAL.

A GitHub Actions example runs Trivy, Snyk, and npm audit, with the Trivy step configured to fail the build on findings. The Snyk step reads SNYK_TOKEN from GitHub secrets, so configure that secret before using the example.

A Node.js example parses JSON from npm audit and Trivy, returning null when a command fails or its output cannot be parsed. The skill also recommends tracking findings and recording accepted false positives.

What it helps with

  • check npm dependencies for high-severity vulnerabilities
  • scan a container image with Trivy
  • add security checks to a GitHub Actions workflow
  • inspect Python source with Bandit
  • parse scan results in a Node.js script

Example prompts for the agent

  • Check this project's dependencies with npm audit and Snyk.
  • Add a Trivy filesystem scan to my GitHub Actions workflow.
  • Run Bandit on the Python source and explain the findings.

How to install vulnerability-scanning

1Skills CLI (Vercel)

npx skills add secondsky/claude-skills --skill vulnerability-scanning -a claude-code

2Manually: put the files in place

~/.claude/skills/vulnerability-scanning/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/vulnerability-scanning/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about vulnerability-scanning

How do I install vulnerability-scanning in Claude Code?

Run npx skills add secondsky/claude-skills --skill vulnerability-scanning -a claude-code. The skill file is at ~/.claude/skills/vulnerability-scanning/SKILL.md.

What does vulnerability-scanning do?

It describes checks for dependencies, source code, and containers using npm audit, Snyk, Trivy, and Bandit. It also includes a GitHub Actions workflow example.

What does the Snyk GitHub Actions step require?

The example passes SNYK_TOKEN through GitHub Actions secrets. Set up that secret before running the Snyk step.

Source text

SKILL.md · MIT
---
name: vulnerability-scanning
description: Automated security scanning for dependencies, code, containers with Trivy, Snyk, npm audit. Use for CI/CD security gates, pre-deployment audits, compliance requirements, or encountering CVE detection, outdated packages, license compliance, SBOM generation errors.
license: MIT
metadata:
  keywords: "Trivy, Snyk, npm-audit, OWASP, dependency-scanning, CVE, security-vulnerabilities, outdated-packages, license-compliance, SCA, SBOM, container-scanning, image-scanning, security-gates, CI-CD-security, pre-deployment-audit, supply-chain-security, vulnerability-detection, security-compliance, Docker-scan, Grype, static-analysis, dependency-check"
---

# Vulnerability Scanning

Automate security vulnerability detection across code, dependencies, and containers.

## Dependency Scanning

```bash
# npm audit
npm audit --audit-level=high

# Snyk
snyk test --severity-threshold=high

# Safety (Python)
safety check --full-report
```

## Container Scanning (Trivy)

```bash
# Scan container image
trivy image myapp:latest --severity HIGH,CRITICAL

# Scan filesystem
trivy fs --scanners vuln,secret .
```

## GitHub Actions Integration

```yaml
name: Security Scan

on: [push, pull_request]

jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run Trivy vulnerability scanner
        uses: aquasecurity/[email protected]
        with:
          scan-type: 'fs'
          severity: 'CRITICAL,HIGH'
          exit-code: '1'

      - name: Run Snyk
        uses: snyk/actions/node@v3
        env:
          SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
        with:
          args: --severity-threshold=high

      - name: npm audit
        run: npm audit --audit-level=high
```

## Code Analysis (Bandit for Python)

```bash
bandit -r src/ -ll -ii
```

## Node.js Scanner

```javascript
const { execSync } = require('child_process');

function runScan(command) {
  try {
    return JSON.parse(execSync(command, { stdio: ['pipe', 'pipe', 'ignore'] }).toString());
  } catch (err) {
    // A tool may be missing, exit non-zero, or print non-JSON output (e.g.
    // trivy progress text when not on a TTY). Treat that as "no parseable
    // result" rather than crashing the scanner.
    console.warn(`Scan command failed or returned non-JSON: ${command}`);
    return null;
  }
}

function runSecurityScan() {
  const results = {
    npm: runScan('npm audit --json'),
    trivy: runScan('trivy fs --quiet --format json .')
  };

  if (!results.npm || !results.npm.metadata) {
    console.warn('npm audit produced no metadata; skipping npm checks');
  } else {
    const critical = results.npm.metadata?.vulnerabilities?.critical || 0;
    if (critical > 0) {
      console.error(`Found ${critical} critical vulnerabilities`);
      process.exit(1);
    }
  }
}
```

## Best Practices

- Integrate scanning in CI/CD pipeline
- Fail builds on high/critical findings
- Scan dependencies and containers
- Track vulnerabilities over time
- Document accepted false positives

## Tools

- Trivy (containers, filesystem)
- Snyk (dependencies, code)
- npm audit / yarn audit
- Bandit (Python)
- OWASP Dependency-Check

© secondsky · MIT · secondsky/claude-skills

Similar skills

All skills for Security →

vulnerability-scanning by other authors comes first.

vulnerability-scanning devops-skills A skill for finding and prioritizing CVEs across systems and dependencies with Nessus, OpenVAS, Qualys and Nuclei. Useful for audits and compliance work. CX Codex +1 424installs vulnerability-scanning aj-geddes A skill that walks your agent through finding vulnerabilities in dependencies, code, containers and secrets. Useful before deploys and during security audits. CX Codex +1 611installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. 499,069installs ponytail-review DietrichGebert ponytail-review reviews a change beyond the diff, checking connected code, bugs, risks, load, tests, speed, and unnecessary code. Use it for PRs and commits. CX Codex +1 57,000installs ponytail-audit DietrichGebert It audits a repository and ranks bugs, risks, and redundant code in a one-shot report. Use it when you need a review without code changes. CX Codex +1 45,400installs security-audit cloudflare Reviews codebases and APIs for vulnerabilities using safe sandboxing. Fits pre-release security reviews, pen-test triage, and architecture checks. CX Codex +1 54,800installs security-and-hardening addyosmani Guides threat modeling and security checks for code that handles user input, authentication, sessions, or external services. Use it when building a feature that accepts untrusted data or reviewing code before release. CX Codex +1 70,200installs supabase official supabase Guides the agent through database configuration and strict RLS policies in Supabase. CX Codex GP ChatGPT 8installs

From the same set116

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor