building-vulnerability-dashboard-with-defectdojo

部署 DefectDojo 作为集中式漏洞管理仪表盘,支持扫描器集成、去重、指标跟踪和 Jira 工单工作流。

9 stars

Best use case

building-vulnerability-dashboard-with-defectdojo is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

部署 DefectDojo 作为集中式漏洞管理仪表盘,支持扫描器集成、去重、指标跟踪和 Jira 工单工作流。

Teams using building-vulnerability-dashboard-with-defectdojo should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/building-vulnerability-dashboard-with-defectdojo/SKILL.md --create-dirs "https://raw.githubusercontent.com/killvxk/cybersecurity-skills-zh/main/skills/building-vulnerability-dashboard-with-defectdojo/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/building-vulnerability-dashboard-with-defectdojo/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How building-vulnerability-dashboard-with-defectdojo Compares

Feature / Agentbuilding-vulnerability-dashboard-with-defectdojoStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

部署 DefectDojo 作为集中式漏洞管理仪表盘,支持扫描器集成、去重、指标跟踪和 Jira 工单工作流。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 使用 DefectDojo 构建漏洞仪表盘

## 概述

DefectDojo 是一个开源应用漏洞管理平台,可聚合来自 200+ 安全工具的发现结果、去重处理、跟踪修复进度,并提供高管级仪表盘。它作为漏洞管理的中心枢纽,可与 CI/CD 管道、Jira 工单系统和 Slack 通知集成。DefectDojo 支持基于 OWASP 的分类,并提供 REST API 进行自动化操作。

## 前置条件

- Docker 和 Docker Compose
- 4GB+ 内存,2+ CPU 核心,20GB+ 磁盘空间
- PostgreSQL 12+(包含在 Docker 部署中)
- Python 3.9+(用于 API 集成脚本)
- Jira 实例(可选,用于工单集成)

## 部署

### Docker Compose 部署

```bash
# 克隆 DefectDojo 仓库
git clone https://github.com/DefectDojo/django-DefectDojo.git
cd django-DefectDojo

# 使用 Docker Compose 启动(生产模式)
./dc-up-d.sh

# 备选:手动 Docker Compose
docker compose up -d

# 检查服务状态
docker compose ps

# 查看初始管理员凭据
docker compose logs initializer 2>&1 | grep "Admin password"

# 访问 DefectDojo:http://localhost:8080
```

### 环境配置

```bash
# docker-compose.yml 中的关键环境变量
DD_DATABASE_ENGINE=django.db.backends.postgresql
DD_DATABASE_HOST=postgres
DD_DATABASE_PORT=5432
DD_DATABASE_NAME=defectdojo
DD_DATABASE_USER=defectdojo
DD_DATABASE_PASSWORD=<secure_password>
DD_ALLOWED_HOSTS=*
DD_SECRET_KEY=<random_64_char_key>
DD_CREDENTIAL_AES_256_KEY=<random_128_bit_key>
DD_SOCIAL_AUTH_GOOGLE_OAUTH2_ENABLED=True
```

## 组织结构

### 层级关系

```
产品类型(业务单元)
  └── 产品(应用/服务)
       └── 参与(评估/冲刺)
            └── 测试(扫描器运行)
                 └── 发现(单个漏洞)
```

### 通过 API 设置

```python
import requests

DD_URL = "http://localhost:8080/api/v2"
API_KEY = "your_api_key_here"
HEADERS = {"Authorization": f"Token {API_KEY}", "Content-Type": "application/json"}

# 创建产品类型
resp = requests.post(f"{DD_URL}/product_types/", headers=HEADERS, json={
    "name": "Web Applications",
    "description": "Customer-facing web application portfolio"
})
product_type_id = resp.json()["id"]

# 创建产品
resp = requests.post(f"{DD_URL}/products/", headers=HEADERS, json={
    "name": "Customer Portal",
    "description": "Main customer-facing web application",
    "prod_type": product_type_id,
    "sla_configuration": 1,
})
product_id = resp.json()["id"]

# 创建参与记录
resp = requests.post(f"{DD_URL}/engagements/", headers=HEADERS, json={
    "name": "Q1 2024 Security Assessment",
    "product": product_id,
    "target_start": "2024-01-01",
    "target_end": "2024-03-31",
    "engagement_type": "CI/CD",
    "status": "In Progress",
})
engagement_id = resp.json()["id"]
```

## 扫描器集成

### 通过 API 导入扫描结果

```bash
# 上传 Nessus 扫描结果
curl -X POST "${DD_URL}/reimport-scan/" \
  -H "Authorization: Token ${API_KEY}" \
  -F "scan_type=Nessus Scan" \
  -F "file=@nessus_report.csv" \
  -F "product_name=Customer Portal" \
  -F "engagement_name=Q1 2024 Security Assessment" \
  -F "auto_create_context=true" \
  -F "deduplication_on_engagement=true"

# 上传 OWASP ZAP 结果
curl -X POST "${DD_URL}/reimport-scan/" \
  -H "Authorization: Token ${API_KEY}" \
  -F "scan_type=ZAP Scan" \
  -F "file=@zap_report.xml" \
  -F "product_name=Customer Portal" \
  -F "engagement_name=Q1 2024 Security Assessment" \
  -F "auto_create_context=true"

# 上传 Trivy 容器扫描结果
curl -X POST "${DD_URL}/reimport-scan/" \
  -H "Authorization: Token ${API_KEY}" \
  -F "scan_type=Trivy Scan" \
  -F "file=@trivy_results.json" \
  -F "product_name=Customer Portal" \
  -F "engagement_name=Q1 2024 Security Assessment" \
  -F "auto_create_context=true"
```

### 支持的扫描器类型(部分列表)

| 扫描器 | 类型字符串 | 格式 |
|---------|------------|--------|
| Nessus | Nessus Scan | CSV/XML |
| OpenVAS | OpenVAS CSV | CSV |
| Qualys | Qualys Scan | XML |
| OWASP ZAP | ZAP Scan | XML/JSON |
| Burp Suite | Burp XML | XML |
| Trivy | Trivy Scan | JSON |
| Semgrep | Semgrep JSON Report | JSON |
| Snyk | Snyk Scan | JSON |
| SonarQube | SonarQube Scan | JSON |
| Checkov | Checkov Scan | JSON |

### CI/CD 集成(GitHub Actions)

```yaml
# .github/workflows/security-scan.yml
name: Security Scan
on: [push]
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run Semgrep
        run: |
          pip install semgrep
          semgrep --config auto --json -o semgrep_results.json .
      - name: Upload to DefectDojo
        run: |
          curl -X POST "${{ secrets.DD_URL }}/api/v2/reimport-scan/" \
            -H "Authorization: Token ${{ secrets.DD_API_KEY }}" \
            -F "scan_type=Semgrep JSON Report" \
            -F "file=@semgrep_results.json" \
            -F "product_name=${{ github.event.repository.name }}" \
            -F "engagement_name=CI/CD" \
            -F "auto_create_context=true"
```

## Jira 集成

```python
# 在 DefectDojo 设置中配置 Jira 集成
jira_config = {
    "url": "https://company.atlassian.net",
    "username": "jira-bot@company.com",
    "password": "jira_api_token",
    "default_issue_type": "Bug",
    "critical_mapping_severity": "Blocker",
    "high_mapping_severity": "Critical",
    "medium_mapping_severity": "Major",
    "low_mapping_severity": "Minor",
    "finding_text": "**漏洞**: {{ finding.title }}\n**严重性**: {{ finding.severity }}\n**CVE**: {{ finding.cve }}\n**描述**: {{ finding.description }}",
    "accepted_mapping_resolution": "Done",
    "close_status_key": 6,
}
```

## 指标与仪表盘

### 关键指标 API 查询

```python
# 按严重性获取发现计数
resp = requests.get(f"{DD_URL}/findings/?limit=0&active=true",
                    headers=HEADERS)
findings = resp.json()

# 获取 SLA 违规计数
resp = requests.get(f"{DD_URL}/findings/?limit=0&active=true&sla_breached=true",
                    headers=HEADERS)

# 获取产品级指标
resp = requests.get(f"{DD_URL}/products/{product_id}/",
                    headers=HEADERS)
product_data = resp.json()
```

## 参考资料

