Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Coded Smorgasbord: High Strung

      September 26, 2025

      Chainguard launches trusted collection of verified JavaScript libraries

      September 26, 2025

      CData launches Connect AI to provide agents access to enterprise data sources

      September 26, 2025

      PostgreSQL 18 adds asynchronous I/O to improve performance

      September 26, 2025

      Distribution Release: Neptune 9.0

      September 25, 2025

      Distribution Release: Kali Linux 2025.3

      September 23, 2025

      Distribution Release: SysLinuxOS 13

      September 23, 2025

      Development Release: MX Linux 25 Beta 1

      September 22, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      PHP 8.5.0 RC 1 available for testing

      September 26, 2025
      Recent

      PHP 8.5.0 RC 1 available for testing

      September 26, 2025

      Terraform Code Generator Using Ollama and CodeGemma

      September 26, 2025

      Beyond Denial: How AI Concierge Services Can Transform Healthcare from Reactive to Proactive

      September 25, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Distribution Release: Neptune 9.0

      September 25, 2025
      Recent

      Distribution Release: Neptune 9.0

      September 25, 2025

      FOSS Weekly #25.39: Kill Switch Phones, LMDE 7, Zorin OS 18 Beta, Polybar, Apt History and More Linux Stuff

      September 25, 2025

      Distribution Release: Kali Linux 2025.3

      September 23, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»End-to-End DevSecOps in CI/CD Pipelines: Build Secure Apps with Sast, Dast and Azure DevOps

    End-to-End DevSecOps in CI/CD Pipelines: Build Secure Apps with Sast, Dast and Azure DevOps

    August 6, 2025

    Introduction to DevSecOps

    DevSecOps is the evolution of DevOps with a focused integration of security throughout the software development lifecycle (SDLC). It promotes a cultural and technical shift by “shifting security left,”  integrating security early in the CI/CD pipeline instead of treating it as an afterthought.

    Dev Sec Ops Removebg Preview

    While DevOps engineers focus on speed, automation, and reliability, DevSecOps engineers share the same goals with an added responsibility: ensuring security at every stage of the process.

    DevSecOps = Development + Security + Operations

    By embedding security from the beginning, DevSecOps enables organizations to build secure software faster, reduce costs, and minimize risks.

    Why Shift Left with Security?

    Dollar Logo PNG Vectors Free Download

    Cost Savings

    Search Bug Icons - Free SVG & PNG Search Bug Images - Noun Project

    Early Detection

     

    Shifting security left means embedding security checks earlier in the pipeline. This approach offers several key benefits:

     

     

    • Early Detection: Identifies vulnerabilities before they reach production.
    • Cost Savings: Fixing security issues in earlier phases of development is significantly more cost-effective.

    • Reduced Risk: Early intervention helps prevent critical vulnerabilities from being deployed.

    Implementing DevSecOps in an Existing CI/CD Pipeline

    Prerequisites

    To implement DevSecOps in your Azure DevOps pipeline, ensure the following infrastructure is in place:

    • Azure VM (for self-hosted Azure DevOps agent)

    • Azure Kubernetes Service (AKS)

    • Azure Container Registry (ACR)

    • Azure DevOps project and repository

    • SonarQube (for static code analysis)Docker Registry Service Connection​

    Service Connections Setup

    1. Docker Registry Connection

    • Go to Azure DevOps → Project Settings → Service Connections.

    • Click “New service connection” → Select Docker Registry.

    • Choose Docker Hub or ACR.

    • Provide Docker ID/Registry URL and credentials.

    • Verify and save the connection.

    2. AKS Service Connection

    • Azure DevOps → Project Settings → Service Connections.

    • Click “New service connection” → Select Azure Resource Manager.

    • Use Service Principal (automatic).

    • Select your subscription and AKS resource group.

    • Name the connection and save.

    3. SonarQube Service Connection

    • Azure DevOps → Project Settings → Service Connections.

    • New service connection → SonarQube.

    • Input the Server URL and token.

    • Save and verify.

    Main Features Covered in DevSecOps Pipeline

    Devsecops.drawio (1)

    • Secret Scanning

    • Dependency Scanning (SCA)

    • Static Code Analysis (SAST)

    • Container Image Scanning

    • DAST (Dynamic Application Security Testing)

    • Quality Gates Enforcement

    • Docker Build & Push

    • AKS Deployment

    Pipeline Stages Overview

    1. Secret Scanning

    Trivy

    Tools

    detect-secrets, Trivy

    Steps

    • Install Python and detect-secrets.

    • Scan source code for hardcoded secrets.

    • Run Trivy with --security-checks secret.

    • Save results as HTML → Publish to pipeline artifacts.

    • Apply quality gates to fail builds on critical secrets.

    2. Dependency Scanning (SCA)

    Containerizing OWASP Dependency Check Security Tool | by Deshani Geethika Poddenige | Medium

    Tools

    Safety, Trivy

    Steps

    • Use requirements.txt for dependencies.

    • Run Safety to identify known vulnerabilities.

    • Scan the filesystem using Trivy fs.

    • Publish results.

    • Fail pipeline if critical vulnerabilities exceed the threshold.

    3. Static Code Analysis (SAST)

    SonarQube - Eclipsepedia

     

    Tools

    SonarQube, Bandit

    Steps

    • Use Bandit for Python security issues.

    • Run SonarQube analysis via CLI.

    • Enforce SonarQube Quality Gate to fail the pipeline on low scores.

    4. Container Image Build & Scan

    Docker full logo transparent PNG - StickPNG

    Tools

    Docker, Trivy

    Steps

    • Build the Docker image with a version tag.

    • Scan the image using Trivy.

    • Generate and publish scan reports.

    • Apply a security gate — fail on high-severity vulnerabilities.

    • Push image to ACR if passed.

    5. DAST – OWASP ZAP Scan

    Owasp Zap Logo Png, Transparent Png - kindpng

    Tools

    OWASP ZAP

    Steps

    • Run the app in a test container network.

    • Perform ZAP baseline scan.

    • Save results as HTML.

    • Stop the test container.

    • Apply a security gate to block high-risk findings

    6. Deploy to AKS

    Azure Kubernetes Service: Use Cases | by Ankit Pramanik | Medium

    Tools

    kubectl, Kubernetes 

    Steps

    • Fetch AKS credentials.

    • Use envsubst to fill in manifest variables.

    • Deploy the app via kubectl apply.

    • Trigger a pod restart to deploy a new image.

    Conclusion

    DevSecOps is not just a practice; it’s a mindset. By integrating security at every phase of your CI/CD pipeline, you’re not only protecting your software but also enhancing the speed and confidence with which you can deliver it.

    Implementing these practices with Azure DevOps, SonarQube, Trivy, and other tools makes securing your applications systematic, efficient, and measurable.

    Secure early. Secure often. Secure always. That’s the DevSecOps way.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleESET Threat Report H1 2025: ClickFix, infostealer disruptions, and ransomware deathmatch
    Next Article House Price Predictor – An MLOps Learning Project Using Azure DevOps

    Related Posts

    Development

    PHP 8.5.0 RC 1 available for testing

    September 26, 2025
    Development

    Terraform Code Generator Using Ollama and CodeGemma

    September 26, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    CVE-2025-2880 – Yame Link In Bio WordPress Sensitive Information Exposure

    Common Vulnerabilities and Exposures (CVEs)

    Kie.ai: Most Affordable & Stable Veo 3 API with Synced Audio

    Web Development

    CVE-2025-54444 – Samsung Electronics MagicINFO 9 Server File Upload Code Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-5541 – WordPress Runners Log Plugin Stored Cross-Site Scripting Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    Benchmarking AI-assisted developers (and their tools) for superior AI governance

    September 23, 2025

    A quick browse of LinkedIn, DevTok, and X would lead you to believe that almost…

    CVE-2025-52978 – Dropbox File Decryption

    June 24, 2025

    CVE-2025-4440 – H3C GR-1800AX Buffer Overflow Vulnerability

    May 8, 2025

    DistroWatch Weekly, Issue 1116

    April 6, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.