Skip to main content
All CollectionsPrivacy Code ScanningIntegrations
Azure Pipeline Integration with Privado
Azure Pipeline Integration with Privado

Integrating Privado with Azure Pipeline and running Privado scan in CI/CD pipelines.

Vaibhav Antil avatar
Written by Vaibhav Antil
Updated over a week ago

Privado integrates with Azure Pipeline, seamlessly scanning your application code to discover data inventory and privacy vulnerabilities, right from your CI/CD workflows.

After signing up, you will be redirected to the onboarding page. As part of onboarding, you will be prompted to connect Privado with your CI/CD tool to scan the repositories.

If you do not have appropriate permission for Azure Pipeline, invite the relevant team member. Click on the Azure button and we will guide you through on how to integrate Privado with Azure Pipelines. The rest of the knowledge base mimics the documentation in the product.

Getting Started

To integrate Privado with Azure Pipelines, you need to have an Azure DevOps repository. Follow the steps below to configure your pipeline:


โ€‹Configure Azure CI/CD

To create and configure a CI/CD pipeline for Privado:

  1. Generate an API Token and add it as PRIVADO_API_TOKEN in the Variables Groups section of your Azure project, specifically in a new group named PrivadoVariables.

  2. Create a file named azure-pipelines.yml in your repository with the following content

Please note the actual pipeline script is available in the Privado dashboard documentation.

Explanation of Configuration

In the configuration file, we have pre-defined certain environment variables that are required by the scan process and consumed in the Docker run command that follows.

  1. PRIVADO_API_TOKEN is fetched from CI/CD variables, which should be set in the previous step.

  2. The volume mount -v $(Build_SourcesDirectory):/privado ensures that the checked-out code root is mounted at the expected target.

As the scan pipeline completes, the result will appear on the Privado dashboard.

Steps Breakdown

  1. Add Dependencies: The script begins by adding curl using apk add --no-cache curl.

  2. Login to Docker Registry: It then logs into the Docker registry using credentials fetched securely via a curl request.

  3. Prepare Environment Variables: Environment variables starting with PRIVADO_ are filtered and saved into a .privado.env file.

  4. Run Docker Container: Finally, it runs the Privado scanner Docker container with the prepared environment variables.

By following these steps, you will have Privado integrated with your Azure CI/CD pipeline, allowing for automated privacy and data inventory scanning of your codebase.


โ€‹

Did this answer your question?