Skip to content

DevSecOps Overview

Microtec ERP's DevSecOps program embeds security controls directly into the Azure DevOps pipeline so that every service — backend, frontend, mobile, and infrastructure — is scanned, reviewed, and verified before any artifact reaches a runtime environment.


Security Model: Central Team + Consumer Extension

┌─────────────────────────────────────────────────────────┐
│              Security Team (owns thresholds)            │
│  DevSecOps/templates/security-pipeline-template.yml     │
│  DevSecOps/config/thresholds.yml                        │
│  DevSecOps/config/repo-registry.yml                     │
└───────────────────────┬─────────────────────────────────┘
                        │ extends
          ┌─────────────┼──────────────┐
          ▼             ▼              ▼
   Platforms/      InfraServices/  WorkflowDesigner/
   azure-pipelines  azure-pipelines  azure-pipelines
   .yml            .yml             .yml

Key principle: each product team consumes the shared security pipeline template. The security team controls severity thresholds in a single location (thresholds.yml). Product teams cannot lower thresholds unilaterally — they must raise a PR to the DevSecOps repository.


16-Stage Security Pipeline

Stage 1   ──► Secret scanning         (Gitleaks)
Stage 2   ──► SAST                    (SonarCloud)
Stage 3   ──► Dependency CVEs         (OWASP DC)
Stage 4   ──► Dependency vulns        (Trivy deps)
Stage 5   ──► IaC scanning            (Trivy IaC — Bicep/YAML)
Stage 6   ──► Dockerfile linting      (Hadolint)
Stage 7   ──► Build + Unit Tests      (.NET / Node / Flutter)
Stage 8   ──► Docker build            (Container build)
Stage 9   ──► Image scanning          (Trivy container)
Stage 10  ──► SBOM generation         (Syft)
Stage 11  ──► Integration Tests       (REST Assured / Newman)
Stage 12  ──► AI code review          (Azure OpenAI GPT-4o)
Stage 13  ──► DAST                    (OWASP ZAP)
Stage 14  ──► Security report         (HTML + PDF publish)
Stage 15  ──► Notifications           (Teams webhook)
Stage 16  ──► Archive                 (Artifacts to storage account)

All stages run within a single pipeline triggered on every PR and on every merge to main/stage/preprod/uat/production.


Multi-Language Support Matrix

Language / PlatformSASTDepsContainerDAST
C# (.NET 8)SonarCloudOWASP DC + TrivyTrivyZAP
TypeScript (Angular 17)SonarCloudTrivyTrivyZAP
Dart (Flutter)SonarCloudTrivyN/A (mobile)N/A
Bicep / YAML (IaC)Trivy IaCN/AN/AN/A
DockerfileHadolintN/ATrivy imageN/A

Note: SonarCloud's analysis engine auto-detects language per repository. No per-language configuration is required beyond the .sonarcloud.properties file.


All Tools at a Glance

ToolStageCategoryBlocks PipelineThreshold
Gitleaks1Secret detectionYesAny secret
SonarCloud2SAST / Quality gateYesQuality gate fail
OWASP Dependency-Check3CVE / SCAYesCritical or High CVE
Trivy (dependencies)4SCAYesCritical
Trivy (IaC)5MisconfigurationYesHigh
Hadolint6Dockerfile lintYesError level
.NET Test / npm test7Unit testingYesAny test failure
Docker build8CI artifactYesBuild failure
Trivy (image)9Container CVEYesCritical
Syft10SBOMNoInformational
Integration Tests11FunctionalYesAny test failure
Azure OpenAI12AI reviewNoAdvisory only
OWASP ZAP13DASTYesHigh
Report generator14ReportingNoN/A
Teams notifier15NotificationNoN/A
Storage archiver16ArchiveNoN/A

Repo Registry Concept

The repo registry (DevSecOps/config/repo-registry.yml) is a YAML manifest that catalogues every repository participating in the DevSecOps pipeline. It answers:

  • Which repositories consume the shared template?
  • What language does each repo use?
  • Where is the Dockerfile and test project?
  • What is the SonarCloud project key?

See repo-registry.md for the full schema and onboarding steps.


Pipeline Trigger Strategy

yaml
# Conceptual trigger — defined in each repo's azure-pipelines.yml
trigger:
  branches:
    include:
      - main
      - stage
      - preprod
      - uat
      - production
  paths:
    exclude:
      - docs/**
      - '*.md'

pr:
  branches:
    include:
      - main
      - stage

Paths such as docs/ and Markdown files are excluded from pipeline triggers to prevent documentation-only commits from consuming pipeline minutes.


Centralized Threshold Configuration

DevSecOps/config/thresholds.yml contains all tunable blocking conditions:

yaml
gitleaks:
  blockOnAnySecret: true

sonarcloud:
  blockOnQualityGateFail: true

owaspDependencyCheck:
  failBuildOnCVSS: 7          # blocks on High+Critical

trivy:
  deps:
    severity: CRITICAL
  iac:
    severity: HIGH
  image:
    severity: CRITICAL

hadolint:
  failureThreshold: error     # error | warning | info | style

owaspZap:
  riskCode: 3                 # 3=High, 2=Medium, 1=Low

Product teams can propose changes via PR; the security team reviews and merges.


Internal Documentation — Microtec Platform Team