From devops-azure-devops
Generates optional Azure DevOps scanning stages for SonarQube, Snyk, and Wiz security scans.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devops-azure-devops:scanning-stagesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Produces optional security and code-quality scanning stages for Azure DevOps pipelines. Each scanner is emitted as a separate stage only when `stages.<scanner>.enabled: true` in `.devops-agent.json`. All scanning stages depend on the `Build` stage and run in parallel with each other and the `UnitTest` stage.
Produces optional security and code-quality scanning stages for Azure DevOps pipelines. Each scanner is emitted as a separate stage only when stages.<scanner>.enabled: true in .devops-agent.json. All scanning stages depend on the Build stage and run in parallel with each other and the UnitTest stage.
| Config key | Stage emitted |
|---|---|
stages.sonar.enabled: true | SonarScan |
stages.snyk.enabled: true | SnykScan |
stages.wiz.enabled: true | WizScan |
When no scanners are enabled the DockerBuildPush stage's dependsOn list includes only UnitTest. When one or more scanners are enabled they are appended to that dependsOn list automatically.
Uses the official SonarQube ADO extension tasks: SonarQubePrepare@6, SonarQubeAnalyze@6, and SonarQubePublish@6.
SonarQubeServiceConnection of type SonarQube in the ADO project settings.stages.sonar.projectKey).- stage: SonarScan
displayName: 'SonarQube Analysis'
dependsOn: Build
jobs:
- job: Scan
pool:
name: 'OrgLinuxPool'
steps:
- task: SonarQubePrepare@6
inputs:
SonarQube: 'SonarQubeServiceConnection'
scannerMode: 'dotnet' # or 'CLI' for Node.js/Go/Python
projectKey: '$(Build.Repository.Name)'
projectName: '$(Build.Repository.Name)'
- script: dotnet build # replace with language-appropriate build command
displayName: 'Build for analysis'
- task: SonarQubeAnalyze@6
- task: SonarQubePublish@6
inputs:
pollingTimeoutSec: '300'
| Language | scannerMode | Build command |
|---|---|---|
| .NET | dotnet | dotnet build |
| Node.js / Go / Python | CLI | (no separate build command needed) |
| Java (Maven) | Other (Maven plugin handles it) | mvn sonar:sonar |
For scannerMode: CLI, add extraProperties to SonarQubePrepare@6:
- task: SonarQubePrepare@6
inputs:
SonarQube: 'SonarQubeServiceConnection'
scannerMode: 'CLI'
configMode: 'manual'
cliProjectKey: '$(Build.Repository.Name)'
cliSources: '.'
{
"stages": {
"sonar": {
"enabled": true,
"projectKey": "my-custom-project-key",
"serviceConnection": "SonarQubeServiceConnection"
}
}
}
Uses the SnykSecurityScan@1 task from the Snyk ADO extension. Supports application dependency scanning (testType: app) and container scanning (testType: container).
SnykServiceConnection of type Snyk in the ADO project settings.high; override via stages.snyk.severityThreshold.- stage: SnykScan
displayName: 'Snyk Security Scan'
dependsOn: Build
jobs:
- job: Scan
pool:
name: 'OrgLinuxPool'
steps:
- task: SnykSecurityScan@1
inputs:
serviceConnectionEndpoint: 'SnykServiceConnection'
testType: 'app'
severityThreshold: 'high'
failOnIssues: true
monitorWhen: 'always'
additionalArguments: '--all-projects'
| Value | Meaning |
|---|---|
low | Fail on any vulnerability |
medium | Fail on medium and above |
high | Fail on high and critical (default) |
critical | Fail only on critical vulnerabilities |
When stages.snyk.testType: container is set, scan the built Docker image instead of application dependencies:
- task: SnykSecurityScan@1
inputs:
serviceConnectionEndpoint: 'SnykServiceConnection'
testType: 'container'
dockerImageName: '$(registry)/$(imageName):$(tag)'
dockerfilePath: '**/Dockerfile'
severityThreshold: 'high'
failOnIssues: true
{
"stages": {
"snyk": {
"enabled": true,
"severityThreshold": "high",
"testType": "app",
"serviceConnection": "SnykServiceConnection"
}
}
}
Wiz container scanning uses the wizcli CLI tool via a Bash task. Credentials are sourced from pipeline variables backed by a Key Vault variable group — never hardcoded.
wizcli binary available on the agent, or downloaded at runtime (download step included below).WIZ_CLIENT_ID and WIZ_CLIENT_SECRET stored in an ADO variable group linked to Azure Key Vault (marked as secret).stages.wiz.policyId).- stage: WizScan
displayName: 'Wiz Security Scan'
dependsOn: Build
variables:
- group: 'org-secrets-kv' # must contain WIZ_CLIENT_ID and WIZ_CLIENT_SECRET
jobs:
- job: Scan
pool:
name: 'OrgLinuxPool'
steps:
- task: Bash@3
displayName: 'Download wizcli'
inputs:
targetType: 'inline'
script: |
curl -s -o wizcli https://wizcli.app.wiz.io/latest/wizcli-linux-amd64
chmod +x wizcli
sudo mv wizcli /usr/local/bin/wizcli
- task: Bash@3
displayName: 'Wiz Docker Scan'
inputs:
targetType: 'inline'
script: |
wizcli auth --id "$(WIZ_CLIENT_ID)" --secret "$(WIZ_CLIENT_SECRET)"
wizcli docker scan \
--image "$(registry)/$(imageName):$(tag)" \
--policy "$(wizPolicy)" \
--tag "source=azure-devops,repo=$(Build.Repository.Name),build=$(Build.BuildId)"
env:
WIZ_CLIENT_ID: $(WIZ_CLIENT_ID)
WIZ_CLIENT_SECRET: $(WIZ_CLIENT_SECRET)
{
"stages": {
"wiz": {
"enabled": true,
"policyId": "org-default-container-policy",
"variableGroup": "org-secrets-kv"
}
}
}
WIZ_CLIENT_ID and WIZ_CLIENT_SECRET must never appear as plain-text values in pipeline YAML.env: block in the Bash task so ADO masks them in logs.--tag arguments to wizcli docker scan enrich the Wiz dashboard with build provenance metadata.When all three scanners are enabled alongside UnitTest, the DockerBuildPush stage waits for all of them:
- stage: DockerBuildPush
displayName: 'Docker Build & Push'
dependsOn:
- UnitTest
- SonarScan
- SnykScan
- WizScan
When only a subset is enabled, dependsOn includes only the enabled stages plus UnitTest.
npx claudepluginhub gagandeepp/software-agent-teams --plugin devops-azure-devopsGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.