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-patch-management-workflow/scripts/agent.py

View on GitHub
#!/usr/bin/env python3
"""Patch management workflow agent.

Audits system patch compliance by checking installed package versions
against known vulnerabilities, tracking patch SLA adherence, and
generating remediation reports. Supports Linux (apt/yum) and basic
CVE cross-referencing via the CISA KEV catalog.
"""
import argparse
import json
import os
import subprocess
import sys
from datetime import datetime, timezone, timedelta

try:
    import requests
except ImportError:
    requests = None


def check_apt_updates():
    """Check for available security updates on Debian/Ubuntu systems."""
    findings = []
    print("[*] Checking apt security updates...")

    # Update package lists
    result = subprocess.run(
        ["apt-get", "update", "-qq"],
        capture_output=True, text=True, timeout=120,
    )

    # List upgradable packages
    result = subprocess.run(
        ["apt", "list", "--upgradable"],
        capture_output=True, text=True, timeout=60,
    )
    if result.returncode != 0:
        return [{"check": "apt updates", "status": "ERROR", "severity": "HIGH",
                 "detail": result.stderr[:200]}]

    for line in result.stdout.strip().splitlines():
        if "Listing..." in line:
            continue
        parts = line.split("/")
        if len(parts) >= 2:
            pkg_name = parts[0]
            is_security = "security" in line.lower()
            version_info = line.split()
            current = version_info[-1] if len(version_info) > 3 else "unknown"
            available = version_info[1] if len(version_info) > 1 else "unknown"
            findings.append({
                "package": pkg_name,
                "current_version": current,
                "available_version": available,
                "is_security_update": is_security,
                "severity": "CRITICAL" if is_security else "MEDIUM",
            })

    security_count = sum(1 for f in findings if f.get("is_security_update"))
    print(f"[+] Found {len(findings)} updates ({security_count} security)")
    return findings


def check_yum_updates():
    """Check for available security updates on RHEL/CentOS systems."""
    findings = []
    print("[*] Checking yum/dnf security updates...")

    for pkg_mgr in ["dnf", "yum"]:
        result = subprocess.run(
            [pkg_mgr, "check-update", "--security", "-q"],
            capture_output=True, text=True, timeout=120,
        )
        if result.returncode in (0, 100):
            break
    else:
        return [{"check": "yum/dnf", "status": "ERROR", "severity": "HIGH",
                 "detail": "Neither yum nor dnf available"}]

    for line in result.stdout.strip().splitlines():
        parts = line.split()
        if len(parts) >= 3:
            findings.append({
                "package": parts[0],
                "available_version": parts[1],
                "repository": parts[2] if len(parts) > 2 else "",
                "is_security_update": True,
                "severity": "HIGH",
            })

    print(f"[+] Found {len(findings)} security updates")
    return findings


def check_windows_updates():
    """Check for pending Windows updates via PowerShell."""
    findings = []
    print("[*] Checking Windows Update status...")

    ps_script = (
        "Get-HotFix | Sort-Object InstalledOn -Descending | "
        "Select-Object -First 20 HotFixID, Description, InstalledOn | "
        "ConvertTo-Json"
    )
    result = subprocess.run(
        ["powershell", "-Command", ps_script],
        capture_output=True, text=True, timeout=120,
    )
    if result.returncode == 0 and result.stdout.strip():
        try:
            hotfixes = json.loads(result.stdout)
            if isinstance(hotfixes, dict):
                hotfixes = [hotfixes]
            for hf in hotfixes:
                findings.append({
                    "hotfix_id": hf.get("HotFixID", ""),
                    "description": hf.get("Description", ""),
                    "installed_on": str(hf.get("InstalledOn", "")),
                    "status": "installed",
                })
            if hotfixes:
                latest = hotfixes[0]
                installed_date = latest.get("InstalledOn", "")
                print(f"[+] Latest patch: {latest.get('HotFixID', 'N/A')} ({installed_date})")
        except json.JSONDecodeError:
            pass

    return findings


def check_kev_exposure(package_cves):
    """Cross-reference package CVEs against CISA KEV catalog."""
    if not requests:
        return []

    kev_url = "https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json"
    try:
        resp = requests.get(kev_url, timeout=30)
        resp.raise_for_status()
        kev_data = resp.json()
        kev_cves = {v["cveID"] for v in kev_data.get("vulnerabilities", [])}
    except Exception:
        return []

    exposed = []
    for cve_id in package_cves:
        if cve_id.upper() in kev_cves:
            exposed.append({
                "cve_id": cve_id,
                "in_kev": True,
                "severity": "CRITICAL",
                "description": "Actively exploited vulnerability (CISA KEV)",
            })
    return exposed


