Skip to content

Exploitability Context for CVE Advisories#89

Open
davida-ps wants to merge 7 commits intomainfrom
auto-claude/008-exploitability-context-for-cve-advisories
Open

Exploitability Context for CVE Advisories#89
davida-ps wants to merge 7 commits intomainfrom
auto-claude/008-exploitability-context-for-cve-advisories

Conversation

@davida-ps
Copy link
Collaborator

@davida-ps davida-ps commented Feb 27, 2026

User description

  • Agent (automated)

Summary

Added exploitability context for CVE advisories to reduce alert fatigue by providing platform-specific vulnerability assessment. Enhanced advisory feed with exploitability scoring and rationale explaining whether CVEs are actually exploitable in typical OpenClaw/NanoClaw deployments.

Changes Made

  • Added exploitability_score field (high/medium/low/unknown) to each advisory in feed.json
  • Added exploitability_rationale field with contextual analysis explaining the exploitability assessment
  • Updated advisory workflows and feed generation logic to compute and include exploitability context
  • Enhanced documentation and README with exploitability guidance
  • Configured GitHub Actions workflows to process and surface high-exploitability CVEs prominently

Related Issues

Addresses exploitability context enhancement for CVE advisories


Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Security incident (please open a Security Incident Report issue instead of a PR)

Testing

Manual verification of feed.json structure confirms exploitability_score and exploitability_rationale fields are present in advisory records. Workflow changes tested via GitHub Actions execution on poll-nvd-cves.yml and community-advisory.yml.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my changes
  • I have added tests that prove my fix/feature works
  • New and existing tests pass locally

Generated description

Below is a concise technical summary of the changes proposed in this PR:
Enhances the CVE advisory feed with exploitability context to reduce alert fatigue by providing platform-specific vulnerability assessments. Introduces an automated analyze_exploitability.py utility and updates GitHub workflows and NanoClaw MCP tools to surface these scores for better prioritization.

TopicDetails
Exploitability Engine Implements a Python-based analyzer and updates GitHub Actions workflows (poll-nvd-cves.yml, community-advisory.yml) to automatically compute exploitability scores and rationales for new and updated CVEs, along with a script to backfill existing advisories.
Modified files (4)
  • .github/workflows/community-advisory.yml
  • .github/workflows/poll-nvd-cves.yml
  • scripts/backfill-exploitability.sh
  • utils/analyze_exploitability.py
Latest Contributors(2)
UserCommitDate
david.a@prompt.securityCodex-fix-poll-nvd-pr-...February 27, 2026
david@abutbul.comNanoclaw-integration-65February 25, 2026
Other Other files
Modified files (1)
  • skills/clawsec-nanoclaw/CHANGELOG.md
Latest Contributors(0)
UserCommitDate
NanoClaw Integration Updates the NanoClaw skill and its MCP tools to support filtering and sorting advisories by exploitability_score, while enhancing the evaluateSkillSafety logic to block or recommend review of installations based on exploitability context. This includes changes to data interfaces, core advisory logic, and installation documentation.
Modified files (8)
  • skills/clawsec-nanoclaw/INSTALL.md
  • skills/clawsec-nanoclaw/README.md
  • skills/clawsec-nanoclaw/SKILL.md
  • skills/clawsec-nanoclaw/host-services/advisory-cache.ts
  • skills/clawsec-nanoclaw/lib/advisories.ts
  • skills/clawsec-nanoclaw/lib/types.ts
  • skills/clawsec-nanoclaw/mcp-tools/advisory-tools.ts
  • skills/clawsec-nanoclaw/skill.json
Latest Contributors(2)
UserCommitDate
david.a@prompt.securityfeat-wiki-add-full-in-...February 26, 2026
aldo@osstek.comfix-portability-harden...February 25, 2026
Documentation & Skill Updates Adds comprehensive documentation on the exploitability scoring methodology, updates skill READMEs and changelogs, and modifies heartbeat outputs to guide agents on prioritizing high-exploitability threats. Minor technical updates to pre-push scripts are also included.
Modified files (10)
  • README.md
  • scripts/prepare-to-push.sh
  • skills/clawsec-feed/CHANGELOG.md
  • skills/clawsec-feed/SKILL.md
  • skills/clawsec-feed/skill.json
  • skills/clawsec-suite/CHANGELOG.md
  • skills/clawsec-suite/HEARTBEAT.md
  • skills/clawsec-suite/SKILL.md
  • skills/clawsec-suite/skill.json
  • wiki/exploitability-scoring.md
Latest Contributors(2)
UserCommitDate
david.a@prompt.securityfix-update-README-for-...February 26, 2026
aldo@osstek.comfix-portability-harden...February 25, 2026
This pull request is reviewed by Baz. Review like a pro on (Baz).

