cra-agent

作者 kulkarnirohit123已验证

Autonomous agentic AI for CRA (Cyber Resilience Act) compliance: scans repos, triages findings, opens Jira tickets, and auto-fixes vulnerabilities via PR.

201
Stars
95
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/kulkarnirohit123/cra-agent

快速入门

使用 cra-agent 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

CRA-AGENT — Cyber Resilience Act Compliance Agent

License Python Streamlit

An autonomous agentic AI system for continuous CRA compliance monitoring. It scans every commit, identifies vulnerabilities, creates Jira tickets with triage recommendations, and reacts to Jira webhook updates (suppress known issues or auto-fix).

Architecture Overview

┌─────────────────────────────────────────────────────────────────────┐
│                         CRA-AGENT Orchestrator                       │
│                              (main.py)                               │
└──────────────┬──────────────────────────────────────┬───────────────┘
               │                                      │
     ┌─────────▼──────────┐                ┌──────────▼──────────┐
     │   Git Monitor      │                │  Webhook Server     │
     │  (commit watcher)  │                │  (Jira updates)     │
     └─────────┬──────────┘                └──────────┬──────────┘
               │                                      │
     ┌─────────▼──────────┐                ┌──────────▼──────────┐
     │  Diff Analyzer     │                │  Jira Handler       │
     │  (changed files)   │                │  (route actions)    │
     └─────────┬──────────┘                └──────────┬──────────┘
               │                                      │
     ┌─────────▼──────────────────────────────────────▼──────────┐
     │                    Agent Layer (LangGraph)                  │
     │  ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────┐ │
     │  │ Scanner    │ │ Triage     │ │ Fixer      │ │ Jira   │ │
     │  │ Agent      │ │ Agent      │ │ Agent      │ │ Agent  │ │
     │  └─────┬──────┘ └─────┬──────┘ └─────┬──────┘ └───┬────┘ │
     └────────┼──────────────┼──────────────┼────────────┼───────┘
              │              │              │            │
     ┌────────▼──────────────▼──────────────▼────────────▼───────┐
     │                      Scanner Layer                         │
     │  ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐   │
     │  │ Dependency   │ │ SAST         │ │ Secrets          │   │
     │  │ Scanner      │ │ Scanner      │ │ Scanner          │   │
     │  └──────────────┘ └──────────────┘ └──────────────────┘   │
     │  ┌──────────────────────────────────────────────────────┐  │
     │  │ Suppression Store (SQLite) — known/ignored vulns    │  │
     │  └──────────────────────────────────────────────────────┘  │
     └────────────────────────────────────────────────────────────┘
              │
     ┌────────▼──────────────────────────────────────────────────┐
     │                   Integrations                             │
     │  ┌──────────────┐  ┌──────────────┐  ┌────────────────┐   │
     │  │ Jira Client  │  │ LLM Client   │  │ Git Client     │   │
     │  └──────────────┘  └──────────────┘  └────────────────┘   │
     └────────────────────────────────────────────────────────────┘

Project Structure

CRA-AGENT/
├── Project.md                  # Project requirements
├── README.md                   # This file
├── DESIGN.md                   # Detailed design document
├── pyproject.toml              # Python project config & dependencies
├── .env.example                # Environment variable template
├── config/
│   ├── __init__.py
│   ├── settings.py             # App settings (pydantic-settings)
│   └── scanner_rules.yaml      # Scanner rule definitions
├── src/
│   ├── __init__.py
│   ├── main.py                 # Entry point / orchestrator
│   ├── core/
│   │   ├── __init__.py
│   │   ├── models.py           # Pydantic data models
│   │   ├── git_monitor.py      # Commit watcher (polling / webhook)
│   │   └── diff_analyzer.py    # Analyze commit diffs
│   ├── agents/
│   │   ├── __init__.py
│   │   ├── orchestrator.py     # LangGraph state machine
│   │   ├── scanner_agent.py    # Runs scanners on diffs
│   │   ├── triage_agent.py     # Recommends triage actions
│   │   ├── fixer_agent.py      # Auto-fixes vulnerabilities
│   │   └── jira_agent.py       # Creates/updates Jira tickets
│   ├── scanners/
│   │   ├── __init__.py
│   │   ├── base_scanner.py     # Abstract scanner interface
│   │   ├── dependency_scanner.py
│   │   ├── sast_scanner.py
│   │   ├── secrets_scanner.py
│   │   └── suppression_store.py
│   ├── integrations/
│   │   ├── __init__.py
│   │   ├── jira_client.py      # Jira REST API client
│   │   ├── llm_client.py       # LLM provider abstraction
│   │   └── git_client.py       # Git operations wrapper
│   ├── webhook/
│   │   ├── __init__.py
│   │   ├── server.py           # FastAPI webhook server
│   │   └── handlers.py         # Jira webhook event handlers
│   └── utils/
│       ├── __init__.py
│       ├── logger.py           # Structured logging
│       └── helpers.py          # Shared utilities
├── skills/                     # Agent skill definitions (markdown)
│   ├── scan_commit.md
│   ├── triage_vulnerability.md
│   ├── fix_vulnerability.md
│   └── handle_jira_update.md
├── tests/
│   ├── __init__.py
│   ├── conftest.py
│   ├── test_scanners/
│   ├── test_agents/
│   └── test_webhook/
└── docker-compose.yml          # Local dev services

Tech Stack

LayerTechnology
LanguagePython 3.11+
Agent FrameworkLangGraph + LangChain
Webhook ServerFastAPI + Uvicorn
Data ModelsPydantic v2
GitGitPython
Jirahttpx (async REST)
LLMOpenAI / Anthropic (pluggable)
Suppression DBSQLite (via sqlite3)
Scannerssemgrep, pip-audit, gitleaks (CLI)
Configpydantic-settings + YAML
Testingpytest + pytest-asyncio

Quick Start (planned)

# 1. Install dependencies
pip install -e ".[dev]"

# 2. Configure environment
cp .env.example .env
# Edit .env with your Jira, LLM, and Git credentials

# 3. Run the agent
python -m src.main

# 4. Run webhook server (separate process)
uvicorn src.webhook.server:app --reload --port 8080

Workflow

Commit-Triggered Scan

  1. GitMonitor detects a new commit (polling or webhook).
  2. DiffAnalyzer extracts changed files and hunks.
  3. ScannerAgent runs all scanners on changed files.
  4. SuppressionStore filters out known/ignored vulnerabilities.
  5. TriageAgent classifies remaining vulns (severity, exploitability, CRA relevance).
  6. JiraAgent creates Jira tickets with triage recommendations.

Jira Webhook Reaction

  1. WebhookServer receives Jira issue update event.
  2. JiraHandler parses the transition/comment.
  3. If "Ignore / Known Issue"SuppressionStore adds a suppression rule.
  4. If "Fix Required"FixerAgent generates and applies a fix, then opens a PR.
  5. JiraAgent updates the ticket with the fix status.

CRA Compliance Mapping

The agent maps findings to CRA Annex I essential requirements:

  • Annex I §1 — Security requirements (vulnerability handling)
  • Annex I §2 — Vulnerability handling process
  • Annex II — SBOM / software component transparency
  • Article 13 — Reporting obligations for actively exploited vulnerabilities

Features

  • Automated Vulnerability Scanning: Scans every commit using multiple scanners (SAST, dependency, secrets)
  • AI-Powered Triage: Uses LLMs to classify severity and recommend actions
  • Jira Integration: Automatically creates and updates tickets
  • EUVD Sync: Synchronizes with EU Vulnerability Database every 4 hours
  • Auto-Fix Capability: Generates fixes and opens pull requests
  • Enterprise Dashboard: Real-time monitoring with Streamlit UI
  • CRA Compliance Mapping: Maps findings to CRA Annex I requirements

Dashboard

Run the enterprise-grade dashboard:

streamlit run src/dashboard/app.py

Features:

  • Real-time vulnerability monitoring
  • EUVD auto-sync with countdown timer
  • Today's top 10 vulnerabilities report
  • Scan history and metrics
  • ROI tracking

Contributing

Contributions are welcome! Please read our Contributing Guide for details on:

  • How to submit pull requests
  • Coding standards
  • Reporting issues
  • Feature requests

Code of Conduct

This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Copyright 2026 Rohit Kulkarni

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Acknowledgments

常见问题

What is cra-agent?

cra-agent is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by kulkarnirohit123. Autonomous agentic AI for CRA (Cyber Resilience Act) compliance: scans repos, triages findings, opens Jira tickets, and auto-fixes vulnerabilities via PR. It has 201 GitHub stars.

Is cra-agent safe to use?

Yes. cra-agent passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install cra-agent?

Clone the repository with "git clone https://github.com/kulkarnirohit123/cra-agent" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is cra-agent written in?

cra-agent is primarily written in Python. It is open-source under kulkarnirohit123 on GitHub, so you can review or fork the full source.

Are there alternatives to cra-agent?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh cra-agent against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情