Skip to content

SSZcreate/Pentab_server / .agents/skills/cybersecurity

cybersecurity

Flagged

FileKindSize
SKILL.mdskill md2.4 KB
skills/implementing-pam-for-database-access/LICENSEother11.0 KB
skills/implementing-pam-for-database-access/SKILL.mdmarkdown3.1 KB
skills/implementing-pam-for-database-access/references/api-reference.mdmarkdown2.8 KB
skills/implementing-pam-for-database-access/scripts/agent.pyscript3.9 KB
skills/implementing-passwordless-auth-with-microsoft-entra/LICENSEother11.0 KB
skills/implementing-passwordless-auth-with-microsoft-entra/SKILL.mdmarkdown21.1 KB
skills/implementing-passwordless-auth-with-microsoft-entra/references/api-reference.mdmarkdown2.4 KB
skills/implementing-passwordless-auth-with-microsoft-entra/scripts/agent.pyscript8.4 KB
skills/implementing-passwordless-authentication-with-fido2/LICENSEother11.0 KB
skills/implementing-passwordless-authentication-with-fido2/SKILL.mdmarkdown2.8 KB
skills/implementing-passwordless-authentication-with-fido2/references/api-reference.mdmarkdown3.0 KB
skills/implementing-passwordless-authentication-with-fido2/references/standards.mdmarkdown888 B
skills/implementing-passwordless-authentication-with-fido2/references/workflows.mdmarkdown1.5 KB
skills/implementing-passwordless-authentication-with-fido2/scripts/agent.pyscript3.6 KB
skills/implementing-patch-management-for-ot-systems/LICENSEother11.0 KB
skills/implementing-patch-management-for-ot-systems/SKILL.mdmarkdown12.4 KB
skills/implementing-patch-management-for-ot-systems/references/api-reference.mdmarkdown2.9 KB
skills/implementing-patch-management-for-ot-systems/scripts/agent.pyscript3.5 KB
skills/implementing-patch-management-workflow/LICENSEother11.0 KB
skills/implementing-patch-management-workflow/SKILL.mdmarkdown10.5 KB
skills/implementing-patch-management-workflow/assets/template.mdmarkdown1.1 KB
skills/implementing-patch-management-workflow/references/api-reference.mdmarkdown4.5 KB
skills/implementing-patch-management-workflow/references/standards.mdmarkdown1.5 KB
skills/implementing-patch-management-workflow/references/workflows.mdmarkdown2.4 KB
skills/implementing-patch-management-workflow/scripts/agent.pyscript9.6 KB
skills/implementing-patch-management-workflow/scripts/process.pyscript13.7 KB
skills/implementing-pci-dss-compliance-controls/LICENSEother11.0 KB
skills/implementing-pci-dss-compliance-controls/SKILL.mdmarkdown6.4 KB
skills/implementing-pci-dss-compliance-controls/assets/template.mdmarkdown4.2 KB
skills/implementing-pci-dss-compliance-controls/references/api-reference.mdmarkdown6.3 KB
skills/implementing-pci-dss-compliance-controls/references/standards.mdmarkdown1.1 KB
skills/implementing-pci-dss-compliance-controls/references/workflows.mdmarkdown1.6 KB
skills/implementing-pci-dss-compliance-controls/scripts/agent.pyscript12.0 KB
skills/implementing-pod-security-admission-controller/LICENSEother11.0 KB
skills/implementing-pod-security-admission-controller/SKILL.mdmarkdown9.6 KB
skills/implementing-pod-security-admission-controller/assets/template.mdmarkdown1.3 KB
skills/implementing-pod-security-admission-controller/references/api-reference.mdmarkdown5.1 KB
skills/implementing-pod-security-admission-controller/references/standards.mdmarkdown1.1 KB
skills/implementing-pod-security-admission-controller/references/workflows.mdmarkdown1.0 KB
skills/implementing-pod-security-admission-controller/scripts/agent.pyscript11.4 KB
skills/implementing-pod-security-admission-controller/scripts/process.pyscript5.1 KB
skills/implementing-policy-as-code-with-open-policy-agent/LICENSEother11.0 KB
skills/implementing-policy-as-code-with-open-policy-agent/SKILL.mdmarkdown10.1 KB
skills/implementing-policy-as-code-with-open-policy-agent/assets/template.mdmarkdown1.8 KB
skills/implementing-policy-as-code-with-open-policy-agent/references/api-reference.mdmarkdown4.0 KB
skills/implementing-policy-as-code-with-open-policy-agent/references/standards.mdmarkdown1.1 KB
skills/implementing-policy-as-code-with-open-policy-agent/references/workflows.mdmarkdown1.9 KB
skills/implementing-policy-as-code-with-open-policy-agent/scripts/agent.pyscript9.3 KB
skills/implementing-policy-as-code-with-open-policy-agent/scripts/process.pyscript5.8 KB
skills/implementing-privileged-access-management-with-cyberark/LICENSEother11.0 KB
skills/implementing-privileged-access-management-with-cyberark/SKILL.mdmarkdown7.2 KB
skills/implementing-privileged-access-management-with-cyberark/assets/template.mdmarkdown2.5 KB
skills/implementing-privileged-access-management-with-cyberark/references/api-reference.mdmarkdown4.5 KB
skills/implementing-privileged-access-management-with-cyberark/references/standards.mdmarkdown1.5 KB
skills/implementing-privileged-access-management-with-cyberark/references/workflows.mdmarkdown3.0 KB
skills/implementing-privileged-access-management-with-cyberark/scripts/agent.pyscript9.6 KB
skills/implementing-privileged-access-management-with-cyberark/scripts/process.pyscript16.5 KB
skills/implementing-privileged-access-workstation/LICENSEother11.0 KB
skills/implementing-privileged-access-workstation/SKILL.mdmarkdown2.5 KB
skills/implementing-privileged-access-workstation/references/api-reference.mdmarkdown2.0 KB
skills/implementing-privileged-access-workstation/scripts/agent.pyscript7.4 KB
skills/implementing-privileged-session-monitoring/LICENSEother11.0 KB
skills/implementing-privileged-session-monitoring/SKILL.mdmarkdown11.6 KB
skills/implementing-privileged-session-monitoring/references/api-reference.mdmarkdown2.0 KB
skills/implementing-privileged-session-monitoring/scripts/agent.pyscript8.0 KB
skills/implementing-proofpoint-email-security-gateway/LICENSEother11.0 KB
skills/implementing-proofpoint-email-security-gateway/SKILL.mdmarkdown6.9 KB
skills/implementing-proofpoint-email-security-gateway/assets/template.mdmarkdown1.7 KB
skills/implementing-proofpoint-email-security-gateway/references/api-reference.mdmarkdown5.1 KB
skills/implementing-proofpoint-email-security-gateway/references/standards.mdmarkdown1.7 KB
skills/implementing-proofpoint-email-security-gateway/references/workflows.mdmarkdown2.7 KB
skills/implementing-proofpoint-email-security-gateway/scripts/agent.pyscript8.2 KB
skills/implementing-proofpoint-email-security-gateway/scripts/process.pyscript11.1 KB
skills/implementing-purdue-model-network-segmentation/LICENSEother11.0 KB
skills/implementing-purdue-model-network-segmentation/SKILL.mdmarkdown17.1 KB
skills/implementing-purdue-model-network-segmentation/references/api-reference.mdmarkdown5.5 KB
skills/implementing-purdue-model-network-segmentation/scripts/agent.pyscript7.5 KB
skills/implementing-ransomware-backup-strategy/LICENSEother11.0 KB
skills/implementing-ransomware-backup-strategy/SKILL.mdmarkdown12.2 KB
skills/implementing-ransomware-backup-strategy/assets/template.mdmarkdown3.7 KB
skills/implementing-ransomware-backup-strategy/references/api-reference.mdmarkdown6.5 KB
skills/implementing-ransomware-backup-strategy/references/standards.mdmarkdown2.5 KB
skills/implementing-ransomware-backup-strategy/references/workflows.mdmarkdown3.7 KB
skills/implementing-ransomware-backup-strategy/scripts/agent.pyscript11.8 KB
skills/implementing-ransomware-backup-strategy/scripts/process.pyscript22.3 KB
skills/implementing-ransomware-kill-switch-detection/LICENSEother11.0 KB
skills/implementing-ransomware-kill-switch-detection/SKILL.mdmarkdown9.5 KB
skills/implementing-ransomware-kill-switch-detection/references/api-reference.mdmarkdown3.7 KB
skills/implementing-ransomware-kill-switch-detection/scripts/agent.pyscript12.0 KB
skills/implementing-rapid7-insightvm-for-scanning/LICENSEother11.0 KB
skills/implementing-rapid7-insightvm-for-scanning/SKILL.mdmarkdown12.0 KB
skills/implementing-rapid7-insightvm-for-scanning/assets/template.mdmarkdown1.4 KB
skills/implementing-rapid7-insightvm-for-scanning/references/api-reference.mdmarkdown4.6 KB
skills/implementing-rapid7-insightvm-for-scanning/references/standards.mdmarkdown1.5 KB
skills/implementing-rapid7-insightvm-for-scanning/references/workflows.mdmarkdown5.7 KB
skills/implementing-rapid7-insightvm-for-scanning/scripts/agent.pyscript9.1 KB
skills/implementing-rapid7-insightvm-for-scanning/scripts/process.pyscript11.7 KB
skills/implementing-rbac-hardening-for-kubernetes/LICENSEother11.0 KB
skills/implementing-rbac-hardening-for-kubernetes/SKILL.mdmarkdown7.8 KB
skills/implementing-rbac-hardening-for-kubernetes/assets/template.mdmarkdown741 B
skills/implementing-rbac-hardening-for-kubernetes/references/api-reference.mdmarkdown6.1 KB
skills/implementing-rbac-hardening-for-kubernetes/references/standards.mdmarkdown766 B
skills/implementing-rbac-hardening-for-kubernetes/references/workflows.mdmarkdown708 B
skills/implementing-rbac-hardening-for-kubernetes/scripts/agent.pyscript9.7 KB
skills/implementing-rbac-hardening-for-kubernetes/scripts/process.pyscript6.9 KB
skills/implementing-rsa-key-pair-management/LICENSEother11.0 KB
skills/implementing-rsa-key-pair-management/SKILL.mdmarkdown3.6 KB
skills/implementing-rsa-key-pair-management/assets/template.mdmarkdown1.6 KB
skills/implementing-rsa-key-pair-management/references/api-reference.mdmarkdown5.7 KB
skills/implementing-rsa-key-pair-management/references/standards.mdmarkdown1.8 KB
skills/implementing-rsa-key-pair-management/references/workflows.mdmarkdown1.5 KB
skills/implementing-rsa-key-pair-management/scripts/agent.pyscript9.3 KB
skills/implementing-rsa-key-pair-management/scripts/process.pyscript11.5 KB
skills/implementing-runtime-application-self-protection/LICENSEother11.0 KB
skills/implementing-runtime-application-self-protection/SKILL.mdmarkdown2.9 KB
skills/implementing-runtime-application-self-protection/references/api-reference.mdmarkdown2.6 KB
skills/implementing-runtime-application-self-protection/scripts/agent.pyscript6.7 KB
skills/implementing-runtime-security-with-tetragon/LICENSEother11.0 KB
skills/implementing-runtime-security-with-tetragon/SKILL.mdmarkdown8.3 KB
skills/implementing-runtime-security-with-tetragon/assets/template.mdmarkdown2.5 KB
skills/implementing-runtime-security-with-tetragon/references/api-reference.mdmarkdown957 B
skills/implementing-runtime-security-with-tetragon/references/standards.mdmarkdown2.0 KB
skills/implementing-runtime-security-with-tetragon/references/workflows.mdmarkdown2.7 KB
skills/implementing-runtime-security-with-tetragon/scripts/agent.pyscript4.1 KB
skills/implementing-runtime-security-with-tetragon/scripts/process.pyscript13.4 KB
skills/implementing-saml-sso-with-okta/LICENSEother11.0 KB
skills/implementing-saml-sso-with-okta/SKILL.mdmarkdown6.6 KB
skills/implementing-saml-sso-with-okta/assets/template.mdmarkdown4.1 KB
skills/implementing-saml-sso-with-okta/references/api-reference.mdmarkdown1.6 KB
skills/implementing-saml-sso-with-okta/references/standards.mdmarkdown2.1 KB
skills/implementing-saml-sso-with-okta/references/workflows.mdmarkdown3.4 KB
skills/implementing-saml-sso-with-okta/scripts/agent.pyscript7.6 KB
skills/implementing-saml-sso-with-okta/scripts/process.pyscript19.2 KB
skills/implementing-scim-provisioning-with-okta/LICENSEother11.0 KB
skills/implementing-scim-provisioning-with-okta/SKILL.mdmarkdown9.0 KB
skills/implementing-scim-provisioning-with-okta/assets/template.mdmarkdown2.5 KB
skills/implementing-scim-provisioning-with-okta/references/api-reference.mdmarkdown4.6 KB
skills/implementing-scim-provisioning-with-okta/references/standards.mdmarkdown2.3 KB
skills/implementing-scim-provisioning-with-okta/references/workflows.mdmarkdown2.8 KB
skills/implementing-scim-provisioning-with-okta/scripts/agent.pyscript9.0 KB
skills/implementing-scim-provisioning-with-okta/scripts/process.pyscript15.3 KB
skills/implementing-secret-scanning-with-gitleaks/LICENSEother11.0 KB
skills/implementing-secret-scanning-with-gitleaks/SKILL.mdmarkdown11.1 KB
skills/implementing-secret-scanning-with-gitleaks/assets/template.mdmarkdown4.7 KB
skills/implementing-secret-scanning-with-gitleaks/references/api-reference.mdmarkdown4.5 KB
skills/implementing-secret-scanning-with-gitleaks/references/standards.mdmarkdown2.2 KB
skills/implementing-secret-scanning-with-gitleaks/references/workflows.mdmarkdown5.0 KB
skills/implementing-secret-scanning-with-gitleaks/scripts/agent.pyscript7.2 KB
skills/implementing-secret-scanning-with-gitleaks/scripts/process.pyscript9.8 KB
skills/implementing-secrets-management-with-vault/LICENSEother11.0 KB
skills/implementing-secrets-management-with-vault/SKILL.mdmarkdown12.3 KB
skills/implementing-secrets-management-with-vault/references/api-reference.mdmarkdown4.1 KB
skills/implementing-secrets-management-with-vault/scripts/agent.pyscript10.7 KB
skills/implementing-secrets-scanning-in-ci-cd/LICENSEother11.0 KB
skills/implementing-secrets-scanning-in-ci-cd/SKILL.mdmarkdown3.7 KB
skills/implementing-secrets-scanning-in-ci-cd/references/api-reference.mdmarkdown3.0 KB
skills/implementing-secrets-scanning-in-ci-cd/scripts/agent.pyscript5.8 KB
skills/implementing-security-chaos-engineering/LICENSEother11.0 KB
skills/implementing-security-chaos-engineering/SKILL.mdmarkdown2.5 KB
skills/implementing-security-chaos-engineering/references/api-reference.mdmarkdown1.4 KB
skills/implementing-security-chaos-engineering/scripts/agent.pyscript8.1 KB
skills/implementing-security-information-sharing-with-stix2/LICENSEother11.0 KB
skills/implementing-security-information-sharing-with-stix2/SKILL.mdmarkdown12.8 KB
skills/implementing-security-information-sharing-with-stix2/references/api-reference.mdmarkdown2.0 KB
skills/implementing-security-information-sharing-with-stix2/scripts/agent.pyscript7.0 KB
skills/implementing-security-monitoring-with-datadog/LICENSEother11.0 KB
skills/implementing-security-monitoring-with-datadog/SKILL.mdmarkdown14.3 KB
skills/implementing-security-monitoring-with-datadog/references/api-reference.mdmarkdown3.4 KB
skills/implementing-security-monitoring-with-datadog/scripts/agent.pyscript5.8 KB
skills/implementing-semgrep-for-custom-sast-rules/LICENSEother11.0 KB
skills/implementing-semgrep-for-custom-sast-rules/SKILL.mdmarkdown7.5 KB
skills/implementing-semgrep-for-custom-sast-rules/references/api-reference.mdmarkdown5.1 KB
skills/implementing-semgrep-for-custom-sast-rules/references/standards.mdmarkdown1.1 KB
skills/implementing-semgrep-for-custom-sast-rules/scripts/agent.pyscript7.6 KB
skills/implementing-siem-correlation-rules-for-apt/LICENSEother11.0 KB
skills/implementing-siem-correlation-rules-for-apt/SKILL.mdmarkdown3.1 KB
skills/implementing-siem-correlation-rules-for-apt/references/api-reference.mdmarkdown1.7 KB
skills/implementing-siem-correlation-rules-for-apt/scripts/agent.pyscript10.4 KB
skills/implementing-siem-use-case-tuning/LICENSEother11.0 KB
skills/implementing-siem-use-case-tuning/SKILL.mdmarkdown2.6 KB
skills/implementing-siem-use-case-tuning/references/api-reference.mdmarkdown2.1 KB
skills/implementing-siem-use-case-tuning/scripts/agent.pyscript8.1 KB
skills/implementing-siem-use-cases-for-detection/LICENSEother11.0 KB
skills/implementing-siem-use-cases-for-detection/SKILL.mdmarkdown11.1 KB
skills/implementing-siem-use-cases-for-detection/references/api-reference.mdmarkdown2.1 KB
skills/implementing-siem-use-cases-for-detection/scripts/agent.pyscript8.7 KB
skills/implementing-sigstore-for-software-signing/LICENSEother11.0 KB
skills/implementing-sigstore-for-software-signing/SKILL.mdmarkdown12.6 KB
skills/implementing-sigstore-for-software-signing/references/api-reference.mdmarkdown5.1 KB
skills/implementing-sigstore-for-software-signing/scripts/agent.pyscript17.7 KB
skills/implementing-soar-automation-with-phantom/LICENSEother11.0 KB
skills/implementing-soar-automation-with-phantom/SKILL.mdmarkdown14.3 KB
skills/implementing-soar-automation-with-phantom/references/api-reference.mdmarkdown2.6 KB
skills/implementing-soar-automation-with-phantom/scripts/agent.pyscript9.4 KB
skills/implementing-soar-playbook-for-phishing/LICENSEother11.0 KB
skills/implementing-soar-playbook-for-phishing/SKILL.mdmarkdown4.8 KB
skills/implementing-soar-playbook-for-phishing/references/api-reference.mdmarkdown2.5 KB
skills/implementing-soar-playbook-for-phishing/scripts/agent.pyscript8.6 KB
skills/implementing-soar-playbook-with-palo-alto-xsoar/LICENSEother11.0 KB

skills/implementing-rapid7-insightvm-for-scanning/scripts/agent.py

View on GitHub
#!/usr/bin/env python3
"""Rapid7 InsightVM vulnerability scanning agent.

Interfaces with the InsightVM (Nexpose) REST API to manage scan
configurations, launch scans, retrieve vulnerability results, and
generate remediation reports. Supports site management, asset
discovery, and vulnerability prioritization.
"""
import argparse
import json
import os
import sys
import time
from datetime import datetime, timezone

try:
    import requests
    from requests.auth import HTTPBasicAuth
except ImportError:
    print("[!] 'requests' required: pip install requests", file=sys.stderr)
    sys.exit(1)


def get_insightvm_config():
    """Return InsightVM API connection config."""
    host = os.environ.get("INSIGHTVM_HOST", "localhost")
    port = os.environ.get("INSIGHTVM_PORT", "3780")
    user = os.environ.get("INSIGHTVM_USER", "")
    password = os.environ.get("INSIGHTVM_PASSWORD", "")
    return f"https://{host}:{port}", user, password


def api_call(base_url, endpoint, user, password, method="GET",
             data=None, params=None):
    """Make authenticated API call to InsightVM."""
    url = f"{base_url}/api/3{endpoint}"
    auth = HTTPBasicAuth(user, password)
    headers = {"Content-Type": "application/json", "Accept": "application/json"}
    if method == "POST":
        resp = requests.post(url, auth=auth, headers=headers, json=data,
                             params=params,
                             verify=not os.environ.get("SKIP_TLS_VERIFY", "").lower() == "true", timeout=60)  # Set SKIP_TLS_VERIFY=true for self-signed certs in lab environments
    elif method == "PUT":
        resp = requests.put(url, auth=auth, headers=headers, json=data,
                            verify=not os.environ.get("SKIP_TLS_VERIFY", "").lower() == "true", timeout=60)  # Set SKIP_TLS_VERIFY=true for self-signed certs in lab environments
    else:
        resp = requests.get(url, auth=auth, headers=headers, params=params,
                            verify=not os.environ.get("SKIP_TLS_VERIFY", "").lower() == "true", timeout=60)  # Set SKIP_TLS_VERIFY=true for self-signed certs in lab environments
    resp.raise_for_status()
    return resp.json()


def list_sites(base_url, user, password):
    """List all scan sites."""
    print("[*] Listing sites...")
    data = api_call(base_url, "/sites", user, password, params={"size": 500})
    sites = []
    for site in data.get("resources", []):
        sites.append({
            "id": site.get("id"),
            "name": site.get("name", ""),
            "description": site.get("description", ""),
            "type": site.get("type", ""),
            "assets": site.get("assets", 0),
            "last_scan_time": site.get("lastScanTime", ""),
            "risk_score": site.get("riskScore", 0),
        })
    print(f"[+] Found {len(sites)} sites")
    return sites


def get_site_vulnerabilities(base_url, user, password, site_id):
    """Get vulnerabilities for a specific site."""
    print(f"[*] Fetching vulnerabilities for site {site_id}...")
    vulns = []
    page = 0
    while True:
        data = api_call(base_url, f"/sites/{site_id}/vulnerabilities",
                        user, password, params={"page": page, "size": 100})
        resources = data.get("resources", [])
        if not resources:
            break
        for v in resources:
            vulns.append({
                "id": v.get("id", ""),
                "title": v.get("title", ""),
                "severity": v.get("severity", ""),
                "cvss_v3_score": v.get("cvss", {}).get("v3", {}).get("score", 0),
                "risk_score": v.get("riskScore", 0),
                "instances": v.get("instances", 0),
                "status": v.get("status", ""),
            })
        page += 1
        total_pages = data.get("page", {}).get("totalPages", 1)
        if page >= total_pages:
            break

    print(f"[+] Retrieved {len(vulns)} vulnerabilities")
    return vulns