Comment on lines 28 to 30
],
"exploitability_score": "high",
"exploitability_rationale": "Medium CVSS score (4.0); requires local access; RCE is critical in agent deployments"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new exploitability_score/exploitability_rationale block added under CVE-2026-27576 (lines 28‑30) is copied verbatim into skills/clawsec-feed/advisories/feed.json and skills/clawsec-suite/advisories/feed.json; all three feeds remain identical. Each new field now needs to be updated in three files, which invites divergence. Can we treat one feed (e.g. the root advisories/feed.json) as canonical and have the other directories pull from it via a sync/copy step or symlink so we only edit one place per CVE? Keeping them synced manually is error-prone.

Finding type: Code Dedup and Conventions


Want Baz to fix this for you? Activate Fixer

Comment on lines +35 to +52
# Handle CVSS v3.x format: "CVSS:3.1/AV:N/AC:L/..."
if vector_string.startswith("CVSS:3"):
parts = vector_string.split("/")
# First part is version, rest are metrics
for part in parts[1:]:
if ":" in part:
key, value = part.split(":", 1)
metrics[key] = value

# Handle CVSS v2 format: "(AV:N/AC:L/...)"
elif vector_string.startswith("(") or "/" in vector_string:
# Remove parentheses if present
clean_vector = vector_string.strip("()")
parts = clean_vector.split("/")
for part in parts:
if ":" in part:
key, value = part.split(":", 1)
metrics[key] = value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CVSS:3.* branch re‑implements the same for part in parts: if ':' in part: ... loop that's already in the v2 branch, so the parser ends up with two copies of the same parsing logic; can we normalize the vector (strip CVSS:* prefixes and parentheses once) and run a single loop instead to keep the parsing succinct and avoid future drift between the two branches?

Finding type: Conciseness


Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents:

In utils/analyze_exploitability.py around lines 35 to 52, the parse_cvss_vector function
duplicates the same "for part in parts: if ':' in part: key, value = part.split(':', 1);
metrics[key]=value" logic in the CVSS v3 branch and the v2 branch. Refactor
parse_cvss_vector by normalizing the input first: strip any leading "CVSS:3.x" prefix
and remove surrounding parentheses/whitespace, then split the remaining string on "/"
and run a single loop that extracts key/value pairs into metrics. Remove the duplicated
branch-specific parsing loops so all formats share the same parsing logic while
preserving current behavior.

Comment on lines +393 to +397
# Get high and critical exploitability advisories (most urgent)
HIGH_EXPLOIT=$(echo "$FEED" | jq '.advisories[] | select(.exploitability_score == "high" or .exploitability_score == "critical")')
if [ $? -ne 0 ]; then
echo "Error: Failed to filter by exploitability"
exit 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new “Filter by exploitability score” snippet (lines 393‑397) mirrors the exact same commands that were added to skills/clawsec-suite/SKILL.md (around lines 232‑239). Having two copies of this snippet means every tweak must be made twice and they can drift. Could we pull the shared instructions from a single doc (e.g. the new wiki/exploitability-scoring.md) or otherwise include the snippet once and reference it from both SKILLs so maintenance happens in one place?

Finding type: Code Dedup and Conventions


Want Baz to fix this for you? Activate Fixer

Comment on lines +15 to +19
FEED_PATH="$PROJECT_ROOT/advisories/feed.json"
SKILL_FEED_PATH="$PROJECT_ROOT/skills/clawsec-feed/advisories/feed.json"
PUBLIC_FEED_PATH="$PROJECT_ROOT/public/advisories/feed.json"
ANALYZER="$PROJECT_ROOT/utils/analyze_exploitability.py"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FEED_PATH, SKILL_FEED_PATH, and PUBLIC_FEED_PATH are redefined here and the final "sync to other locations" block mirrors the identical configuration + copy logic already living in scripts/populate-local-feed.sh (see its lines 16‑18 and 342‑350). Having the same paths and skill/public feed sync in two scripts means every change must be made twice and makes it easy to forget updating one side when the other evolves. Can we extract the shared feed-path setup and sync-to-skill/public routine into a helper (e.g. scripts/feed-utils.sh or a sourced function) so both scripts reuse the same implementation and stay consistent?

Finding type: Code Dedup and Conventions


Want Baz to fix this for you? Activate Fixer

Comment on lines +385 to 389
const hasMalicious = advisories.some((a) => String(a.type || '').toLowerCase().includes('malicious'));
const hasRemoveAction = advisories.some((a) =>
/\b(remove|uninstall|disable|quarantine|block)\b/i.test(String(a.action || ''))
);
const hasCritical = advisories.some((a) => a.severity === 'critical');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hasMalicious | hasRemoveAction | hasCritical | hasHigh | hasHighExploitability checks here duplicate the exact same advisory-risk-decision tree inside skills/clawsec-nanoclaw/mcp-tools/advisory-tools.ts (lines ~303-334). Can we pull that classification/reason logic into a shared helper (e.g. evaluateAdvisoryRisk or a shared evaluateSkillSafety) and call it from both the host-service and the MCP tool so the recommendation strings stay in sync instead of being copy/pasted?

Finding type: Code Dedup and Conventions


Want Baz to fix this for you? Activate Fixer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant