Token导航 LogoToken导航TokenDH.com
研究检索敏感数据githubverified来源可访问clear审计异常

defectdojodefectdojo 搜索

Agent Skill

defectdojo 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

921

周安装

38

GitHub Stars

61

下载量

301
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:defectdojo(defectdojo 搜索)
来源仓库:https://github.com/julianobarbosa/claude-code-skills
仓库路径:skills/defectdojo
安装命令:
npx skills add https://github.com/julianobarbosa/claude-code-skills --skill defectdojo
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/julianobarbosa/claude-code-skills --skill defectdojo

简介

DefectDojo 漏洞管理平台集成,统一纳管 200+ 种安全扫描工具输出。

  • 自动去重、分配 SLA 与生成合规报告,对接 JIRA 实现闭环处置。
  • 提供 REST API v2 供 Claude Code 调用,支持扫描导入与态势查询。
  • 需配置扫描器 webhook 或定期拉取结果以保持数据新鲜度。
  • defectdojo 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

DefectDojo Skill

Overview

DefectDojo is an open-source DevSecOps, Application Security Posture Management (ASPM), and vulnerability management platform. It orchestrates end-to-end security testing, vulnerability tracking, deduplication, remediation, and reporting.

Key Capabilities:

  • Unified vulnerability management across 200+ security tools
  • Automated scan import and deduplication
  • CI/CD pipeline integration
  • Bidirectional JIRA integration
  • Role-based access control
  • SLA tracking and reporting
  • REST API v2 for automation
  • MCP Tools for Claude Code integration

Official Resources:

MCP Tools (Primary Interface)

This skill provides 12 MCP tools for direct DefectDojo API interaction. Use these tools instead of manual API calls.

Read Operations

ToolDescriptionKey Parameters
defectdojo_list_productsList and search productsname_contains, prod_type, limit
defectdojo_get_productGet detailed product infoproduct_id (required)
defectdojo_list_engagementsList engagements with filtersproduct_id, status, engagement_type
defectdojo_list_testsList tests in engagementsengagement_id, test_type
defectdojo_list_findingsPrimary tool - Search findingsseverity, active, product_id, cwe
defectdojo_get_findingGet finding detailsfinding_id (required)
defectdojo_get_statisticsVulnerability statisticsproduct_id, engagement_id
defectdojo_list_endpointsList product endpointsproduct_id, host, protocol
defectdojo_list_test_typesList scanner typesname_contains

Write Operations

ToolDescriptionKey Parameters
defectdojo_create_engagementCreate new engagementproduct_id, name, engagement_type
defectdojo_update_findingUpdate finding statusfinding_id, active, verified, false_p
defectdojo_close_engagementClose engagementengagement_id

Usage Examples

List all critical active findings:

Use defectdojo_list_findings with:
- severity: "Critical"
- active: true

Get vulnerability statistics for a product:

Use defectdojo_get_statistics with:
- product_id: 1

Search for SQL injection findings:

Use defectdojo_list_findings with:
- cwe: 89
- active: true

Mark a finding as false positive:

Use defectdojo_update_finding with:
- finding_id: 123
- false_p: true
- active: false

Create a CI/CD engagement:

Use defectdojo_create_engagement with:
- product_id: 1
- name: "Pipeline Security Scan"
- engagement_type: "CI/CD"

Response Formats

All tools support two output formats via the response_format parameter:

  • markdown (default) - Human-readable formatted output
  • json - Raw JSON for programmatic processing

MCP Server Configuration

The MCP server is configured in .mcp.json:

{
  "mcpServers": {
    "defectdojo": {
      "command": "python",
      "args": [".claude/mcp-servers/defectdojo-mcp/defectdojo_mcp.py"],
      "env": {
        "DEFECTDOJO_URL": "https://defectdojo.dev.cafehyna.com.br",
        "DEFECTDOJO_API_TOKEN": "${DEFECTDOJO_API_TOKEN}"
      }
    }
  }
}

Environment Variables:

  • DEFECTDOJO_URL - Your DefectDojo instance URL
  • DEFECTDOJO_API_TOKEN - API token from /api/key-v2

Data Model (Product Hierarchy)

DefectDojo uses five interconnected data classes to organize security work:

Product Type
    └── Product
        └── Engagement (CI/CD or Interactive)
            └── Test
                └── Finding
                    └── Endpoint

Product Types

The topmost organizational level that categorizes products by business domain, team, or security area. Enables role-based access control at the category level.

Products

Individual applications or systems under security testing. Each product maintains:

  • Its own testing history
  • Deduplication scope (findings deduplicate within products)
  • SLA configuration
  • Team assignments

Engagements

Scheduled testing periods containing one or more tests. Two types:

TypePurposeUse Case
CI/CDAutomated pipeline integrationAutomated scans per build/commit
InteractiveManual testing by engineersPenetration tests, manual reviews

Tests

Individual security scans grouped by tool type. Tests support:

  • Reimporting (add findings to existing test)
  • Environment tagging
  • Version tracking

Findings

Specific vulnerabilities discovered during testing:

SeverityDescription
CriticalImmediate action required
HighHigh priority remediation
MediumStandard priority
LowLow priority
InfoInformational only

Finding States:

  • Active / Inactive
  • Verified / Unverified
  • Duplicate
  • Mitigated
  • False Positive
  • Risk Accepted
  • Out of Scope

Endpoints

References to affected hosts, URLs, or systems. Enables vulnerability tracking by infrastructure component.

API v2 Reference

Note: For most operations, use the MCP Tools above instead of direct API calls. Use direct API calls only for scan imports or operations not covered by MCP tools.

Authentication

Generate API token at: <your-instance>/api/key-v2

# Header format
Authorization: Token <api_key>

Environment Variables:

  • DD_API_TOKENS_ENABLED=False - Disable API tokens entirely
  • DD_API_TOKEN_AUTH_ENDPOINT_ENABLED=False - Disable only token auth endpoint

Core Endpoints

EndpointMethodPurpose
/api/v2/import-scan/POSTInitial scan import
/api/v2/reimport-scan/POSTSubsequent imports (deduplication)
/api/v2/products/GET/POSTManage products
/api/v2/engagements/GET/POSTManage engagements
/api/v2/tests/GET/POSTManage tests
/api/v2/findings/GET/POST/PATCHManage findings
/api/v2/endpoints/GET/POSTManage endpoints
/api/v2/users/GETList users

Import Scan Parameters

curl -X POST "https://defectdojo.example.com/api/v2/import-scan/" \
  -H "Authorization: Token <api-token>" \
  -F "scan_type=<scanner-type>" \
  -F "file=@results.json" \
  -F "engagement=<engagement-id>" \
  -F "minimum_severity=Info" \
  -F "active=true" \
  -F "verified=false" \
  -F "scan_date=2024-01-15"

Key Parameters:

ParameterDescription
scan_typeScanner identifier (e.g., "Trivy Scan", "Semgrep JSON Report")
engagementTarget engagement ID
test_titleCustom test name
minimum_severityFilter threshold (Info, Low, Medium, High, Critical)
activeMark findings as active (boolean)
verifiedMark findings as verified (boolean)
scan_dateOverride scan completion date
do_not_reactivatePrevent reopening closed findings
auto_create_contextAuto-create Product/Engagement if missing

Reimport Scan (Deduplication)

curl -X POST "https://defectdojo.example.com/api/v2/reimport-scan/" \
  -H "Authorization: Token <api-token>" \
  -F "scan_type=Trivy Scan" \
  -F "file=@trivy-results.json" \
  -F "test=<test-id>" \
  -F "do_not_reactivate=true"

The reimport endpoint:

  • Detects new vs. existing findings
  • Updates existing findings
  • Closes findings not in the new scan
  • Can auto-create context when auto_create_context=true

Interactive API Documentation

Access Swagger UI at: <your-instance>/api/v2/oa3/swagger-ui/

CI/CD Integration

Pipeline Integration Pattern

# GitLab CI Example
stages:
  - security-scan
  - upload-results

trivy-scan:
  stage: security-scan
  script:
    - trivy image --format json -o trivy-results.json $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
  artifacts:
    paths:
      - trivy-results.json