def launch_scan(base_url, user, password, site_id, scan_name=None):
    """Launch a scan on a site."""
    if not scan_name:
        scan_name = f"agent-scan-{datetime.now(timezone.utc).strftime('%Y%m%d-%H%M%S')}"
    print(f"[*] Launching scan '{scan_name}' on site {site_id}...")
    data = api_call(base_url, f"/sites/{site_id}/scans", user, password,
                    method="POST", data={"name": scan_name})
    scan_id = data.get("id")
    print(f"[+] Scan started, ID: {scan_id}")
    return scan_id


def poll_scan_status(base_url, user, password, scan_id, max_wait=1800):
    """Poll scan status until completion."""
    print(f"[*] Waiting for scan {scan_id} to complete...")
    elapsed = 0
    interval = 30
    while elapsed < max_wait:
        data = api_call(base_url, f"/scans/{scan_id}", user, password)
        status = data.get("status", "unknown")
        if status in ("finished", "stopped", "error"):
            print(f"[+] Scan {status}")
            return status, data
        print(f"    Status: {status} ({elapsed}s)")
        time.sleep(interval)
        elapsed += interval
    print("[!] Scan timed out")
    return "timeout", {}


def get_scan_report(base_url, user, password, scan_id):
    """Get scan results summary."""
    data = api_call(base_url, f"/scans/{scan_id}", user, password)
    return {
        "scan_id": scan_id,
        "status": data.get("status", ""),
        "start_time": data.get("startTime", ""),
        "end_time": data.get("endTime", ""),
        "duration": data.get("duration", ""),
        "assets_discovered": data.get("assets", 0),
        "vulnerabilities": data.get("vulnerabilities", {}),
    }


def format_summary(sites, vulns=None, scan_report=None):
    """Print summary."""
    print(f"\n{'='*60}")
    print(f"  Rapid7 InsightVM Report")
    print(f"{'='*60}")

    if sites:
        print(f"\n  Sites ({len(sites)}):")
        for s in sites:
            print(f"    {s['name']:30s} | Assets: {s['assets']:5d} | "
                  f"Risk: {s['risk_score']:8.1f}")

    if vulns:
        severity_counts = {}
        for v in vulns:
            sev = v.get("severity", "unknown")
            severity_counts[sev] = severity_counts.get(sev, 0) + 1
        print(f"\n  Vulnerabilities ({len(vulns)}):")
        for sev in sorted(severity_counts.keys()):
            print(f"    {sev:15s}: {severity_counts[sev]}")

    if scan_report:
        print(f"\n  Scan Report:")
        print(f"    Status    : {scan_report.get('status', 'N/A')}")
        print(f"    Assets    : {scan_report.get('assets_discovered', 0)}")


def main():
    parser = argparse.ArgumentParser(description="Rapid7 InsightVM scanning agent")
    sub = parser.add_subparsers(dest="command")

    sub.add_parser("list-sites", help="List scan sites")

    p_vulns = sub.add_parser("get-vulns", help="Get site vulnerabilities")
    p_vulns.add_argument("--site-id", required=True, type=int)

    p_scan = sub.add_parser("scan", help="Launch a scan")
    p_scan.add_argument("--site-id", required=True, type=int)
    p_scan.add_argument("--wait", action="store_true", help="Wait for completion")
    p_scan.add_argument("--max-wait", type=int, default=1800)

    parser.add_argument("--host", help="InsightVM host (or INSIGHTVM_HOST env)")
    parser.add_argument("--user", help="Username (or INSIGHTVM_USER env)")
    parser.add_argument("--password", help="Password (or INSIGHTVM_PASSWORD env)")
    parser.add_argument("--output", "-o", help="Output JSON report")
    parser.add_argument("--verbose", "-v", action="store_true")
    args = parser.parse_args()

    if not args.command:
        parser.print_help()
        sys.exit(1)

    if args.host:
        os.environ["INSIGHTVM_HOST"] = args.host
    if args.user:
        os.environ["INSIGHTVM_USER"] = args.user
    if args.password:
        os.environ["INSIGHTVM_PASSWORD"] = args.password

    base_url, user, password = get_insightvm_config()
    if not user or not password:
        print("[!] Set INSIGHTVM_USER and INSIGHTVM_PASSWORD", file=sys.stderr)
        sys.exit(1)

    result = {}
    if args.command == "list-sites":
        sites = list_sites(base_url, user, password)
        format_summary(sites)
        result = {"sites": sites}
    elif args.command == "get-vulns":
        vulns = get_site_vulnerabilities(base_url, user, password, args.site_id)
        format_summary([], vulns)
        result = {"site_id": args.site_id, "vulnerabilities": vulns}
    elif args.command == "scan":
        scan_id = launch_scan(base_url, user, password, args.site_id)
        if args.wait:
            status, data = poll_scan_status(base_url, user, password, scan_id, args.max_wait)
            scan_report = get_scan_report(base_url, user, password, scan_id)
            format_summary([], scan_report=scan_report)
            result = {"scan_id": scan_id, "report": scan_report}
        else:
            result = {"scan_id": scan_id, "status": "launched"}

    report = {
        "timestamp": datetime.now(timezone.utc).isoformat(),
        "tool": "Rapid7 InsightVM",
        "command": args.command,
        "result": result,
    }

    if args.output:
        with open(args.output, "w") as f:
            json.dump(report, f, indent=2)
        print(f"\n[+] Report saved to {args.output}")
    elif args.verbose:
        print(json.dumps(report, indent=2))


if __name__ == "__main__":
    main()
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall