Skip to main content
skill CX Codex

vulnerability-scanning · bagelhole — Claude Code skill: CVE scanning

A skill for finding and prioritizing CVEs across systems and dependencies with Nessus, OpenVAS, Qualys and Nuclei. Useful for audits and compliance work.

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

What vulnerability-scanning does

The skill covers the whole vulnerability cycle: discovery, triage, assigning owners, reporting. It ships a tool table that says what each scanner is good for — Nessus for enterprise scanning, OpenVAS as the free option, Qualys for large fleets, Nuclei for template-based checks.

The hands-on part is working code. For OpenVAS there is a docker run command exposing port 443 plus omp calls to create a target, a task, start it and pull results. For Nessus there is a Python NessusScanner class that creates a scan from a template, launches it, fetches findings and exports a report. For Nuclei you get the go install line, template updates and a sample YAML template.

CVSS scoring is covered too, with severity bands from Critical down to Low and response times for each, plus prioritization factors like internet exposure, sensitive data and active exploitation. The skill assumes you have scanner access, network reachability to targets and authorization to scan — running it against systems you do not own is a problem, so agree on scope first.

What it helps with

  • find known CVEs in infrastructure and dependencies
  • sort findings by severity and remediation deadlines
  • stand up OpenVAS in Docker and run a first scan
  • export a Nessus report to PDF through the API
  • probe a web app with Nuclei templates

Example prompts for the agent

  • Draft a scan plan for the 192.168.1.0/24 subnet with OpenVAS and list the steps
  • Write a Python script that creates a Nessus scan and exports the report
  • Help me prioritize findings by CVSS and exploitation factors

How to install vulnerability-scanning

1Skills CLI (Vercel)

npx skills add BagelHole/DevOps-Security-Agent-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?

Run npx skills add BagelHole/DevOps-Security-Agent-Skills --skill vulnerability-scanning -a claude-code. The skill file then lands at ~/.claude/skills/vulnerability-scanning/SKILL.md.

What does vulnerability-scanning do?

It helps you find CVEs and other vulnerabilities in systems and dependencies, then rank them by CVSS. It includes worked examples for Nessus, OpenVAS, Qualys and Nuclei.

What do I need before using it?

Access to the scanning tools, network reachability to the targets and authorization to scan them. The Nessus example expects an access key and a secret key.

Source text

SKILL.md · MIT
---
name: vulnerability-scanning
description: Scan systems and dependencies for CVEs and security vulnerabilities. Use tools like Nessus, OpenVAS, and Qualys to identify and prioritize vulnerabilities. Use when performing security assessments, compliance scanning, or vulnerability management.
license: MIT
metadata:
  author: devops-skills
  version: "1.0"
---

# Vulnerability Scanning

Identify and prioritize security vulnerabilities across infrastructure and applications.

## When to Use This Skill

Use this skill when:
- Performing security assessments
- Implementing vulnerability management programs
- Meeting compliance requirements
- Triaging and prioritizing remediation
- Scanning infrastructure for known CVEs

## Prerequisites

- Access to scanning tools
- Network access to targets
- Appropriate authorization

## Vulnerability Scanning Tools

| Tool | Type | Best For |
|------|------|----------|
| Nessus | Commercial | Enterprise scanning |
| OpenVAS | Open Source | Free alternative |
| Qualys | Cloud SaaS | Large scale |
| Nexpose/InsightVM | Commercial | Asset management |
| Nuclei | Open Source | Template-based |

## OpenVAS Setup

### Docker Deployment

```bash
# Run OpenVAS container
docker run -d --name openvas \
  -p 443:443 \
  -v openvas-data:/data \
  greenbone/openvas-scanner

# Access web UI at https://localhost
# Default credentials: admin/admin
```

### Scanning Commands

```bash
# Create target
omp -u admin -w admin --xml='<create_target>
  <name>Web Servers</name>
  <hosts>192.168.1.0/24</hosts>
</create_target>'

# Create task
omp -u admin -w admin --xml='<create_task>
  <name>Weekly Scan</name>
  <target id="target-uuid"/>
  <config id="daba56c8-73ec-11df-a475-002264764cea"/>
</create_task>'

# Start task
omp -u admin -w admin --xml='<start_task task_id="task-uuid"/>'

# Get results
omp -u admin -w admin --xml='<get_results task_id="task-uuid"/>'
```

## Nessus

### API Usage

```python
import requests

class NessusScanner:
    def __init__(self, url, access_key, secret_key):
        self.url = url
        self.headers = {
            'X-ApiKeys': f'accessKey={access_key}; secretKey={secret_key}',
            'Content-Type': 'application/json'
        }
    
    def create_scan(self, name, targets, template='basic'):
        """Create a new scan."""
        templates = self.get('/editor/scan/templates')
        template_uuid = next(
            t['uuid'] for t in templates['templates'] 
            if t['name'] == template
        )
        
        payload = {
            'uuid': template_uuid,
            'settings': {
                'name': name,
                'text_targets': targets,
                'enabled': True
            }
        }
        return self.post('/scans', payload)
    
    def launch_scan(self, scan_id):
        """Start a scan."""
        return self.post(f'/scans/{scan_id}/launch')
    
    def get_results(self, scan_id):
        """Get scan results."""
        return self.get(f'/scans/{scan_id}')
    
    def export_report(self, scan_id, format='pdf'):
        """Export scan report."""
        payload = {'format': format}
        response = self.post(f'/scans/{scan_id}/export', payload)
        file_id = response['file']
        
        # Wait for export
        while True:
            status = self.get(f'/scans/{scan_id}/export/{file_id}/status')
            if status['status'] == 'ready':
                break
            time.sleep(5)
        
        return self.get(f'/scans/{scan_id}/export/{file_id}/download')
    
    def get(self, path):
        response = requests.get(f'{self.url}{path}', headers=self.headers, verify=False)
        return response.json()
    
    def post(self, path, data=None):
        response = requests.post(f'{self.url}{path}', json=data, headers=self.headers, verify=False)
        return response.json()

# Usage
scanner = NessusScanner('https://nessus:8834', 'access-key', 'secret-key')
scan = scanner.create_scan('Weekly Infrastructure Scan', '10.0.0.0/24')
scanner.launch_scan(scan['scan']['id'])
```

## Nuclei

### Installation

```bash
# Install nuclei
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest

# Or download binary
wget https://github.com/projectdiscovery/nuclei/releases/latest/download/nuclei_linux_amd64.zip
unzip nuclei_linux_amd64.zip
```

### Basic Scanning

```bash
# Update templates
nuclei -update-templates

# Scan single target
nuclei -u https://example.com

# Scan multiple targets
nuclei -l targets.txt

# Scan with specific templates
nuclei -u https://example.com -t cves/
nuclei -u https://example.com -t vulnerabilities/

# Scan with severity filter
nuclei -u https://example.com -s critical,high

# Output formats
nuclei -u https://example.com -o results.txt
nuclei -u https://example.com -json -o results.json
```

### Custom Templates

```yaml
# custom-check.yaml
id: custom-admin-panel

info:
  name: Admin Panel Detection
  author: security-team
  severity: info
  tags: recon,panel

requests:
  - method: GET
    path:
      - "{{BaseURL}}/admin"
      - "{{BaseURL}}/administrator"
      - "{{BaseURL}}/wp-admin"
    
    matchers-condition: or
    matchers:
      - type: word
        words:
          - "admin"
          - "login"
        condition: and
      
      - type: status
        status:
          - 200
          - 301
          - 302
```

## CVSS Scoring

### Severity Levels

| Score | Rating | Response Time |
|-------|--------|---------------|
| 9.0-10.0 | Critical | 24 hours |
| 7.0-8.9 | High | 7 days |
| 4.0-6.9 | Medium | 30 days |
| 0.1-3.9 | Low | 90 days |

### Prioritization Factors

```yaml
prioritization_criteria:
  critical_factors:
    - Internet-facing systems
    - Systems with sensitive data
    - Active exploitation in the wild
    - Authentication bypass
    
  high_factors:
    - Remote code execution
    - Privilege escalation
    - Data exfiltration risk
    
  context_adjustments:
    - Compensating controls in place (-1)
    - No direct exposure (-1)
    - Critical business system (+1)
    - Compliance requirement (+1)
```

## Vulnerability Management Process

### Workflow

```yaml
vulnerability_workflow:
  discovery:
    - Run scheduled scans
    - Import third-party findings
    - Correlate with asset inventory
    
  analysis:
    - Validate findings
    - Remove false positives
    - Assess business impact
    - Prioritize by risk score
    
  remediation:
    - Assign to owners
    - Track SLA compliance
    - Verify fixes
    - Document exceptions
    
  reporting:
    - Executive summaries
    - Technical details
    - Trend analysis
    - Compliance metrics
```

### Tracking Template

```markdown
## Vulnerability Ticket

**ID:** VULN-2024-001
**CVE:** CVE-2024-12345
**CVSS:** 9.8 (Critical)
**Affected System:** web-server-01

### Description
Remote code execution vulnerability in Apache Struts.

### Impact
Attacker can execute arbitrary code on the server.

### Remediation
1. Update Apache Struts to version 2.5.33
2. Apply WAF rule as temporary mitigation

### Timeline
- Discovered: 2024-01-15
- SLA Due: 2024-01-16
- Remediated: 2024-01-15

### Evidence
- Scan report: [link]
- Screenshot: [link]
```

## CI/CD Integration

### GitHub Actions