- [DefectDojo GitHub](https://github.com/DefectDojo/django-DefectDojo)
- [DefectDojo 文档](https://defectdojo.github.io/django-DefectDojo/)
- [DefectDojo REST API](https://defectdojo.github.io/django-DefectDojo/integrations/api-v2-docs/)
- [OWASP DefectDojo 项目](https://owasp.org/www-project-defectdojo/)
- [DefectDojo 集成](https://defectdojo.com/integrations)

Related Skills

testing-api-for-mass-assignment-vulnerability

9
from killvxk/cybersecurity-skills-zh

测试 API 是否存在批量赋值(mass assignment,自动绑定)漏洞——攻击者可在 API 请求中附加额外参数,从而修改本不应被访问的对象属性。测试人员识别可写端点,向请求体注入未公开字段(role、isAdmin、price、balance),验证服务器是否在未过滤的情况下将这些字段绑定到数据模型。属于 OWASP API3:2023 Broken Object Property Level Authorization 范畴。适用于批量赋值测试、参数绑定滥用、自动绑定漏洞或 API 过度发布(over-posting)相关请求。

performing-web-application-vulnerability-triage

9
from killvxk/cybersecurity-skills-zh

使用 OWASP 风险评级方法论对 DAST/SAST 扫描器的 Web 应用程序漏洞发现进行分类,区分真阳性和假阳性,并确定修复优先级。

performing-vulnerability-scanning-with-nessus

9
from killvxk/cybersecurity-skills-zh

使用 Tenable Nessus 执行认证和未认证漏洞扫描,识别网络基础设施、服务器和应用程序中的已知漏洞、 错误配置、默认凭据和缺失补丁。扫描器将发现与 CVE 数据库和 CVSS 评分关联,生成优先级修复指导。 适用于漏洞扫描、Nessus 评估、补丁合规检查或自动化漏洞检测等请求场景。

performing-ssrf-vulnerability-exploitation

9
from killvxk/cybersecurity-skills-zh

通过探测云元数据端点、内网服务和协议处理器,检测用户可控 URL 参数中的 服务端请求伪造(SSRF)漏洞。测试 AWS/GCP/Azure 元数据 API(169.254.169.254)、 通过 HTTP 进行内网端口扫描、URL 协议绕过技术以及 DNS 重绑定检测。

performing-ot-vulnerability-scanning-safely

9
from killvxk/cybersecurity-skills-zh

使用被动监控、原生协议查询和经过精心控制的Tenable OT Security主动扫描,在OT/ICS环境中安全执行漏洞扫描,在不破坏工业过程或导致旧版控制器崩溃的情况下识别漏洞。

performing-ot-vulnerability-assessment-with-claroty

9
from killvxk/cybersecurity-skills-zh

本技能涵盖使用Claroty xDome平台在OT环境中执行漏洞评估,实现全面资产发现、风险评分、漏洞关联和修复优先级排序。内容涉及通过流量分析进行被动漏洞识别、OT设备安全主动查询、与CVE数据库和ICS-CERT公告集成,以及考虑运营影响和补偿控制措施的基于风险的优先级排序。

performing-endpoint-vulnerability-remediation

9
from killvxk/cybersecurity-skills-zh

通过基于风险评分对 CVE 进行优先级排序、部署补丁、应用配置变更和验证修复 来执行端点漏洞修复。适用于修复漏洞扫描发现的问题、响应严重 CVE 公告 或维护端点合规性与补丁管理 SLA 的场景。适用于涉及漏洞修复、CVE 补丁、 端点漏洞管理或安全修复部署的请求。

performing-authenticated-vulnerability-scan

9
from killvxk/cybersecurity-skills-zh

认证(凭据)漏洞扫描使用有效的系统凭据登录目标主机,对已安装软件、补丁、配置和安全设置进行深度检查,相比未认证扫描可发现 45-60% 更多漏洞。

performing-agentless-vulnerability-scanning

9
from killvxk/cybersecurity-skills-zh

配置并执行无代理漏洞扫描(agentless vulnerability scanning),利用网络协议、云快照分析和基于 API 的发现方式评估系统安全,无需在端点安装 Agent。

performing-active-directory-vulnerability-assessment

9
from killvxk/cybersecurity-skills-zh

使用 PingCastle、BloodHound 和 Purple Knight 评估 Active Directory 安全态势,识别错误配置、权限提升路径和攻击向量。

implementing-vulnerability-sla-breach-alerting

9
from killvxk/cybersecurity-skills-zh

为漏洞修复 SLA 违规构建自动化告警,包含基于严重程度的时间线、升级工作流和合规性报告仪表板。

implementing-vulnerability-remediation-sla

9
from killvxk/cybersecurity-skills-zh

漏洞修复 SLA(服务级别协议)根据严重程度、资产重要性和漏洞利用可用性定义修补或缓解已识别漏洞的强制时限。有效的 SLA 计划推动责任落实、确保一致的修复时间线,并为漏洞管理成熟度提供可衡量的 KPI。