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/GitLabGitLab/centisgood/duo-agentflow-auditor
Static AnalysisVulnerability ScannersCode AnalysisWeb SecurityDevSecOpsSecret DetectionSupply Chain SecurityMachine LearningLearning & EducationAI SecurityLabs & Practice
5 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
GitLab
centisgood/duo-agentflow-auditor

duo-agentflow-auditor

AI Code Security — four agents that catch what SAST misses in AI-generated code. Built on GitLab Duo Agent Platform.

View Repository

Duo AgentFlow Auditor

AI Code Security — catching what SAST misses in AI-generated code Built on the GitLab Duo Agent Platform

License: MIT Platform AI Model Agents Detection Rules Semgrep Rules Tests Flow Schema Green Agent GitLab AI Hackathon


40-62% of AI-generated code contains security vulnerabilities. Traditional SAST catches CVEs. We catch what SAST misses — prompt injection, LLM output execution, unsafe ML deserialization.

Getting Started · Architecture · Detection Rules · Setup Guide · Implementation


The Problem

AI accelerates code generation but creates new security bottlenecks:

Source: GitLab 2025 Global DevSecOps Report

The Solution

AgentFlow Auditor — Four AI agents that catch security risks traditional SAST misses in AI-generated code. 41 detection rules including LLM prompt injection, output-to-exec, unsafe deserialization, SQL injection, SSRF, and path traversal. Posts scannable reports, generates fix patches, tracks risk drift. One @mention triggers everything.


Architecture

root@kitploit:~
  Developer opens MR
        │
        ▼
  @duo-agentflow-auditor review this MR
        │
        ▼
┌───────────────────────────────────────────────────────┐
│                                                       │
│   ┌─────────────┐       ┌──────────────────┐         │
│   │   Scanner   │──────▶│    Reporter      │         │
│   │   Agent     │       │    Agent         │         │
│   │             │       │                  │         │
│   │ Read diffs  │       │ Grade risk       │         │
│   │ Match 34    │       │ Risk heatmap     │         │
│   │ rules       │       │ Post MR comment  │         │
│   │ Score risk  │       │ Create issue     │         │
│   └─────────────┘       └────────┬─────────┘         │
│                                  │                   │
│                          ┌───────┴────────┐          │
│                          │  SAFE?         │          │
│                          │  ├─ Yes ──────────────┐   │
│                          │  └─ No ───┐   │       │   │
│                          └───────────┘   │       │   │
│                                  │       │       │   │
│   ┌─────────────┐       ┌────────▼───────┘┐      │   │
│   │   Metrics   │◀──────│    Fixer        │      │   │
│   │   Agent     │       │    Agent        │      │   │
│   │             │◀──────────────────────────────┘   │
│   │ Baseline    │       │ Confidence-scored│         │
│   │ Cross-MR    │       │ patches         │         │
│   │ Green       │       │ Fix branch + MR │         │
│   │ Posture     │       │                 │         │
│   └─────────────┘       └─────────────────┘         │
│                                                       │
│            GitLab Duo Agent Platform (ambient)        │
│                                                       │
│   ┌───────────────────────────────────────────┐       │
│   │  External SAST Agent (CI/CD container)    │       │
│   │  bandit + semgrep + custom rules merge    │       │
│   └───────────────────────────────────────────┘       │
└───────────────────────────────────────────────────────┘

Agent Roster


Features


Detection Categories

Semgrep Custom Rules

15 production-grade Semgrep rules across 6 categories:

Regex Detection Categories

Risk Score Formula

root@kitploit:~
score = severity_weight + category_weight + executable_context + actionable + risk_modifier
      = clamp(0, 100)

severity_weight:    danger=50, warning=25
category_weight:    destructive-command=15, credential-exfil=15, prompt-injection=10, ...
executable_context: +20 if file is .sh/.py/.js/.ts
actionable:         +15 if executable AND not in trusted domain allowlist
risk_modifier:      per-rule adjustment (0-15)

Grade Classification


Quick Start

Prerequisites

  • GitLab project with Duo Agent Platform enabled (GitLab 18.8+)
  • Access to GitLab AI Hackathon group (for hackathon submission)

1. Push to GitLab

root@kitploit:~
git clone https://gitlab.com/centisgood/duo-agentflow-auditor.git
cd duo-agentflow-auditor

📖 Full mirroring guide (3 methods, CI setup, sync strategies): docs/GITLAB_MIRROR_GUIDE.md

2. Agents & Flow Publish Automatically

The hackathon group enforces a central CI pipeline via security policy. When you push to GitLab, the catalog-sync job automatically publishes all agents/*.yml and flows/*.yml to the AI Catalog — no manual setup or git tags needed.

Your project's .gitlab-ci.yml is overridden by the hackathon's central pipeline. The included .gitlab-ci.yml serves as reference only.

Flow: flows/security-audit.yml — 4-agent pipeline with Scanner → Reporter → Fixer → Metrics routing.

Alternative: Manual setup via GitLab UI

Agents: Automate → Agents → New agent → paste system prompt from .md files

Flow: Automate → Flows → New flow → paste definition from flows/security-audit.yml

3. Enable Triggers

TriggerHow
MentionComment @duo-agentflow-auditor in any MR
Assign reviewerAssign the service account as MR reviewer

4. Try It

root@kitploit:~
# Create test branch with vulnerable code
git checkout -b test/security-audit
cp examples/vulnerable-mr/* .
git add . && git commit -m "test: add vulnerable code for audit"
git push origin test/security-audit

# Open MR → Comment: @duo-agentflow-auditor please review this MR

Detailed walkthrough: See docs/SETUP_GUIDE.md


Example Output

MR Comment (DANGER grade)

root@kitploit:~
## 🛡️ AgentFlow Auditor — Security Report

Grade: 🚨 DANGER
Recommendation: FAIL — do not merge without fixes

### 🗺️ Risk Heatmap
| Risk          | File                | Findings | Max Score |
|---------------|---------------------|----------|-----------|
| 🟥🟥🟥🟥🟥 | unsafe_script.py    | 5        | 95        |
| 🟥🟥🟥🟧⬜ | risky_config.yaml   | 3        | 78        |
| 🟧🟧⬜⬜⬜ | insecure_fetch.js   | 2        | 62        |

### Top Findings
🚨 unsafe_script.py:55 — rm -rf (95/100)
🚨 unsafe_script.py:13 — shell=True (88/100)
🚨 unsafe_script.py:27 — eval() (85/100)
⚠️ insecure_fetch.js:41 — HTTP (62/100)

Green Metrics

root@kitploit:~
### 🌱 Sustainability Report
| Metric              | Value               |
|---------------------|---------------------|
| Tokens Used         | 12,450              |
| Energy              | 0.0037 kWh          |
| CO₂ Footprint       | 0.0014 kg           |
| Efficiency          | 2.4 findings/1K tok |

💡 LED bulb for 13 seconds  |  🚗 Car driving 5.6 meters

Project Structure

root@kitploit:~
duo-agentflow-auditor/
│
├── agents/
│   ├── scanner.yml                  # Catalog agent — security scanner
│   ├── reporter.yml                 # Catalog agent — report generator
│   ├── fixer.yml                    # Catalog agent — auto-fix patches
│   ├── metrics.yml                  # Catalog agent — green metrics
│   ├── scanner.md                   # Detailed prompt documentation
│   ├── reporter.md                  # Detailed prompt documentation
│   ├── fixer.md                     # Detailed prompt documentation
│   └── metrics.md                   # Detailed prompt documentation
│
├── flows/
│   └── security-audit.yml           # Catalog flow — conditional routing pipeline
│
├── scripts/
│   ├── merge_sast_results.py        # SAST result merger (bandit + semgrep + custom rules)
│   └── demo.sh                      # E2E demo automation (glab CLI)
│
├── tests/
│   └── test_merge_sast_results.py   # 76 pytest tests — scoring, grading, parsing
│
├── .gitlab/
│   └── duo/
│       └── flows/
│           └── sast-scanner.yaml    # External SAST agent (CI/CD container)
│
├── rules/
│   ├── danger_rules.json            # 11 high-severity detection patterns
│   ├── warning_rules.json           # 15 medium-severity detection patterns
│   └── semgrep/                     # 15 Semgrep custom rules
│       ├── ai-security/             # LLM prompt injection, output exec, unsafe deser
│       ├── web-security/            # SQL injection, path traversal, SSRF, open redirect, input validation
│       ├── python-security/         # eval/exec, subprocess, os.system
│       ├── crypto/                  # Insecure random (Python + JavaScript)
│       ├── secrets/                 # Hardcoded credentials
│       └── network/                 # Insecure HTTP (with autofix)
│
├── Dockerfile                       # Production SAST container (python:3.11-slim)
├── requirements.txt                 # bandit + semgrep dependencies
│
├── examples/
│   ├── vulnerable-mr/               # Intentionally risky code (demo)
│   │   ├── unsafe_script.py         # shell=True, eval(), rm -rf, cred leak
│   │   ├── risky_config.yaml        # Prompt injection, hardcoded secrets
│   │   └── insecure_fetch.js        # HTTP, exec(), token exposure
│   └── safe-mr/                     # Secure code for contrast (demo)
│       ├── safe_script.py
│       ├── safe_config.yaml
│       └── safe_script.js           # HTTPS, execFile, env vars
│
├── docs/
│   ├── SETUP_GUIDE.md               # Step-by-step setup
│   ├── EXECUTION_PLAN.md            # Implementation plan
│   ├── WOW_MOMENTS.md               # Visual impact & demo choreography
│   ├── DEVPOST_SUBMISSION.md        # Devpost submission draft
│   └── GITLAB_MIRROR_GUIDE.md       # GitHub → GitLab mirroring
│
├── .gitlab-ci.yml                   # CI — catalog-sync + validation
├── AGENTS.md                        # Project-level agent customization
├── IMPLEMENTATION.md                # Architecture & design document
├── CONTRIBUTING.md                  # Contribution guidelines
├── LICENSE                          # MIT License
└── README.md                        # This file

Technology


Documentation


Testing

root@kitploit:~
# Run the full test suite (76 tests)
python -m pytest tests/ -v

# Run with coverage
python -m pytest tests/ --cov=scripts --cov-report=term-missing

Tests cover: JSON loading, rule parsing, severity/category normalization, risk scoring formula, grade classification, bandit/semgrep output parsing, finding deduplication, and the CLI entry point.


Demo

root@kitploit:~
# Run the E2E demo (requires glab CLI + GitLab remote)
scripts/demo.sh

# Use a custom remote name
scripts/demo.sh --gitlab-remote origin

# Clean up demo branches and MRs
scripts/demo.sh --cleanup

The demo script creates a test MR with vulnerable code, triggers the auditor via @mention, and polls for results.


Contributing

See CONTRIBUTING.md for guidelines.

Quick summary:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing)
  3. Commit changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing)
  5. Open a Merge Request

The AI Paradox — Why This Matters


License

This project is licensed under the MIT License.


One Trigger. Four Agents. Zero AI Blind Spots.

Built with the GitLab Duo Agent Platform and Anthropic Claude

Download Tool
IssueImpact
Security reviews block MRs for hours or days7 hrs/week lost per team member
AI makes compliance management harder70% of teams report this
Compliance issues discovered after deployment76% of organizations
Traditional SAST tools miss AI-specific risksPrompt injection, LLM output-to-exec, unsafe ML deser
40-62% of AI-generated code has vulnerabilitiesNo existing tool detects AI-specific threat patterns
AgentRoleToolsKey Capability
ScannerAnalyze MR diffs10 tools41 rules (26 regex + 15 Semgrep), AI-specific threat detection, vulnerability integration
ReporterPost audit reports7 toolsScannable in 10s (grade + heatmap + top 5), vulnerability linking, auto issue on DANGER
FixerGenerate code fixes8 toolsConfidence-scored patches (HIGH/MEDIUM/LOW), auto fix MR creation
MetricsTrack risk baseline6 toolsCross-MR learning, team posture, baseline drift, energy/carbon tracking
SAST ScannerExternal SASTCI/CDRuns bandit + semgrep, merges with custom rules via Python script

Security Scanning

  • 41 Detection Rules — 26 regex + 15 Semgrep custom rules
  • 8 Risk Categories — From destructive commands to prompt injection
  • AI-Specific Detection — LLM prompt injection, output-to-exec, unsafe deserialization
  • Risk Scoring — 0-100 per finding (severity x context x category)
  • Grade System — SAFE / WARNING / DANGER

Automation

  • One-trigger activation — @mention or assign reviewer
  • Conditional routing — SAFE scans skip fixer, saving tokens
  • Structured MR comments — Risk tables, fix suggestions, collapsible details
  • Auto-fix generation — Code patches on a new branch
  • Issue creation — Automatic on DANGER grade

Baseline Tracking

  • Risk drift detection — Compare scans over time
  • Trend analysis — Improving / degrading / stable
  • Fix adoption rate — Track how many suggestions were applied
  • History log — JSONL append per scan

Green Metrics

  • Token tracking — Usage per scan
  • Energy estimation — kWh per scan
  • Carbon footprint — kg CO2 with real-world analogies
  • Optimization suggestions — Reduce scan scope, cache baselines
RuleCategorySeverityDetection
llm-prompt-injectionAI SecurityWARNINGUser input flowing into LLM API calls
llm-output-code-execAI SecurityERRORLLM output passed to exec/eval
unsafe-deserialization-mlAI SecurityWARNINGpickle.load, torch.load on untrusted models
sql-injectionWeb SecurityERRORString-formatted SQL queries (f-string, .format, concat)
path-traversalWeb SecurityERRORUser input in file path operations (../ traversal)
ssrf-request-forgeryWeb SecurityERRORUser-controlled URLs in HTTP requests
open-redirectWeb SecurityWARNINGUser input in redirect functions
missing-input-validationWeb SecurityWARNINGRequest data used without schema validation
dangerous-eval-execPythonWARNINGeval/exec with dynamic content
subprocess-shell-truePythonWARNINGsubprocess with shell=True
dangerous-os-systemPythonWARNINGos.system/popen (deprecated)
insecure-random-pythonCryptoWARNINGrandom module for security tokens
insecure-random-javascriptCryptoWARNINGMath.random() for security tokens
hardcoded-credentialsSecretsWARNINGHardcoded passwords, API keys, tokens
insecure-httpNetworkINFOHTTP URLs (with autofix to HTTPS)
CategorySeverityExample Patterns
Destructive Commands🚨 Dangerrm -rf /, mkfs, dd to disk
Credential Exfiltration🚨 Dangercurl posting secrets to external URLs
Prompt Injection (severe)🚨 Danger"Ignore previous instructions", role overrides
Obfuscated Execution🚨 Dangerbase64 -d | bash, remote pipe to shell
Shell Execution⚠️ Warningshell=True, eval(), exec(), os.system()
Network Calls⚠️ Warningcurl/wget/fetch to external URLs
Insecure Transport⚠️ Warninghttp:// where https:// should be used
Hardcoded Credentials⚠️ WarningPasswords, API keys, tokens in source
GradeConditionAction
🚨 DANGERmax_risk >= 90 OR high_risk_findings >= 3Block merge + create issue
⚠️ WARNINGmax_risk >= 70 OR high_risk_findings >= 1Review before merge
✅ SAFENo meaningful risk signalSafe to merge
#AgentCatalog FilePrompt DocsTools
1Scanneragents/scanner.ymlagents/scanner.md8 tools
2Reporteragents/reporter.ymlagents/reporter.md6 tools
3Fixeragents/fixer.ymlagents/fixer.md8 tools
4Metricsagents/metrics.ymlagents/metrics.md5 tools
ComponentTechnology
PlatformGitLab Duo Agent Platform (GA in GitLab 18.8)
AI ModelAnthropic Claude Sonnet
Flow SchemaFlow Registry v1 (ambient environment)
TriggersMention, Assign, Assign Reviewer
Agent Tools30+ GitLab built-in tools across 4 agents (incl. vulnerability linking)
Detection41 rules: 26 regex + 15 Semgrep (AI security, web security, crypto, secrets, network)
External SASTDockerized bandit + semgrep pipeline with result merger
Testing76 pytest tests covering scoring, grading, and parsing
OutputMarkdown MR comments, GitLab Issues, Fix MRs
DocumentDescription
IMPLEMENTATION.mdArchitecture, scoring formula, demo script, judging alignment
docs/SETUP_GUIDE.md7-step walkthrough with troubleshooting
docs/EXECUTION_PLAN.md6-phase plan with ~35 granular tasks
docs/WOW_MOMENTS.mdVisual impact design & demo choreography
docs/DEVPOST_SUBMISSION.mdCopy-paste submission form text
AGENTS.mdProject-level scanning customization
docs/GITLAB_MIRROR_GUIDE.mdGitHub → GitLab mirroring (3 methods)
CONTRIBUTING.mdHow to contribute
Without AgentFlow AuditorWith AgentFlow Auditor
MR waits 2+ days for review45 seconds to full audit
SAST misses AI-specific risks41 rules incl. 3 AI-specific + 7 web security threats
No fix suggestionsConfidence-scored patches (HIGH/MED/LOW)
SAFE scans waste fixer tokensConditional routing skips fixer
No tracking over timeCross-MR learning + team posture
No energy awarenessGreen metrics per scan