```yaml
name: Vulnerability Scan

on:
  schedule:
    - cron: '0 2 * * *'
  push:
    branches: [main]

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

      - name: Run Nuclei
        uses: projectdiscovery/nuclei-action@main
        with:
          target: https://example.com
          templates: cves/
          output: nuclei-results.txt

      - name: Check for critical findings
        run: |
          if grep -q "critical" nuclei-results.txt; then
            echo "Critical vulnerabilities found!"
            exit 1
          fi

      - name: Upload results
        uses: actions/upload-artifact@v4
        with:
          name: vulnerability-report
          path: nuclei-results.txt
```

## Compliance Scanning

### CIS Benchmark Scan

```bash
# Using OpenSCAP
oscap xccdf eval \
  --profile xccdf_org.ssgproject.content_profile_cis \
  --results results.xml \
  --report report.html \
  /usr/share/xml/scap/ssg/content/ssg-ubuntu2204-ds.xml
```

### PCI DSS Scanning

```yaml
pci_scan_requirements:
  quarterly:
    - External vulnerability scan (ASV)
    - Internal vulnerability scan
    
  after_changes:
    - Significant infrastructure changes
    - New system deployments
    
  passing_criteria:
    - No vulnerabilities rated 4.0+ (CVSS)
    - False positives documented
    - Scan completed within 90 days
```

## Common Issues

### Issue: False Positives
**Problem**: Scanner reports non-existent vulnerabilities
**Solution**: Validate manually, tune scanner, maintain exception list

### Issue: Incomplete Coverage
**Problem**: Not all assets scanned
**Solution**: Update asset inventory, verify credentials, check network access

### Issue: Scan Impact
**Problem**: Scans affecting production systems
**Solution**: Schedule during maintenance windows, use authenticated scans

## Best Practices

- Maintain accurate asset inventory
- Schedule regular scan cadence
- Validate findings before remediation
- Track metrics (MTTR, aging)
- Integrate with ticketing systems
- Document exceptions properly
- Use risk-based prioritization
- Automate where possible

## Related Skills

- [sast-scanning](../sast-scanning/) - Code analysis
- [container-scanning](../container-scanning/) - Container security
- [cis-benchmarks](../../hardening/cis-benchmarks/) - Compliance benchmarks

© devops-skills · MIT · BagelHole/DevOps-Security-Agent-Skills

Similar skills

All skills for Security →

vulnerability-scanning by other authors comes first.

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 draft-security-advisory frappe Transforms vulnerability reports into publication-ready GitHub Security Advisories without leaking payloads, endpoints, or file paths. CX Codex +1 480installs dependencies-audit cognitedata This skill finds vulnerabilities, outdated and deprecated packages, license problems and supply-chain risks, then fixes them instead of only reporting. CX Codex +1 1,900installs security-reviewer https://github.com/Jeffallan Finds code and infrastructure vulnerabilities, assigns severity ratings, and suggests fixes. Use it for audits, secret scanning, and dependency checks. CX Codex +1 6,000installs sparkfinderoven-security-compliance-skills reason-machines A suite of commands and workflows for security and compliance work: OWASP scanning, CVE detection, GDPR audits, SOC 2 readiness, threat modeling. CX Codex +1 759installs dependency-check ruvnet Scans project dependencies for known vulnerabilities and CVEs. Run before releases, after lockfile changes, or when investigating security advisories. CX Codex +1 748installs sparkfinderoven-r01-security-compliance-skills reason-machines A skill suite that scans code for OWASP vulnerabilities, checks dependencies for CVEs, audits GDPR and SOC 2 readiness, and builds STRIDE threat models. CX Codex +1 729installs

From the same set129

ssh-configuration Configures OpenSSH clients and servers, handles Ed25519 keys, port forwarding, and bastion jumps for secure Linux server access. CX Codex +1 451installs prometheus-grafana This skill gives your agent templates for Prometheus scraping, PromQL queries and Grafana panels. Handy when a project needs monitoring added. CX Codex +1 449installs windows-server A skill for Windows Server administration: roles and features, IIS sites, Active Directory users, updates. Useful when the agent touches Windows infrastructure. CX Codex +1 449installs container-hardening Hardens Docker images and runtime environments with non-root users, read-only filesystems, and Kubernetes security contexts. CX Codex +1 433installs postgresql Guides PostgreSQL database administration, streaming replication, backups, and performance tuning. Useful when deploying or optimizing database instances. CX Codex +1 419installs ssl-tls-management A skill for SSL/TLS work: issuing Let's Encrypt certificates, automating renewal, running cert-manager in Kubernetes and checking cipher suites. Useful when you set up HTTPS or fix an expired cert. CX Codex +1 420installs hashicorp-vault A skill that walks your agent through HashiCorp Vault: secret engines, auth methods, policies and certificate issuance, without guessing CLI syntax. CX Codex +1 413installs backup-recovery Configures backup and disaster recovery strategies using rsync and Restic. Useful for protecting data locally or in AWS S3 and Backblaze B2 following the 3-2-1 rule. CX Codex +1 406installs

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