[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75TH4T0D6W4G9NZZM8R6P9W":3,"skill-same:01M75TH4T0D6W4G9NZZM8R6P9W":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M75TH4T0D6W4G9NZZM8R6P9W","threat-scope",null,"OpenClaw skill for ThreatScope — fetches CVE feeds from NVD, GitHub Security Advisories, and the CISA Known Exploited Vulnerabilities (KEV) catalog, filters results to a user-defined stack profile, and returns a synthesized brief for the R1 device.","ajohnsonnow\u002Fr1-warren","ajohnsonnow","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8867891?v=4","01M75T7TQ3B5VRHJF6X2Q7AWWW","Anthony Johnson","01M75T7TQPJG8YZTAVCH4SQW27",0,"MIT","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fthreat-scope\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: threat-scope\ndescription: >\n  OpenClaw skill for ThreatScope — fetches CVE feeds from NVD, GitHub Security\n  Advisories, and the CISA Known Exploited Vulnerabilities (KEV) catalog, filters\n  results to a user-defined stack profile, and returns a synthesized brief for the\n  R1 device.\nversion: 1.0.0\nauthor: rabbit-r1-skillz\n---\n\n# ThreatScope — Local Skill Setup\n\nThreatScope uses the OpenClaw bridge to reach external security feeds from your local\nmachine. The R1 device sends a fetch command; this skill queries live APIs, filters to\nyour stack, and returns structured CVE data.\n\n---\n\n## What the skill does\n\n1. Receives a `fetch-brief` command with a `stack` array (technology IDs).\n2. Queries three sources in parallel:\n   - **NVD CVE API** — `https:\u002F\u002Fservices.nvd.nist.gov\u002Frest\u002Fjson\u002Fcves\u002F2.0`\n   - **GitHub Security Advisories** — `https:\u002F\u002Fapi.github.com\u002Fadvisories`\n   - **CISA KEV catalog** — `https:\u002F\u002Fwww.cisa.gov\u002Fsites\u002Fdefault\u002Ffiles\u002Ffeeds\u002Fknown_exploited_vulnerabilities.json`\n3. Filters results to CVEs that reference any technology in the `stack` list.\n4. Returns a structured array of CVE objects to the R1.\n\n---\n\n## Prerequisites\n\n| Requirement | Notes |\n|---|---|\n| Node.js 20+ | `node --version` to verify |\n| OpenClaw daemon | Install from the RabbitOS developer portal; must be running |\n| NVD API key (optional) | Free at https:\u002F\u002Fnvd.nist.gov\u002Fdevelopers\u002Frequest-an-api-key — increases rate limit from 5 req\u002F30s to 50 req\u002F30s |\n| Internet access | Machine must reach nvd.nist.gov, api.github.com, and cisa.gov |\n\n---\n\n## Installation\n\n```bash\n# From the rabbit-r1-skillz project root\ncd threat-scope\nnpm install   # installs node-fetch and openclaw-sdk\n```\n\nIf there is no `package.json` yet, create one:\n\n```bash\nnpm init -y\nnpm install node-fetch@3 openclaw-sdk\n```\n\n---\n\n## Skill file: `skill.mjs`\n\nCreate `threat-scope\u002Fskill.mjs` with the following content:\n\n```javascript\nimport { OpenClaw } from 'openclaw-sdk';\nimport fetch from 'node-fetch';\n\nconst NVD_API_KEY = process.env.NVD_API_KEY || '';\nconst CACHE_TTL_MS = 6 * 60 * 60 * 1000;   \u002F\u002F 6 hours\n\n\u002F\u002F Component keyword map — expand to match your stack\nconst COMPONENT_KEYWORDS = {\n  nodejs:        ['node.js', 'nodejs', 'node js', 'npm'],\n  react:         ['react', 'reactjs', 'react.js', 'create-react-app'],\n  nextjs:        ['next.js', 'nextjs', 'vercel\u002Fnext'],\n  typescript:    ['typescript', 'ts-node'],\n  postgresql:    ['postgresql', 'postgres', 'libpq', 'pg_'],\n  redis:         ['redis', 'valkey'],\n  mongodb:       ['mongodb', 'mongo', 'mongoose'],\n  docker:        ['docker', 'moby', 'containerd', 'runc'],\n  kubernetes:    ['kubernetes', 'k8s', 'kubectl', 'kubelet', 'kube-apiserver'],\n  nginx:         ['nginx'],\n  aws:           ['amazon web services', 'aws-sdk', 'boto3', 's3', 'ec2', 'lambda'],\n  gcp:           ['google cloud', 'gcp', 'gke', 'cloud run'],\n  azure:         ['azure', 'microsoft azure', 'az cli'],\n  stripe:        ['stripe'],\n  linux:         ['linux kernel', 'linux', 'glibc', 'systemd'],\n  openssl:       ['openssl', 'libssl'],\n  python:        ['python', 'cpython', 'pip'],\n  django:        ['django'],\n  express:       ['expressjs', 'express.js', 'express'],\n  graphql:       ['graphql', 'apollo-server'],\n  elasticsearch: ['elasticsearch', 'opensearch', 'elastic'],\n  rabbitmq:      ['rabbitmq', 'erlang amqp'],\n  terraform:     ['terraform', 'hashicorp\u002Fterraform'],\n  github:        ['github actions', 'actions\u002Frunner', 'gh-actions'],\n};\n\nlet cache = null;\n\nconst oc = new OpenClaw({ skillName: 'threat-scope' });\n\noc.on('fetch-brief', async (payload, respond) => {\n  const stack = payload.stack || [];\n\n  \u002F\u002F Return cached result if fresh\n  if (cache && (Date.now() - cache.ts) \u003C CACHE_TTL_MS) {\n    const filtered = filterToStack(cache.cves, stack);\n    respond({ cves: filtered, sources: cache.sources, kevCount: filtered.filter(c => c.isKEV).length });\n    return;\n  }\n\n  try {\n    const [nvdCVEs, ghAdvisories, kevList] = await Promise.allSettled([\n      fetchNVD(),\n      fetchGitHubAdvisories(),\n      fetchCISAKEV(),\n    ]);\n\n    const allCVEs = [];\n    const sources = [];\n\n    if (nvdCVEs.status === 'fulfilled') {\n      allCVEs.push(...nvdCVEs.value);\n      sources.push('NVD');\n    }\n    if (ghAdvisories.status === 'fulfilled') {\n      mergeCVEs(allCVEs, ghAdvisories.value, 'GitHub');\n      sources.push('GitHub');\n    }\n\n    let kevIds = new Set();\n    if (kevList.status === 'fulfilled') {\n      kevIds = new Set(kevList.value.map(k => k.cveID));\n      sources.push('CISA');\n    }\n\n    \u002F\u002F Mark KEV status\n    allCVEs.forEach(cve => { cve.isKEV = kevIds.has(cve.id); });\n\n    cache = { ts: Date.now(), cves: allCVEs, sources };\n\n    const filtered = filterToStack(allCVEs, stack);\n    respond({ cves: filtered, sources, kevCount: filtered.filter(c => c.isKEV).length });\n\n  } catch (err) {\n    respond({ error: err.message });\n  }\n});\n\n\u002F* ── NVD fetch ────────────────────────────────────────────── *\u002F\nasync function fetchNVD() {\n  const params = new URLSearchParams({\n    resultsPerPage: 200,\n    pubStartDate: isoDateDaysAgo(30),\n    pubEndDate: new Date().toISOString().slice(0, 19) + '.000',\n  });\n  const headers = { 'User-Agent': 'threat-scope\u002F1.0' };\n  if (NVD_API_KEY) headers['apiKey'] = NVD_API_KEY;\n\n  const res = await fetch('https:\u002F\u002Fservices.nvd.nist.gov\u002Frest\u002Fjson\u002Fcves\u002F2.0?' + params, { headers });\n  if (!res.ok) throw new Error('NVD returned ' + res.status);\n  const data = await res.json();\n\n  return (data.vulnerabilities || []).map(v => {\n    const cve    = v.cve;\n    const desc   = (cve.descriptions || []).find(d => d.lang === 'en');\n    const cvssV3 = cve.metrics && (cve.metrics.cvssMetricV31 || cve.metrics.cvssMetricV30);\n    const cvssScore = cvssV3 && cvssV3[0] ? cvssV3[0].cvssData.baseScore : null;\n    const sevChar = cvssScore !== null\n      ? (cvssScore >= 9.0 ? 'C' : cvssScore >= 7.0 ? 'H' : cvssScore >= 4.0 ? 'M' : 'L')\n      : 'M';\n\n    const patches = (cve.references || []).filter(r =>\n      r.tags && (r.tags.includes('Patch') || r.tags.includes('Vendor Advisory'))\n    );\n\n    return {\n      id:           cve.id,\n      description:  desc ? desc.value : '',\n      severity:     sevChar,\n      cvss:         cvssScore,\n      cvssVector:   cvssV3 && cvssV3[0] ? cvssV3[0].cvssData.vectorString : null,\n      patchAvailable: patches.length > 0,\n      patchVersion: null,\n      component:    inferComponent(desc ? desc.value : '', cve.id),\n      source:       'NVD',\n      publishedDate: cve.published,\n      isKEV:        false,\n    };\n  });\n}\n\n\u002F* ── GitHub Advisory fetch ────────────────────────────────── *\u002F\nasync function fetchGitHubAdvisories() {\n  const res = await fetch(\n    'https:\u002F\u002Fapi.github.com\u002Fadvisories?per_page=100&type=reviewed&sort=updated',\n    {\n      headers: {\n        'Accept': 'application\u002Fvnd.github+json',\n        'User-Agent': 'threat-scope\u002F1.0',\n        'X-GitHub-Api-Version': '2022-11-28',\n      },\n    }\n  );\n  if (!res.ok) throw new Error('GitHub returned ' + res.status);\n  const data = await res.json();\n\n  return data\n    .filter(a => a.cve_id)\n    .map(a => {\n      const sevChar = mapGHSeverity(a.severity);\n      return {\n        id:            a.cve_id,\n        description:   a.summary || a.description || '',\n        severity:      sevChar,\n        cvss:          a.cvss && a.cvss.score ? a.cvss.score : null,\n        cvssVector:    a.cvss && a.cvss.vector_string ? a.cvss.vector_string : null,\n        patchAvailable: !!(a.vulnerabilities && a.vulnerabilities.some(v => v.patched_versions)),\n        patchVersion:  a.vulnerabilities && a.vulnerabilities[0]\n          ? (a.vulnerabilities[0].patched_versions || [null])[0]\n          : null,\n        component:     a.package ? (a.package.name || a.package.ecosystem) : inferComponent(a.summary || '', a.cve_id),\n        source:        'GitHub',\n        publishedDate: a.published_at,\n        isKEV:         false,\n      };\n    });\n}\n\n\u002F* ── CISA KEV fetch ───────────────────────────────────────── *\u002F\nasync function fetchCISAKEV() {\n  const res = await fetch(\n    'https:\u002F\u002Fwww.cisa.gov\u002Fsites\u002Fdefault\u002Ffiles\u002Ffeeds\u002Fknown_exploited_vulnerabilities.json',\n    { headers: { 'User-Agent': 'threat-scope\u002F1.0' } }\n  );\n  if (!res.ok) throw new Error('CISA returned ' + res.status);\n  const data = await res.json();\n  return data.vulnerabilities || [];\n}\n\n\u002F* ── Helpers ──────────────────────────────────────────────── *\u002F\nfunction filterToStack(cves, stack) {\n  if (!stack || stack.length === 0) return [];\n  const keywords = stack.flatMap(id => COMPONENT_KEYWORDS[id] || [id.toLowerCase()]);\n  return cves.filter(cve => {\n    const text = ((cve.description || '') + ' ' + (cve.component || '')).toLowerCase();\n    return keywords.some(kw => text.includes(kw));\n  });\n}\n\nfunction inferComponent(description, cveId) {\n  const text = description.toLowerCase();\n  for (const [id, keywords] of Object.entries(COMPONENT_KEYWORDS)) {\n    if (keywords.some(kw => text.includes(kw))) {\n      \u002F\u002F Return a clean display name\n      const name = kw.charAt(0).toUpperCase() + kw.slice(1);\n      return name;\n    }\n  }\n  return cveId;\n}\n\nfunction mapGHSeverity(s) {\n  const map = { critical: 'C', high: 'H', moderate: 'M', medium: 'M', low: 'L' };\n  return map[(s || '').toLowerCase()] || 'M';\n}\n\nfunction mergeCVEs(target, incoming, source) {\n  for (const cve of incoming) {\n    const existing = target.find(c => c.id === cve.id);\n    if (existing) {\n      \u002F\u002F Prefer GitHub data for patch version\n      if (cve.patchVersion) existing.patchVersion = cve.patchVersion;\n      if (cve.patchAvailable) existing.patchAvailable = true;\n    } else {\n      target.push(cve);\n    }\n  }\n}\n\nfunction isoDateDaysAgo(days) {\n  const d = new Date(Date.now() - days * 24 * 60 * 60 * 1000);\n  return d.toISOString().slice(0, 19) + '.000';\n}\n\nconsole.log('[threat-scope] Skill running. Waiting for R1 commands…');\noc.listen();\n```\n\n---\n\n## Running the skill\n\n```bash\nnode threat-scope\u002Fskill.mjs\n```\n\nSet your NVD API key for higher rate limits:\n\n```bash\nNVD_API_KEY=your-key-here node threat-scope\u002Fskill.mjs\n```\n\nKeep it running whenever you want ThreatScope to work on the R1. Use a process manager\nlike `pm2` or a systemd service to auto-start on boot:\n\n```bash\n# With pm2\nnpm install -g pm2\npm2 start threat-scope\u002Fskill.mjs --name threat-scope\npm2 save\npm2 startup\n```\n\n---\n\n## Environment variables\n\n| Variable | Required | Description |\n|---|---|---|\n| `NVD_API_KEY` | No | NVD API key for higher rate limits (recommended) |\n| `OPENCLAW_PORT` | No | Override default OpenClaw port (default: per openclaw-sdk config) |\n\n---\n\n## Response schema\n\nThe skill returns the following JSON to the R1:\n\n```json\n{\n  \"cves\": [\n    {\n      \"id\": \"CVE-2025-12345\",\n      \"description\": \"A heap buffer overflow in Node.js…\",\n      \"severity\": \"C\",\n      \"cvss\": 9.8,\n      \"cvssVector\": \"CVSS:3.1\u002FAV:N\u002FAC:L\u002FPR:N\u002FUI:N\u002FS:U\u002FC:H\u002FI:H\u002FA:H\",\n      \"patchAvailable\": true,\n      \"patchVersion\": \"22.14.1\",\n      \"component\": \"Node.js\",\n      \"source\": \"NVD\",\n      \"publishedDate\": \"2025-06-01T00:00:00.000\",\n      \"isKEV\": false\n    }\n  ],\n  \"sources\": [\"NVD\", \"GitHub\", \"CISA\"],\n  \"kevCount\": 0\n}\n```\n\nSeverity values: `C` = Critical (CVSS 9.0–10.0), `H` = High (7.0–8.9), `M` = Medium\n(4.0–6.9), `L` = Low (0.1–3.9).\n\n---\n\n## Privacy notes\n\n- No CVE data or stack profile is sent to any third party — all requests go directly\n  from your local machine to the public NVD, GitHub, and CISA APIs.\n- The R1 device only receives filtered results; your full stack list never leaves your\n  local machine unfiltered.\n- No authentication credentials are required for the public feeds.\n\n---\n\n## Troubleshooting\n\n| Symptom | Fix |\n|---|---|\n| \"No response from threat-scope skill\" | Verify `node skill.mjs` is running; check OpenClaw daemon is active |\n| Rate limited by NVD | Add an NVD API key via `NVD_API_KEY` env var |\n| No CVEs returned for your stack | Expand the `COMPONENT_KEYWORDS` map with aliases matching your specific package names |\n| CISA KEV fetch fails | Check internet connectivity; CISA occasionally updates the URL — check https:\u002F\u002Fwww.cisa.gov\u002Fknown-exploited-vulnerabilities-catalog for the latest feed URL |\n","# ThreatScope — Local Skill Setup\n\nThreatScope uses the OpenClaw bridge to reach external security feeds from your local\nmachine. The R1 device sends a fetch command; this skill queries live APIs, filters to\nyour stack, and returns structured CVE data.\n\n---\n\n## What the skill does\n\n1. Receives a `fetch-brief` command with a `stack` array (technology IDs).\n2. Queries three sources in parallel:\n   - **NVD CVE API** — `https:\u002F\u002Fservices.nvd.nist.gov\u002Frest\u002Fjson\u002Fcves\u002F2.0`\n   - **GitHub Security Advisories** — `https:\u002F\u002Fapi.github.com\u002Fadvisories`\n   - **CISA KEV catalog** — `https:\u002F\u002Fwww.cisa.gov\u002Fsites\u002Fdefault\u002Ffiles\u002Ffeeds\u002Fknown_exploited_vulnerabilities.json`\n3. Filters results to CVEs that reference any technology in the `stack` list.\n4. Returns a structured array of CVE objects to the R1.\n\n---\n\n## Prerequisites\n\n| Requirement | Notes |\n|---|---|\n| Node.js 20+ | `node --version` to verify |\n| OpenClaw daemon | Install from the RabbitOS developer portal; must be running |\n| NVD API key (optional) | Free at https:\u002F\u002Fnvd.nist.gov\u002Fdevelopers\u002Frequest-an-api-key — increases rate limit from 5 req\u002F30s to 50 req\u002F30s |\n| Internet access | Machine must reach nvd.nist.gov, api.github.com, and cisa.gov |\n\n---\n\n## Installation\n\n```bash\n# From the rabbit-r1-skillz project root\ncd threat-scope\nnpm install   # installs node-fetch and openclaw-sdk\n```\n\nIf there is no `package.json` yet, create one:\n\n```bash\nnpm init -y\nnpm install node-fetch@3 openclaw-sdk\n```\n\n---\n\n## Skill file: `skill.mjs`\n\nCreate `threat-scope\u002Fskill.mjs` with the following content:\n\n```javascript\nimport { OpenClaw } from 'openclaw-sdk';\nimport fetch from 'node-fetch';\n\nconst NVD_API_KEY = process.env.NVD_API_KEY || '';\nconst CACHE_TTL_MS = 6 * 60 * 60 * 1000;   \u002F\u002F 6 hours\n\n\u002F\u002F Component keyword map — expand to match your stack\nconst COMPONENT_KEYWORDS = {\n  nodejs:        ['node.js', 'nodejs', 'node js', 'npm'],\n  react:         ['react', 'reactjs', 'react.js', 'create-react-app'],\n  nextjs:        ['next.js', 'nextjs', 'vercel\u002Fnext'],\n  typescript:    ['typescript', 'ts-node'],\n  postgresql:    ['postgresql', 'postgres', 'libpq', 'pg_'],\n  redis:         ['redis', 'valkey'],\n  mongodb:       ['mongodb', 'mongo', 'mongoose'],\n  docker:        ['docker', 'moby', 'containerd', 'runc'],\n  kubernetes:    ['kubernetes', 'k8s', 'kubectl', 'kubelet', 'kube-apiserver'],\n  nginx:         ['nginx'],\n  aws:           ['amazon web services', 'aws-sdk', 'boto3', 's3', 'ec2', 'lambda'],\n  gcp:           ['google cloud', 'gcp', 'gke', 'cloud run'],\n  azure:         ['azure', 'microsoft azure', 'az cli'],\n  stripe:        ['stripe'],\n  linux:         ['linux kernel', 'linux', 'glibc', 'systemd'],\n  openssl:       ['openssl', 'libssl'],\n  python:        ['python', 'cpython', 'pip'],\n  django:        ['django'],\n  express:       ['expressjs', 'express.js', 'express'],\n  graphql:       ['graphql', 'apollo-server'],\n  elasticsearch: ['elasticsearch', 'opensearch', 'elastic'],\n  rabbitmq:      ['rabbitmq', 'erlang amqp'],\n  terraform:     ['terraform', 'hashicorp\u002Fterraform'],\n  github:        ['github actions', 'actions\u002Frunner', 'gh-actions'],\n};\n\nlet cache = null;\n\nconst oc = new OpenClaw({ skillName: 'threat-scope' });\n\noc.on('fetch-brief', async (payload, respond) => {\n  const stack = payload.stack || [];\n\n  \u002F\u002F Return cached result if fresh\n  if (cache && (Date.now() - cache.ts) \u003C CACHE_TTL_MS) {\n    const filtered = filterToStack(cache.cves, stack);\n    respond({ cves: filtered, sources: cache.sources, kevCount: filtered.filter(c => c.isKEV).length });\n    return;\n  }\n\n  try {\n    const [nvdCVEs, ghAdvisories, kevList] = await Promise.allSettled([\n      fetchNVD(),\n      fetchGitHubAdvisories(),\n      fetchCISAKEV(),\n    ]);\n\n    const allCVEs = [];\n    const sources = [];\n\n    if (nvdCVEs.status === 'fulfilled') {\n      allCVEs.push(...nvdCVEs.value);\n      sources.push('NVD');\n    }\n    if (ghAdvisories.status === 'fulfilled') {\n      mergeCVEs(allCVEs, ghAdvisories.value, 'GitHub');\n      sources.push('GitHub');\n    }\n\n    let kevIds = new Set();\n    if (kevList.status === 'fulfilled') {\n      kevIds = new Set(kevList.value.map(k => k.cveID));\n      sources.push('CISA');\n    }\n\n    \u002F\u002F Mark KEV status\n    allCVEs.forEach(cve => { cve.isKEV = kevIds.has(cve.id); });\n\n    cache = { ts: Date.now(), cves: allCVEs, sources };\n\n    const filtered = filterToStack(allCVEs, stack);\n    respond({ cves: filtered, sources, kevCount: filtered.filter(c => c.isKEV).length });\n\n  } catch (err) {\n    respond({ error: err.message });\n  }\n});\n\n\u002F* ── NVD fetch ────────────────────────────────────────────── *\u002F\nasync function fetchNVD() {\n  const params = new URLSearchParams({\n    resultsPerPage: 200,\n    pubStartDate: isoDateDaysAgo(30),\n    pubEndDate: new Date().toISOString().slice(0, 19) + '.000',\n  });\n  const headers = { 'User-Agent': 'threat-scope\u002F1.0' };\n  if (NVD_API_KEY) headers['apiKey'] = NVD_API_KEY;\n\n  const res = await fetch('https:\u002F\u002Fservices.nvd.nist.gov\u002Frest\u002Fjson\u002Fcves\u002F2.0?' + params, { headers });\n  if (!res.ok) throw new Error('NVD returned ' + res.status);\n  const data = await res.json();\n\n  return (data.vulnerabilities || []).map(v => {\n    const cve    = v.cve;\n    const desc   = (cve.descriptions || []).find(d => d.lang === 'en');\n    const cvssV3 = cve.metrics && (cve.metrics.cvssMetricV31 || cve.metrics.cvssMetricV30);\n    const cvssScore = cvssV3 && cvssV3[0] ? cvssV3[0].cvssData.baseScore : null;\n    const sevChar = cvssScore !== null\n      ? (cvssScore >= 9.0 ? 'C' : cvssScore >= 7.0 ? 'H' : cvssScore >= 4.0 ? 'M' : 'L')\n      : 'M';\n\n    const patches = (cve.references || []).filter(r =>\n      r.tags && (r.tags.includes('Patch') || r.tags.includes('Vendor Advisory'))\n    );\n\n    return {\n      id:           cve.id,\n      description:  desc ? desc.value : '',\n      severity:     sevChar,\n      cvss:         cvssScore,\n      cvssVector:   cvssV3 && cvssV3[0] ? cvssV3[0].cvssData.vectorString : null,\n      patchAvailable: patches.length > 0,\n      patchVersion: null,\n      component:    inferComponent(desc ? desc.value : '', cve.id),\n      source:       'NVD',\n      publishedDate: cve.published,\n      isKEV:        false,\n    };\n  });\n}\n\n\u002F* ── GitHub Advisory fetch ────────────────────────────────── *\u002F\nasync function fetchGitHubAdvisories() {\n  const res = await fetch(\n    'https:\u002F\u002Fapi.github.com\u002Fadvisories?per_page=100&type=reviewed&sort=updated',\n    {\n      headers: {\n        'Accept': 'application\u002Fvnd.github+json',\n        'User-Agent': 'threat-scope\u002F1.0',\n        'X-GitHub-Api-Version': '2022-11-28',\n      },\n    }\n  );\n  if (!res.ok) throw new Error('GitHub returned ' + res.status);\n  const data = await res.json();\n\n  return data\n    .filter(a => a.cve_id)\n    .map(a => {\n      const sevChar = mapGHSeverity(a.severity);\n      return {\n        id:            a.cve_id,\n        description:   a.summary || a.description || '',\n        severity:      sevChar,\n        cvss:          a.cvss && a.cvss.score ? a.cvss.score : null,\n        cvssVector:    a.cvss && a.cvss.vector_string ? a.cvss.vector_string : null,\n        patchAvailable: !!(a.vulnerabilities && a.vulnerabilities.some(v => v.patched_versions)),\n        patchVersion:  a.vulnerabilities && a.vulnerabilities[0]\n          ? (a.vulnerabilities[0].patched_versions || [null])[0]\n          : null,\n        component:     a.package ? (a.package.name || a.package.ecosystem) : inferComponent(a.summary || '', a.cve_id),\n        source:        'GitHub',\n        publishedDate: a.published_at,\n        isKEV:         false,\n      };\n    });\n}\n\n\u002F* ── CISA KEV fetch ───────────────────────────────────────── *\u002F\nasync function fetchCISAKEV() {\n  const res = await fetch(\n    'https:\u002F\u002Fwww.cisa.gov\u002Fsites\u002Fdefault\u002Ffiles\u002Ffeeds\u002Fknown_exploited_vulnerabilities.json',\n    { headers: { 'User-Agent': 'threat-scope\u002F1.0' } }\n  );\n  if (!res.ok) throw new Error('CISA returned ' + res.status);\n  const data = await res.json();\n  return data.vulnerabilities || [];\n}\n\n\u002F* ── Helpers ──────────────────────────────────────────────── *\u002F\nfunction filterToStack(cves, stack) {\n  if (!stack || stack.length === 0) return [];\n  const keywords = stack.flatMap(id => COMPONENT_KEYWORDS[id] || [id.toLowerCase()]);\n  return cves.filter(cve => {\n    const text = ((cve.description || '') + ' ' + (cve.component || '')).toLowerCase();\n    return keywords.some(kw => text.includes(kw));\n  });\n}\n\nfunction inferComponent(description, cveId) {\n  const text = description.toLowerCase();\n  for (const [id, keywords] of Object.entries(COMPONENT_KEYWORDS)) {\n    if (keywords.some(kw => text.includes(kw))) {\n      \u002F\u002F Return a clean display name\n      const name = kw.charAt(0).toUpperCase() + kw.slice(1);\n      return name;\n    }\n  }\n  return cveId;\n}\n\nfunction mapGHSeverity(s) {\n  const map = { critical: 'C', high: 'H', moderate: 'M', medium: 'M', low: 'L' };\n  return map[(s || '').toLowerCase()] || 'M';\n}\n\nfunction mergeCVEs(target, incoming, source) {\n  for (const cve of incoming) {\n    const existing = target.find(c => c.id === cve.id);\n    if (existing) {\n      \u002F\u002F Prefer GitHub data for patch version\n      if (cve.patchVersion) existing.patchVersion = cve.patchVersion;\n      if (cve.patchAvailable) existing.patchAvailable = true;\n    } else {\n      target.push(cve);\n    }\n  }\n}\n\nfunction isoDateDaysAgo(days) {\n  const d = new Date(Date.now() - days * 24 * 60 * 60 * 1000);\n  return d.toISOString().slice(0, 19) + '.000';\n}\n\nconsole.log('[threat-scope] Skill running. Waiting for R1 commands…');\noc.listen();\n```\n\n---\n\n## Running the skill\n\n```bash\nnode threat-scope\u002Fskill.mjs\n```\n\nSet your NVD API key for higher rate limits:\n\n```bash\nNVD_API_KEY=your-key-here node threat-scope\u002Fskill.mjs\n```\n\nKeep it running whenever you want ThreatScope to work on the R1. Use a process manager\nlike `pm2` or a systemd service to auto-start on boot:\n\n```bash\n# With pm2\nnpm install -g pm2\npm2 start threat-scope\u002Fskill.mjs --name threat-scope\npm2 save\npm2 startup\n```\n\n---\n\n## Environment variables\n\n| Variable | Required | Description |\n|---|---|---|\n| `NVD_API_KEY` | No | NVD API key for higher rate limits (recommended) |\n| `OPENCLAW_PORT` | No | Override default OpenClaw port (default: per openclaw-sdk config) |\n\n---\n\n## Response schema\n\nThe skill returns the following JSON to the R1:\n\n```json\n{\n  \"cves\": [\n    {\n      \"id\": \"CVE-2025-12345\",\n      \"description\": \"A heap buffer overflow in Node.js…\",\n      \"severity\": \"C\",\n      \"cvss\": 9.8,\n      \"cvssVector\": \"CVSS:3.1\u002FAV:N\u002FAC:L\u002FPR:N\u002FUI:N\u002FS:U\u002FC:H\u002FI:H\u002FA:H\",\n      \"patchAvailable\": true,\n      \"patchVersion\": \"22.14.1\",\n      \"component\": \"Node.js\",\n      \"source\": \"NVD\",\n      \"publishedDate\": \"2025-06-01T00:00:00.000\",\n      \"isKEV\": false\n    }\n  ],\n  \"sources\": [\"NVD\", \"GitHub\", \"CISA\"],\n  \"kevCount\": 0\n}\n```\n\nSeverity values: `C` = Critical (CVSS 9.0–10.0), `H` = High (7.0–8.9), `M` = Medium\n(4.0–6.9), `L` = Low (0.1–3.9).\n\n---\n\n## Privacy notes\n\n- No CVE data or stack profile is sent to any third party — all requests go directly\n  from your local machine to the public NVD, GitHub, and CISA APIs.\n- The R1 device only receives filtered results; your full stack list never leaves your\n  local machine unfiltered.\n- No authentication credentials are required for the public feeds.\n\n---\n\n## Troubleshooting\n\n| Symptom | Fix |\n|---|---|\n| \"No response from threat-scope skill\" | Verify `node skill.mjs` is running; check OpenClaw daemon is active |\n| Rate limited by NVD | Add an NVD API key via `NVD_API_KEY` env var |\n| No CVEs returned for your stack | Expand the `COMPONENT_KEYWORDS` map with aliases matching your specific package names |\n| CISA KEV fetch fails | Check internet connectivity; CISA occasionally updates the URL — check https:\u002F\u002Fwww.cisa.gov\u002Fknown-exploited-vulnerabilities-catalog for the latest feed URL |\n",{"name":5,"author":24,"version":25,"description":26},"rabbit-r1-skillz","1.0.0","OpenClaw skill for ThreatScope — fetches CVE feeds from NVD, GitHub Security Advisories, and the CISA Known Exploited Vulnerabilities (KEV) catalog, filters results to a user-defined stack profile, and returns a synthesized brief for the R1 device.\n","main","734489c70f6293d3b800cd956559034acaa9f563","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren","https:\u002F\u002Fgithub.com\u002Fajohnsonnow","structuredforgrowth.com","2026-09-04 21:06:25",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add ajohnsonnow\u002Fr1-warren --skill threat-scope",{"tool":39,"command":40},"bunx","bunx skills add ajohnsonnow\u002Fr1-warren --skill threat-scope",{"tool":42,"command":43},"pnpm","pnpm dlx skills add ajohnsonnow\u002Fr1-warren --skill threat-scope","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fthreat-scope\u002FSKILL.md",true,[47,53,57],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"card.jpg","ASSET","资产文件",26858,"https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fthreat-scope\u002Fcard.jpg",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"icon.png",11644,"https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fthreat-scope\u002Ficon.png",{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"index.html","REFERENCE","参考文档",60406,"https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fthreat-scope\u002Findex.html",[64,71,78,85,92,99],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M75THZJQ1XYR8QDWB9RXC9QV","whisper-quiz","WhisperQuiz — voice-answered trivia game for Rabbit R1. Generates questions via the R1's built-in LLM, captures spoken answers via STT, and evaluates correctness with flexible LLM-based matching.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fwhisper-quiz\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M75THW5BJRSQQM3QP6M568FT","walk-cast","Walking podcast production skill. Receives raw audio metadata and transcript from the R1, removes long pauses, applies noise reduction and normalization, generates AI chapter titles and episode metadata via LLM, and uploads the final episode to your configured podcast RSS host (Spotify for Podcasters \u002F Anchor, Podbean, Buzzsprout, RSS.com, or any FTP-accessible feed).","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fwalk-cast\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M75THTANZTS2AMDDBP615RTA","voice-novel","Local machine skill for VoiceNovel — handles story export to disk.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fvoice-novel\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M75THQ175ZRJ3E0GPFW7QKM8","voice-guide","Environment description and navigation assistant for blind and low-vision users. Analyzes camera frames via a vision LLM, reads visible text, identifies scene categories (people\u002Fvehicles\u002Ffood\u002Fhazards\u002Fexits), performs 360° scans, retrieves GPS position, and sends emergency SMS alerts — all via audio feedback with zero screen dependency.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fvoice-guide\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M75THKAJR69WV7QQYJ26X95C","voice-draft","Voice-driven document drafting for the Rabbit R1. Dictate stream-of-consciousness speech; the R1 formats it into Email, Blog Post, Report, Proposal, Meeting Notes, Creative Writing, Code Comments, Cover Letter, or Tweet Thread — then saves the result to a configured folder on your local machine via OpenClaw.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fvoice-draft\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M75THGKGY2JY59MM9PREXCXX","voice-commit","Hands-free git and CI workflow voice controller for the Rabbit R1. Speak git\u002FCI commands and hear results — commit, push, status, PR management, test runs, and deploy, all voice-driven via OpenClaw.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fvoice-commit\u002FSKILL.md",[],[]]