Skip to main content

Container Patching with Azure DevOps, Trivy and Copacetic

· 12 min read

Copacetic (or Copa for short) is a CLI tool written in Go and based on buildkit that can be used to directly patch container images given the vulnerability scanning results from popular tools like Trivy.

Trivy is a security scanner that can scan container images for vulnerabilities. It is a simple and comprehensive scanner that can be used to scan images for vulnerabilities in the OS packages, application dependencies, and language-specific packages, supplemented by vulnerability databases supplemented with Copa, which can be used to patch the vulnerabilities found by Trivy; this tool can be used to quickly patch container images without going upstream for a full rebuild, which may require more time, and the involvement of multiple teams (ie Developers, Q&A, Operations, Support) to patch, test and deploy.

In this article, we will use Azure DevOps to run a pipeline that will use Trivy to scan a container image for vulnerabilities, and then use Copa to patch the vulnerabilities found by Trivy, and then push the patched image to an Azure Container Registry (ACR).

Azure App Gateway Sinkhole for API Management with Terraform

· 4 min read

When you use an Azure API Management solution in Internal mode, you may also want to use an Azure Application Gateway to provide additional security and performance features for external consumers as well and contain a mix of both Internal (to your own vnet and private dns) and (external, accessed via public DNS) APIs.

APIM Management Internal (Image courtesy of: Azure APIM and Application Gateway Integration)

In this scenario, you can use the following paths on your APIs:

  • Internal: https://apim.yourdomain.com/internal/echo
  • External: https://apim.yourdomain.com/external/echo

Azure API Management - EchoAPI