upload-to-defectdojo:
  stage: upload-results
  script: |
    curl -X POST "${DEFECTDOJO_URL}/api/v2/reimport-scan/" \
      -H "Authorization: Token ${DEFECTDOJO_API_TOKEN}" \
      -F "scan_type=Trivy Scan" \
      -F "file=@trivy-results.json" \
      -F "product_name=${CI_PROJECT_NAME}" \
      -F "engagement_name=CI/CD-${CI_PIPELINE_ID}" \
      -F "auto_create_context=true" \
      -F "minimum_severity=Low"

Jenkins Integration

Install the DefectDojo Jenkins plugin from: https://plugins.jenkins.io/defectdojo/

Pipeline Configuration:

pipeline {
    agent any
    environment {
        DEFECTDOJO_URL = 'https://defectdojo.example.com'
        DEFECTDOJO_API_KEY = credentials('defectdojo-api-key')
    }
    stages {
        stage('Security Scan') {
            steps {
                sh 'trivy image --format json -o trivy.json myapp:latest'
            }
        }
        stage('Upload to DefectDojo') {
            steps {
                defectDojoPublisher(
                    artifact: 'trivy.json',
                    productName: 'MyApp',
                    scanType: 'Trivy Scan',
                    engagementName: "Build-${BUILD_NUMBER}"
                )
            }
        }
    }
}

GitHub Actions Integration

name: Security Scan
on: [push]

jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run Trivy
        uses: aquasecurity/trivy-action@master
        with:
          scan-type: 'fs'
          format: 'json'
          output: 'trivy-results.json'

      - name: Upload to DefectDojo
        run: |
          curl -X POST "${{ secrets.DEFECTDOJO_URL }}/api/v2/reimport-scan/" \
            -H "Authorization: Token ${{ secrets.DEFECTDOJO_TOKEN }}" \
            -F "scan_type=Trivy Scan" \
            -F "file=@trivy-results.json" \
            -F "product_name=${{ github.repository }}" \
            -F "engagement_name=GitHub-${{ github.run_id }}" \
            -F "auto_create_context=true"

Python API Examples

Tip: For Claude Code interactions, use the MCP tools (defectdojo_list_findings, etc.) instead of writing Python code. The examples below are for CI/CD scripts and external integrations.

Basic API Connection

import requests

class DefectDojoAPI:
    def __init__(self, url, api_token):
        self.url = url.rstrip('/')
        self.headers = {
            'Authorization': f'Token {api_token}',
            'Accept': 'application/json'
        }

    def get_products(self):
        response = requests.get(
            f'{self.url}/api/v2/products/',
            headers=self.headers
        )
        response.raise_for_status()
        return response.json()

    def import_scan(self, engagement_id, scan_type, file_path, **kwargs):
        with open(file_path, 'rb') as f:
            data = {
                'engagement': engagement_id,
                'scan_type': scan_type,
                'minimum_severity': kwargs.get('minimum_severity', 'Info'),
                'active': kwargs.get('active', True),
                'verified': kwargs.get('verified', False),
            }
            files = {'file': f}
            response = requests.post(
                f'{self.url}/api/v2/import-scan/',
                headers={'Authorization': self.headers['Authorization']},
                data=data,
                files=files
            )
        response.raise_for_status()
        return response.json()

# Usage
api = DefectDojoAPI('https://defectdojo.example.com', 'your-api-token')
products = api.get_products()

Create Product and Engagement

def create_product(api, name, prod_type_id, description=''):
    response = requests.post(
        f'{api.url}/api/v2/products/',
        headers=api.headers,
        json={
            'name': name,
            'prod_type': prod_type_id,
            'description': description
        }
    )
    response.raise_for_status()
    return response.json()

def create_engagement(api, product_id, name, target_start, target_end,
                      engagement_type='CI/CD'):
    response = requests.post(
        f'{api.url}/api/v2/engagements/',
        headers=api.headers,
        json={
            'name': name,
            'product': product_id,
            'target_start': target_start,
            'target_end': target_end,
            'engagement_type': engagement_type,
            'status': 'In Progress'
        }
    )
    response.raise_for_status()
    return response.json()

Query Findings

def get_findings(api, product_id=None, severity=None, active=True):
    params = {'active': active}
    if product_id:
        params['test__engagement__product'] = product_id
    if severity:
        params['severity'] = severity

    response = requests.get(
        f'{api.url}/api/v2/findings/',
        headers=api.headers,
        params=params
    )
    response.raise_for_status()
    return response.json()

# Get all critical findings
critical = get_findings(api, severity='Critical')

Supported Security Tools (200+)

SAST / Code Analysis

  • Bandit, Checkmarx, Fortify, SonarQube, Semgrep
  • CodeQL, Horusec, Brakeman, SpotBugs

Dependency / SCA

  • Snyk, OWASP Dependency-Check, Dependency-Track
  • npm Audit, pip-audit, Trivy, Safety

DAST / Web Scanning

  • Burp Suite, OWASP ZAP, Nikto, Nessus
  • Qualys, OpenVAS, Acunetix, AppScan

Container / Infrastructure

  • Trivy, Aqua, Anchore, Wiz, NeuVector
  • kube-bench, Kubescape, Prisma Cloud

Secrets Detection

  • Gitleaks, Trufflehog, Detect-secrets
  • GitHub Secret Scanning

Cloud Security

  • AWS Inspector, AWS Prowler, ScoutSuite
  • Azure Security Center, Checkov

IaC Scanning

  • Checkov, Terrascan, KICS, TFSec, Dockle

Full list: https://docs.defectdojo.com/supported_tools/

JIRA Integration

Configuration

  1. Enable in System Settings: Configuration > System Settings > Enable JIRA Integration
  2. Add JIRA Instance: Enterprise Settings > JIRA Instances > + New JIRA Instance
  3. Configure Webhook (bidirectional sync):

- Create webhook in JIRA pointing to: https://<defectdojo>/jira/webhook/<webhook-secret> - Enable in DefectDojo: "Enable JIRA web hook"

Environment Variables

extraEnv:
  - name: DD_JIRA_URL
    value: "https://your-jira.atlassian.net"
  - name: DD_JIRA_MAX_RETRIES
    value: "3"

Features

  • Push findings to JIRA as issues
  • Bidirectional comment sync
  • Auto-close findings when JIRA issues close
  • SLA notifications as JIRA comments

Project File Locations

File TypePath
ApplicationSetinfra-team/applicationset/defectdojo.yaml
Helm Valuesargo-cd-helm-values/kube-addons/defectdojo/<cluster>/values.yaml
SecretProviderClassargo-cd-helm-values/kube-addons/defectdojo/<cluster>/secretproviderclass.yaml

Environment Configuration

ClusterKey VaultAzure AD Tenant ID
cafehyna-devkv-cafehyna-dev-hlg3f7a3df4-f85b-4ca8-98d0-08b1034e6567

Azure AD App Registration

SettingValue
Application (Client) ID79ada8c7-4270-41e8-9ea0-1e1e62afff3d
Tenant ID3f7a3df4-f85b-4ca8-98d0-08b1034e6567
Redirect URIhttps://defectdojo.dev.cafehyna.com.br/complete/azuread-tenant-oauth2/

Azure AD SSO Configuration

Required Environment Variables

extraEnv:
  # Enable Azure AD OAuth2
  - name: DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_ENABLED
    value: "True"
  # Application (Client) ID
  - name: DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_KEY
    value: "<client-id>"
  # Directory (Tenant) ID
  - name: DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_TENANT_ID
    value: "<tenant-id>"
  # Client Secret (from Key Vault)
  - name: DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_SECRET
    valueFrom:
      secretKeyRef:
        name: defectdojo
        key: DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_SECRET

Group Synchronization

extraEnv:
  # Sync groups from Azure AD token
  - name: DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_GET_GROUPS
    value: "True"
  # Remove users from groups when removed in Azure AD
  - name: DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_CLEANUP_GROUPS
    value: "True"
  # Filter to only sync DefectDojo groups
  - name: DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_GROUPS_FILTER
    value: "^G-Usuarios-DefectDojo-.*"

Required Azure AD Permissions (Application type, Admin consent required):

  • Group.Read.All
  • GroupMember.Read.All
  • User.Read.All

For complete Azure AD SSO details, see references/azure-ad-sso.md.

DefectDojo Roles

RolePermissions
SuperuserFull system access, manage users, system settings
OwnerDelete products, designate other owners
MaintainerEdit products, add members, delete findings
WriterAdd/edit engagements, tests, findings
ReaderView-only, add comments
API ImporterLimited API access for CI/CD pipelines

Azure AD Groups for Role Mapping

Azure AD GroupDefectDojo Role
G-Usuarios-DefectDojo-SuperuserSuperuser
G-Usuarios-DefectDojo-OwnerOwner
G-Usuarios-DefectDojo-MaintainerMaintainer
G-Usuarios-DefectDojo-WriterWriter
G-Usuarios-DefectDojo-ReaderReader

Helm Chart Quick Reference

Key Values

# Host configuration
host: defectdojo.dev.cafehyna.com.br
siteUrl: https://defectdojo.dev.cafehyna.com.br

# Secrets (use CSI driver)
createSecret: false
disableHooks: true

# Django
django:
  replicas: 1
  ingress:
    enabled: true
    activateTLS: true
    className: nginx

# Celery (keep beat at 1 replica)
celery:
  beat:
    enabled: true
    replicas: 1
  worker:
    enabled: true
    replicas: 1

# Database
postgresql:
  enabled: true

# Cache
redis:
  enabled: true

For complete Helm values reference, see references/helm-values.md.

Kubernetes Deployment

Basic Helm Install

git clone https://github.com/DefectDojo/django-DefectDojo
cd django-DefectDojo

helm install defectdojo ./helm/defectdojo \
  -n defectdojo --create-namespace \
  --set django.ingress.enabled=true \
  --set django.ingress.activateTLS=false \
  --set createSecret=true \
  --set createRabbitMqSecret=true \
  --set createPostgresqlSecret=true

Access DefectDojo

kubectl port-forward --namespace=defectdojo service/defectdojo-django 8080:80

Secrets Management

Secrets are managed via Azure Key Vault CSI Driver:

Key Vault SecretK8s Secret KeyPurpose
defectdojo-admin-passwordDD_ADMIN_PASSWORDAdmin user password
defectdojo-secret-keyDD_SECRET_KEYDjango secret key
defectdojo-credential-aes-keyDD_CREDENTIAL_AES_256_KEYCredential encryption
defectdojo-azuread-client-secretDD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_SECRETAzure AD client secret

Common Troubleshooting

User Not in Groups After SSO Login

Symptoms: User logged in via Azure AD but shows "No group members found"

Solutions:

  1. Verify DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_GET_GROUPS=True
  2. Check Azure AD API permissions (Group.Read.All with admin consent)
  3. Verify Azure AD token includes group claim (not role claims)
  4. User must log out and log back in to sync groups
  5. Create matching groups in DefectDojo UI

HTTPS Redirect URI Mismatch (ADSTS50011)

Error: "The redirect URI specified in the request does not match"

Solution: Ensure these are set:

- name: DD_SESSION_COOKIE_SECURE
  value: "True"
- name: DD_CSRF_COOKIE_SECURE
  value: "True"
- name: DD_SECURE_PROXY_SSL_HEADER
  value: "True"

ERR_TOO_MANY_REDIRECTS

Cause: DD_SECURE_SSL_REDIRECT=True with TLS-terminating proxy

Solution: Set DD_SECURE_SSL_REDIRECT=False when behind NGINX Ingress

Emergency Login Access

If SSO breaks, access standard login form:

https://defectdojo.dev.cafehyna.com.br/login?force_login_form

For complete troubleshooting guide, see references/troubleshooting.md.

Useful Commands

Check Pod Status

KUBECONFIG=~/.kube/aks-rg-hypera-cafehyna-dev-config kubectl get pods -n defectdojo

View Logs

KUBECONFIG=~/.kube/aks-rg-hypera-cafehyna-dev-config kubectl logs -n defectdojo -l app.kubernetes.io/name=defectdojo -c uwsgi

Restart Deployment

KUBECONFIG=~/.kube/aks-rg-hypera-cafehyna-dev-config kubectl rollout restart deployment/defectdojo-django -n defectdojo

Additional References

MCP Server

Skill References

External

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.3%
按下载量换算82

OpenCode

24.84%
按下载量换算75

Gemini CLI

16.59%
按下载量换算50

Antigravity

12.37%
按下载量换算37

Codex

8.21%
按下载量换算25

Cursor

3.58%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills