К основному содержанию
скилл CX Codex

defender-for-devops — скилл для Claude Code

Скилл defender-for-devops для Claude Code помогает добавить проверки безопасности в Azure Pipelines. Активируется при настройке MSDO, сканировании кода, зависимостей, контейнеров и IaC.

MIT 166 установок ★ 66 обновлён 2026-06-18

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add JosiahSiegel/claude-plugin-marketplace --skill defender-for-devops -a claude-code
Открыть на GitHub

Что делает defender-for-devops

Скилл подсказывает, как подключить Microsoft Security DevOps к YAML-пайплайну Azure Pipelines. Он описывает настройки категорий сканирования и инструментов, публикацию результатов в формате SARIF, отправку находок в Defender for Cloud и шаблон quality gate.

Для блокировки сборки по серьёзности находок используются параметры break и breakSeverity; можно также настроить разные проверки для основной ветки и остальных веток. Для просмотра результатов расширение Microsoft Security DevOps устанавливается из Azure DevOps Marketplace.

Какие задачи решает

  • добавить сканирование безопасности в Azure Pipelines
  • настроить MSDO для анализа кода и секретов
  • опубликовать результаты проверок в формате SARIF
  • отправлять находки пайплайна в Defender for Cloud
  • блокировать сборку по уровню серьёзности уязвимостей

Примеры запросов агенту

  • Добавь Microsoft Security DevOps в YAML-пайплайн Azure Pipelines и опубликуй результаты в формате SARIF.
  • Настрой сканирование зависимостей и блокируй сборку при критических находках.
  • Покажи, как отправлять результаты проверок Azure Pipelines в Defender for Cloud.

Как установить defender-for-devops

1Через Skills CLI (Vercel)

npx skills add JosiahSiegel/claude-plugin-marketplace --skill defender-for-devops -a claude-code

2Вручную: положить файлы

~/.claude/skills/defender-for-devops/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/defender-for-devops/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о defender-for-devops

Как установить defender-for-devops в Claude Code?

Выполни npx skills add JosiahSiegel/claude-plugin-marketplace --skill defender-for-devops -a claude-code. Файл скилла находится по пути ~/.claude/skills/defender-for-devops/SKILL.md.

Что делает defender-for-devops?

Помогает настроить Microsoft Security DevOps в Azure Pipelines: сканирование кода, секретов, зависимостей, IaC и контейнеров, публикацию SARIF и передачу результатов в Defender for Cloud.

Как настроить блокировку сборки по результатам сканирования?

В YAML для задачи MSDO используются break: true и breakSeverity, чтобы задать блокировку сборки и уровень серьёзности.

Исходный текст

SKILL.md · MIT
---
name: defender-for-devops
description: |
  Microsoft Defender for DevOps integration with Azure Pipelines.
  PROACTIVELY activate for: (1) adding security scanning to a pipeline, (2) Microsoft Security DevOps task (MSDO), (3) SAST tools (CredScan, ESLint, BinSkim, Bandit, Semgrep), (4) dependency scanning (Dependency-Check, Snyk), (5) container image scanning (Trivy, Defender for Containers), (6) IaC scanning (Checkov, Terrascan), (7) secret scanning, (8) SARIF results upload, (9) Defender for Cloud connector setup, (10) compliance reporting and policy gates.
  Provides: MSDO task YAML, scanner enable/disable matrix, SARIF integration, Defender connector setup steps, and a quality-gate template.
---

## 🚨 CRITICAL GUIDELINES

### Windows File Path Requirements

**MANDATORY: Always Use Backslashes on Windows for File Paths**

When using Edit or Write tools on Windows, you MUST use backslashes (`\`) in file paths, NOT forward slashes (`/`).

**Examples:**
- ❌ WRONG: `D:/repos/project/file.tsx`
- ✅ CORRECT: `D:\repos\project\file.tsx`

This applies to:
- Edit tool file_path parameter
- Write tool file_path parameter
- All file operations on Windows systems


### Documentation Guidelines

**NEVER create new documentation files unless explicitly requested by the user.**

- **Priority**: Update existing README.md files rather than creating new documentation
- **Repository cleanliness**: Keep repository root clean - only README.md unless user requests otherwise
- **Style**: Documentation should be concise, direct, and professional - avoid AI-generated tone
- **User preference**: Only create additional .md files when user specifically asks for documentation


---

# Microsoft Defender for DevOps Integration

Complete guide to integrating Microsoft Defender for Cloud security scanning into Azure Pipelines.

## Overview

Microsoft Security DevOps (MSDO) provides comprehensive security scanning capabilities:
- **SAST:** Static Application Security Testing
- **Secret Detection:** Identify hardcoded secrets and credentials
- **Dependency Scanning:** Vulnerable package detection
- **IaC Scanning:** Infrastructure as Code security analysis
- **Container Scanning:** Image vulnerability assessment with Trivy

## Microsoft Security DevOps Extension

**Installation:**
1. Install from Azure DevOps Marketplace
2. Configure in pipeline YAML
3. View results in Scans tab
4. Integrate with Defender for Cloud

**Extension Capabilities:**
- Converts results to SARIF format
- Displays findings in Scans tab
- Integrates multiple security tools
- Provides centralized security insights

## YAML Integration

### Basic MSDO Task

```yaml
trigger:
  branches:
    include:
      - main
      - develop

pool:
  vmImage: 'ubuntu-24.04'

stages:
  - stage: Build
    jobs:
      - job: BuildAndScan
        steps:
          - task: UseDotNet@2
            displayName: 'Install .NET SDK'
            inputs:
              version: '8.x'

          - task: DotNetCoreCLI@2
            displayName: 'Build Project'
            inputs:
              command: 'build'
              projects: '**/*.csproj'

          # Microsoft Security DevOps Scan
          - task: MicrosoftSecurityDevOps@1
            displayName: 'Run Microsoft Security DevOps'
            inputs:
              categories: 'secrets,code,dependencies,IaC,containers'
              break: false  # Don't fail pipeline on findings

          # Publish SARIF results
          - task: PublishSecurityAnalysisLogs@3
            displayName: 'Publish Security Analysis Logs'
            inputs:
              ArtifactName: 'CodeAnalysisLogs'

          # Display results in Scans tab
          - task: PostAnalysis@2
            displayName: 'Post Analysis'
            inputs:
              break: false
```

### Advanced Configuration with Breaking Builds

```yaml
- task: MicrosoftSecurityDevOps@1
  displayName: 'Security Scanning (Break on Critical)'
  inputs:
    # Scan categories
    categories: 'secrets,code,dependencies,IaC,containers'

    # Break build on severity
    break: true
    breakSeverity: 'critical'  # Options: critical, high, medium, low

    # Tool configuration
    tools: 'all'  # Or specific: 'credscan,eslint,trivy'

    # Output configuration
    publishResults: true

  continueOnError: false
```

### Conditional Scanning

```yaml
# Full scan on main, quick scan on branches
- task: MicrosoftSecurityDevOps@1
  displayName: 'Security Scan'
  inputs:
    categories: ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
      value: 'secrets,code,dependencies,IaC,containers'
    ${{ else }}:
      value: 'secrets,code'
    break: ${{ eq(variables['Build.SourceBranch'], 'refs/heads/main') }}
```

## Integrated Security Tools

### 1. Secret Scanning

**Replaced:** CredScan deprecated September 2023
**Current:** GitHub Advanced Security for Azure DevOps or MSDO secrets scanning

```yaml
# MSDO secrets scanning
- task: MicrosoftSecurityDevOps@1
  inputs:
    categories: 'secrets'
    break: true  # Always break on secrets
```

**Common secrets detected:**
- API keys and tokens
- Database connection strings
- Cloud provider credentials
- SSH private keys
- OAuth tokens

### 2. Static Code Analysis (SAST)

```yaml
- task: MicrosoftSecurityDevOps@1
  displayName: 'SAST Scan'
  inputs:
    categories: 'code'
    tools: 'eslint,bandit,semgrep'
```

**Supported languages:**
- JavaScript/TypeScript (ESLint)
- Python (Bandit)
- Go (gosec)
- Java (SpotBugs)
- C# (.NET Security Guard)

### 3. Dependency Scanning

```yaml
- task: MicrosoftSecurityDevOps@1
  displayName: 'Dependency Scan'
  inputs:
    categories: 'dependencies'
    tools: 'trivy,govulncheck'
```

**Detects:**
- Known CVEs in dependencies
- Outdated packages
- License compliance issues
- Transitive vulnerabilities

### 4. Infrastructure as Code (IaC) Scanning

```yaml
- task: MicrosoftSecurityDevOps@1
  displayName: 'IaC Security Scan'
  inputs:
    categories: 'IaC'
    tools: 'terrascan,checkov,templateanalyzer'
```

**Scans:**
- Terraform configurations
- ARM templates
- Bicep files
- Kubernetes manifests
- CloudFormation templates

### 5. Container Image Scanning

```yaml
- task: MicrosoftSecurityDevOps@1
  displayName: 'Container Security Scan'
  inputs:
    categories: 'containers'
    tools: 'trivy'
```

**Trivy scans for:**
- OS vulnerabilities
- Application dependencies
- Misconfigurations
- Secrets in images
- License issues

## Integration with Defender for Cloud

### Enable Defender for DevOps

```yaml
# Pipeline automatically sends results to Defender for Cloud
# when MSDO extension is connected

- task: MicrosoftSecurityDevOps@1
  displayName: 'Scan and send to Defender'
  inputs:
    categories: 'all'
    publishResults: true

# Results appear in:
# Defender for Cloud → DevOps Security → Findings
```

**Benefits:**
- Centralized security dashboard
- Cross-pipeline insights
- Compliance reporting
- Security trend analysis
- Integration with Azure Security Center

## Complete Security Pipeline Example

```yaml
trigger:
  branches:
    include:
      - main
      - develop

pool:
  vmImage: 'ubuntu-24.04'

variables:
  - name: breakOnCritical
    value: ${{ eq(variables['Build.SourceBranch'], 'refs/heads/main') }}

stages:
  - stage: SecurityScan
    displayName: 'Security Analysis'
    jobs:
      - job: StaticAnalysis
        displayName: 'Static Security Analysis'
        steps:
          - checkout: self
            fetchDepth: 1

          # Install dependencies
          - task: NodeTool@0
            inputs:
              versionSpec: '20.x'

          - script: npm ci
            displayName: 'Install dependencies'

          # Build application
          - script: npm run build
            displayName: 'Build application'

          # Docker build for container scanning
          - task: Docker@2
            displayName: 'Build Docker image'
            inputs:
              command: 'build'
              Dockerfile: 'Dockerfile'
              tags: '$(Build.BuildId)'

          # Comprehensive security scan
          - task: MicrosoftSecurityDevOps@1
            displayName: 'Microsoft Security DevOps Scan'
            inputs:
              categories: 'secrets,code,dependencies,IaC,containers'
              break: $(breakOnCritical)
              breakSeverity: 'high'
              tools: 'all'

          # Publish SARIF results
          - task: PublishSecurityAnalysisLogs@3
            displayName: 'Publish SARIF Logs'
            inputs:
              ArtifactName: 'CodeAnalysisLogs'
              ArtifactType: 'Container'

          # Post-analysis with results
          - task: PostAnalysis@2
            displayName: 'Security Post Analysis'
            inputs:
              break: $(breakOnCritical)

          # Generate security report
          - script: |
              echo "Security scan completed"
              echo "Results available in Scans tab"
            displayName: 'Security Summary'
            condition: always()

  - stage: Deploy
    dependsOn: SecurityScan
    condition: succeeded()
    jobs:
      - deployment: DeployApp
        environment: 'production'
        strategy:
          runOnce:
            deploy:
              steps:
                - script: echo "Deploying secure application"
```

## Advanced Security Features (Coming 2025)

**Roadmap features:**
- Pull request build validation
- Break pipeline on alert severity
- Advanced Security dashboard
- Custom CodeQL queries
- Integration with GitHub Advanced Security

## GitHub Advanced Security for Azure DevOps

**Alternative to MSDO for secret scanning:**

```yaml
# Requires GitHub Advanced Security license
# Provides:
# - Secret scanning
# - Code scanning with CodeQL
# - Dependency vulnerability alerts
# - Security overview dashboard

# Configuration in Azure DevOps organization settings
# Scans run automatically on commits and PRs
```

## Best Practices

**Pipeline Security:**
- Run security scans on every commit
- Break builds on critical/high severity findings
- Scan both code and dependencies
- Include IaC security validation
- Scan container images before push
- Review findings regularly

**Configuration:**
```yaml
# Recommended configuration
- task: MicrosoftSecurityDevOps@1
  inputs:
    categories: 'secrets,code,dependencies,IaC,containers'
    break: true
    breakSeverity: 'high'  # Adjust based on risk tolerance
    publishResults: true
```

**Integration:**
- Enable Defender for DevOps in Azure portal
- Configure organization-level policies
- Set up automated notifications
- Create security dashboards
- Establish remediation workflows

## Viewing Results

**In Pipeline:**
1. Navigate to pipeline run
2. Click "Scans" tab
3. Review findings by severity
4. Click findings for details and remediation

**In Defender for Cloud:**
1. Azure Portal → Defender for Cloud
2. DevOps Security
3. View findings across all pipelines
4. Filter by severity, project, repository
5. Track remediation progress

## Troubleshooting

**Common Issues:**

**MSDO task fails:**
```yaml
# Enable verbose logging
- task: MicrosoftSecurityDevOps@1
  env:
    MSDO_VERBOSE: true
  inputs:
    categories: 'all'
```

**False positives:**
```yaml
# Suppress findings with .gdnconfig file
# In repository root:
{
  "tools": {
    "trivy": {
      "enabled": true,
      "severities": ["CRITICAL", "HIGH"]
    }
  }
}
```

**Performance:**
- Cache tool downloads
- Limit scan categories on branches
- Use parallel stages for large repos

## Resources

- [Microsoft Security DevOps Extension](https://learn.microsoft.com/azure/defender-for-cloud/azure-devops-extension)
- [Defender for DevOps Documentation](https://learn.microsoft.com/azure/defender-for-cloud/defender-for-devops-introduction)
- [SARIF Format Specification](https://sarifweb.azurewebsites.net/)
- [Security Tools Integration](https://learn.microsoft.com/azure/defender-for-cloud/azure-devops-extension)

© JosiahSiegel · MIT · JosiahSiegel/claude-plugin-marketplace

Похожие скиллы

Все скиллы по теме «Безопасность» →
azure-devops-specialist qdhenry Субагент azure-devops-specialist помогает управлять инфраструктурой Microsoft Azure и пайплайнами CI/CD через команды az и вызовы MCP. Пригодится при настройке сервисов, деплое и валидации шаблонов ARM. CX Codex ★ 1 357звёзд репо Defender Scout KQL официальный github Субагент Defender Scout KQL создаёт и оптимизирует поисковые запросы KQL для Microsoft Defender Advanced Hunting. Помогает писать правила обнаружения угроз и расследовать инциденты. CX Codex +1 ★ 41 430звёзд репо azure-defender-for-cloud MicrosoftDocs Добавляет экспертные знания по Azure Defender for Cloud. CX Codex +1 200установок azure-pipelines MicrosoftDocs Помогает настраивать и отлаживать Azure Pipelines. Разбирает YAML, агентов, секреты Key Vault и развёртывание в Azure. CX Codex +1 470установок aws-cloudformation-devops-expert Giuseppe Trisciuoglio Субагент aws-cloudformation-devops-expert для Claude Code создаёт и проверяет шаблоны CloudFormation, связывает стеки и готовит автоматизацию развёртывания AWS. Работает с задачами Infrastructure as Code и CI/CD. CX Codex ★ 372звёзд репо codeql trailofbits Запускает межпроцедурный статический анализ кода и отслеживание потоков данных через CodeQL. Помогает находить уязвимости в девяти языках программирования. CX Codex +1 9 100установок

Из того же набора96

Весь набор →
databricks-2025 Скилл databricks-2025 для Claude Code содержит шаблоны интеграции Azure Data Factory с Databricks и коннекторами 2025 года для пайплайнов данных. CX Codex +1 168установок adf-validation-rules Скилл adf-validation-rules проверяет ограничения Azure Data Factory: вложенность активностей, лимиты пайплайнов и типовые ошибки валидации. Пригодится при сборке и отладке ADF. CX Codex +1 168установок azure-openai-2025 Скилл azure-openai-2025 собирает справочник по моделям Azure OpenAI 2025 года, деплою через az, SKU и квотам, а также Python SDK. Помогает при переносе работы с моделями в Azure. CX Codex +1 167установок github-actions-2025 Скилл github-actions-2025 помогает настроить пайплайны с новыми возможностями GitHub Actions: раннерами на 1 vCPU, неизменяемыми релизами и переходом на Node24. CX Codex +1 166установок docker-watch-mode-2025 Скилл docker-watch-mode-2025 настраивает watch в Docker Compose: правки исходников уезжают в контейнер без пересборки, а манифесты зависимостей пересобирают образ. CX Codex +1 166установок windows-git-bash-compatibility Скилл windows-git-bash-compatibility устраняет сбои путей и переменных окружения при сборке проектов Azure Data Factory в эмуляторе Git Bash на Windows. CX Codex +1 165установок windows-git-bash-testing Скилл windows-git-bash-testing разбирает падения тестов Vitest, Playwright и MSW, которые случаются только на Windows и в Git Bash: пути, снимки, браузеры. CX Codex +1 164установок git-2025-features Скилл git-2025-features для Claude Code и других платформ описывает возможности Git 2.48–2.49 и современные рабочие процессы. Агент использует его при работе с reftables, sparse-checkout, partial clone и worktrees. CX Codex +1 164установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой