Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/renweimeng/vlun-agent-x
Static AnalysisDynamic Analysis (Sandboxing)Vulnerability AnalysisCode AnalysisMachine LearningPapers & ResearchAI Security
GitHubrenweimeng/vlun-agent-x

Vlun-Agent-X

VulnAgent-X: A Layered Agentic Framework for Repository-Level Vulnerability Detection

View Repository
176 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

中文 English

VulnAgent-X Research Prototype

VulnAgent-X is a research-focused multi-agent prototype for bug and vulnerability detection. It takes a local repository or diff as input, and outputs structured findings, evidence chains, localization, confidence, and experiment logs.

Core Capabilities

  • Inputs: repo path or unified diff
  • Workflow: screening -> context expansion -> scheduler -> router -> experts -> sceptic -> verification(stub) -> evidence fusion
  • Output fields:
    • issue_type
    • location(file + line range)
  • evidence_summary
  • confidence
  • severity
  • optional_cwe
  • fix_hint
  • evidence_chain
  • counter_evidence
  • Interfaces: CLI + FastAPI
  • Reproducibility: pytest / mypy / ruff + Docker support
  • Workflow Overview

    1. screening: fast suspicious-region extraction (rules + metadata signals)
    2. context_expansion: fetch minimal sufficient local context around suspicious locations
    3. scheduler: confidence-aware escalation policy (early_exit / expert_review / verification)
    4. router_agent: choose specialist agents per suspicious region
    5. semantic/security/logic: produce structured claims and evidence from different perspectives
    6. sceptic_agent: generate counter-evidence and confidence penalties
    7. verification: optional dynamic verification (currently a safe placeholder)
    8. evidence_fusion: merge all evidence and produce final findings

    Setup and Usage Tutorial

    1) Environment Setup

    Requirement: Python 3.11+ (higher versions also work in this prototype).

    root@kitploit:~
    cd /Users/xiaolu/Documents/Python_code/vulnAgentX
    python3 -m venv .venv
    source .venv/bin/activate
    python -m pip install -e '.[dev]'
    

    2) CLI Usage

    Analyze a repository:

    root@kitploit:~
    .venv/bin/vulnagentx analyze --repo /path/to/repo --output json
    

    Analyze a diff file:

    root@kitploit:~
    .venv/bin/vulnagentx analyze --diff-file /path/to/patch.diff --output json
    

    Short summary output:

    root@kitploit:~
    .venv/bin/vulnagentx analyze --repo /path/to/repo --output summary
    

    3) API Usage

    Start server:

    root@kitploit:~
    .venv/bin/uvicorn vulnagentx.app.api:app --reload
    

    Health check:

    root@kitploit:~
    curl http://127.0.0.1:8000/health
    

    Run analysis request:

    root@kitploit:~
    curl -X POST http://127.0.0.1:8000/analyze \
      -H "Content-Type: application/json" \
      -d '{"repo_path":"/path/to/repo"}'
    

    4) Run with Docker

    root@kitploit:~
    docker compose -f docker/docker-compose.yml up --build
    

    5) Quality Checks and Tests

    root@kitploit:~
    .venv/bin/ruff check src tests
    .venv/bin/mypy src
    .venv/bin/pytest
    

    Output Example

    root@kitploit:~
    {
      "run_id": "...",
      "findings": [
        {
          "issue_type": "command_injection",
          "location": {"file_path": "app.py", "start_line": 42, "end_line": 42},
          "evidence_summary": "Command execution surface detected...",
          "confidence": 0.87,
          "severity": "critical",
          "optional_cwe": "CWE-78",
          "fix_hint": "Avoid shell command composition...",
          "source_agents": ["security_agent", "semantic_agent"],
          "evidence_chain": [],
          "counter_evidence": []
        }
      ],
      "metrics": {
        "runtime_seconds": 0.07
      },
      "logs": []
    }
    

    File-by-File Purpose

    Root and Infrastructure Files

    FilePurpose
    .env.exampleEnvironment template for optional runtime settings (for example log level).
    pyproject.tomlBuild system, dependencies, script entrypoints, pytest/ruff/mypy configuration.
    README.mdMain README with language switch buttons (default Chinese).
    README.zh.mdFull Chinese documentation.
    README.en.mdFull English documentation.
    docker/DockerfileContainer image build file for API service.
    docker/docker-compose.ymlOne-command local container startup.
    rules/semgrep/vulnagentx-rules.ymlBuilt-in Semgrep rules for injection/deserialization/unsafe C APIs.
    scripts/run_experiment.pyBatch dataset runner that writes JSONL predictions.
    scripts/evaluate.pyMetrics evaluator for experiment outputs.
    scripts/run_ablation.pyComponent ablation runner (no_semgrep/no_treesitter/no_sceptic/no_verification).

    Core Source Files (src/vulnagentx)

    FilePurpose
    src/vulnagentx/__init__.pyPackage version and exports.
    src/vulnagentx/app/__init__.pyapp package initializer.
    src/vulnagentx/app/cli.pyCLI entrypoint (vulnagentx analyze).
    src/vulnagentx/app/api.pyFastAPI entrypoint (/health, /analyze).
    src/vulnagentx/app/schemas.pyPydantic request/response schemas for API.
    src/vulnagentx/core/__init__.pycore package initializer.
    src/vulnagentx/core/state.pyGlobal state models: regions, evidence, agent outputs, findings, logs, metrics.
    src/vulnagentx/core/screening.pyStage-1 fast risk screening and suspicious region extraction.
    src/vulnagentx/core/context_expansion.pyContext expansion with bounded local code windows.
    src/vulnagentx/core/scheduler.pyConfidence-aware escalation policy (early_exit/expert_review/verification).
    src/vulnagentx/core/verification.pyOptional dynamic verification module (safe placeholder for now).
    src/vulnagentx/core/evidence_fusion.pyFinal evidence fusion and finding ranking.
    src/vulnagentx/core/workflow.pyEnd-to-end orchestration entry (VulnAgentWorkflow).
    src/vulnagentx/agents/__init__.pyAgent export aggregator.
    src/vulnagentx/agents/base.pyAgent abstract base and shared context helper.
    src/vulnagentx/agents/router_agent.pyRouter agent: dispatches specialists by region.
    src/vulnagentx/agents/semantic_agent.pySemantic agent: semantic code-risk signals (null deref, deserialization, etc.).

    Test Files (tests)

    FilePurpose
    tests/test_agents.pyUnit tests for agent structured outputs and sceptic behavior.
    tests/test_end_to_end.pyEnd-to-end workflow test from input repo to final findings.
    tests/test_research_modules.pyTests for Tree-sitter graphing, verification pipeline, and metrics modules.

    Implemented Research Modules

    • Real LLM adapters: OpenAI + local Ollama + provider-based factory fallback
    • Real Tree-sitter AST and code graph integration (with graceful fallback mode)
    • Real Semgrep ruleset integration in screening
    • Verification sandbox execution chain with bounded subprocess tasks
    • Dataset loaders, evaluation metrics, and ablation scripts for experiments
    Download Tool
    src/vulnagentx/agents/security_agent.py
    Security agent: vulnerability patterns (command injection, SQLi, overflow, etc.).
    src/vulnagentx/agents/logic_bug_agent.pyLogic agent: control-flow/business logic defects (bounds, division, authz, etc.).
    src/vulnagentx/agents/sceptic_agent.pySceptic agent: counter-evidence generation and confidence penalty.
    src/vulnagentx/adapters/__init__.pyAdapter package initializer.
    src/vulnagentx/adapters/sandbox_adapter.pySandboxed subprocess executor with timeout/no-shell constraints for verification.
    src/vulnagentx/adapters/semgrep_adapter.pySemgrep CLI adapter (optional).
    src/vulnagentx/adapters/treesitter_adapter.pyTree-sitter adapter with AST extraction + fallback heuristics.
    src/vulnagentx/adapters/llm/__init__.pyLLM adapter exports.
    src/vulnagentx/adapters/llm/base.pyLLM adapter protocol interface.
    src/vulnagentx/adapters/llm/mock_adapter.pyDeterministic mock LLM for offline tests.
    src/vulnagentx/adapters/llm/openai_adapter.pyOpenAI SDK adapter implementation.
    src/vulnagentx/adapters/llm/local_adapter.pyLocal model adapter (Ollama HTTP API).
    src/vulnagentx/adapters/llm/factory.pyProvider-based adapter factory with mock fallback.
    src/vulnagentx/retrieval/repo_graph.pyRepository code-graph indexing and neighbor retrieval.
    src/vulnagentx/datasets/base.pyShared dataset sample model and JSONL/CSV loaders.
    src/vulnagentx/datasets/devign.pyDevign loader entrypoint.
    src/vulnagentx/datasets/bigvul.pyBig-Vul loader entrypoint.
    src/vulnagentx/datasets/primevul.pyPrimeVul loader entrypoint.
    src/vulnagentx/datasets/jit.pyJIT loader entrypoint.
    src/vulnagentx/eval/detection_metrics.pyDetection metrics (Precision/Recall/F1/Accuracy).
    src/vulnagentx/eval/localization_metrics.pyLocalization metrics (Top-1/Top-3/MRR).
    src/vulnagentx/eval/efficiency_metrics.pyEfficiency metrics (avg runtime/P95/findings).
    src/vulnagentx/eval/ablations.pyAblation execution logic across workflow variants.
    src/vulnagentx/utils/config.pyCentral workflow configuration (env/CLI/API toggles).