def assess_patch_sla(findings, sla_days=None):
    """Assess patch compliance against SLA targets."""
    if sla_days is None:
        sla_days = {"CRITICAL": 7, "HIGH": 30, "MEDIUM": 90, "LOW": 180}

    sla_findings = []
    for f in findings:
        severity = f.get("severity", "MEDIUM")
        target_days = sla_days.get(severity, 90)
        sla_findings.append({
            "package": f.get("package", f.get("hotfix_id", "unknown")),
            "severity": severity,
            "sla_target_days": target_days,
            "in_sla": True,  # Would need install date to determine
            "recommendation": f"Patch within {target_days} days per SLA policy",
        })
    return sla_findings


def format_summary(findings, kev_findings, sla_findings, platform):
    """Print patch management summary."""
    print(f"\n{'='*60}")
    print(f"  Patch Management Audit Report")
    print(f"{'='*60}")
    print(f"  Platform        : {platform}")
    print(f"  Pending Updates : {len(findings)}")

    security = sum(1 for f in findings if f.get("is_security_update"))
    print(f"  Security Updates: {security}")
    print(f"  KEV Matches     : {len(kev_findings)}")

    severity_counts = {}
    for f in findings:
        sev = f.get("severity", "MEDIUM")
        severity_counts[sev] = severity_counts.get(sev, 0) + 1

    print(f"\n  By Severity:")
    for sev in ["CRITICAL", "HIGH", "MEDIUM", "LOW"]:
        count = severity_counts.get(sev, 0)
        if count > 0:
            print(f"    {sev:10s}: {count}")

    if kev_findings:
        print(f"\n  CISA KEV Exposed CVEs (IMMEDIATE ACTION):")
        for k in kev_findings:
            print(f"    {k['cve_id']}: {k['description']}")

    if findings:
        print(f"\n  Pending Updates:")
        for f in findings[:20]:
            pkg = f.get("package", f.get("hotfix_id", "unknown"))
            sev = f.get("severity", "MEDIUM")
            sec = " [SECURITY]" if f.get("is_security_update") else ""
            print(f"    [{sev:8s}] {pkg}{sec}")

    return severity_counts


def main():
    parser = argparse.ArgumentParser(
        description="Patch management workflow audit agent"
    )
    parser.add_argument("--platform", choices=["auto", "apt", "yum", "windows"],
                        default="auto", help="Package manager to check")
    parser.add_argument("--cves", nargs="+", help="CVE IDs to check against KEV")
    parser.add_argument("--sla-critical", type=int, default=7, help="SLA days for critical (default: 7)")
    parser.add_argument("--sla-high", type=int, default=30, help="SLA days for high (default: 30)")
    parser.add_argument("--output", "-o", help="Output JSON report path")
    parser.add_argument("--verbose", "-v", action="store_true")
    args = parser.parse_args()

    findings = []
    platform = args.platform

    if platform == "auto":
        if sys.platform == "win32":
            platform = "windows"
        elif os.path.isfile("/usr/bin/apt"):
            platform = "apt"
        elif os.path.isfile("/usr/bin/yum") or os.path.isfile("/usr/bin/dnf"):
            platform = "yum"
        else:
            print("[!] Could not detect package manager", file=sys.stderr)
            sys.exit(1)

    if platform == "apt":
        findings = check_apt_updates()
    elif platform == "yum":
        findings = check_yum_updates()
    elif platform == "windows":
        findings = check_windows_updates()

    kev_findings = []
    if args.cves:
        kev_findings = check_kev_exposure(args.cves)

    sla_days = {"CRITICAL": args.sla_critical, "HIGH": args.sla_high, "MEDIUM": 90, "LOW": 180}
    sla_findings = assess_patch_sla(findings, sla_days)

    severity_counts = format_summary(findings, kev_findings, sla_findings, platform)

    report = {
        "timestamp": datetime.now(timezone.utc).isoformat(),
        "tool": "Patch Management Audit",
        "platform": platform,
        "pending_updates": findings,
        "kev_exposure": kev_findings,
        "sla_assessment": sla_findings,
        "severity_counts": severity_counts,
        "risk_level": (
            "CRITICAL" if kev_findings or severity_counts.get("CRITICAL", 0) > 0
            else "HIGH" if severity_counts.get("HIGH", 0) > 0
            else "MEDIUM" if findings
            else "LOW"
        ),
    }

    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: 196kUpdated 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: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 193kUpdated 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: 193kUpdated Claude CodeCodexVerifiedInstall