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:
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.
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.
PRIVADO_API_TOKEN is fetched from CI/CD variables, which should be set in the previous step.
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
Add Dependencies: The script begins by adding curl using apk add --no-cache curl.
Login to Docker Registry: It then logs into the Docker registry using credentials fetched securely via a curl request.
Prepare Environment Variables: Environment variables starting with PRIVADO_ are filtered and saved into a .privado.env file.
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.
โ