Azure DevOps Extension for Sec1 Security

Introduction

Integrating the Sec1 Security plugin as Azure DevOps Extension allows developers and teams to enhance the security of their software projects by scanning Source Code Management (SCM) repositories for open-source vulnerabilities against the Sec1 Security Database. This documentation provides a step-by-step guide on integrating the Sec1 Security Extension into your Azure CI/CD pipelines.

Prerequisite

Integration Steps

1. Install the Sec1 Security Plugin

  • Go to Azure DevOps Marketplace (https://marketplace.visualstudio.com).

  • Search for "Sec1 Security" and click on the search result to visit the plugin page.

  • Click on "Get it free", select the "Azure DevOps organization" where you would like to install and click "Install".

  • Once installation is complete then "Proceed to organisation"

2. Configure API Token

You need to configure API Token as Generic Service Connection

  • Go to your "Project" > "Project Settings"

  • Click "Service Connections" under Pipelines section

  • Click "New service connection"

  • Search for "Generic" and click "Next"

  • Enter below configuration

    • Server URL - Default value of Server URL will be https://api.sec1.io. If you are using SaaS service then leave it blank otherwise provide the appropriate value

    • Username is optional as Sec1 Security uses API Token for authentication purpose.

    • Password/Token Key - Provide SecAPI Security API Token.

    • Service connection name - Provide appropriate service connection name (e.g. Sec1SecurityServiceConnection).

    • Description - It is option field but you can provide appropriate description.

    Note : To get SecAPI Security API Token navigate to Scopy > "Login with GitHub" > "Settings" In the "API key" section, click on "Generate API key" and copy it for use.

📷 Show Preview

3. Configure Sec1 Security Extension as a Build Step

  • Navigate to "Pipelines" section in your project.

  • Click on "Edit".

  • Search "Sec1 Security" in the tasks search box and select the result.

  • Select Service Connection which you have added as Generic Service Connection in dropdown.

  • Enter location of package (pom.xml or package.json) file (if it is present under nested folder otherwise leave it blank). In case of blank, it will locate the file in current folder of repo.

  • Click "Add"

📷 Show Preview

You can also copy below code snippet to directly copy in pipeline yaml file.

- task: Sec1Security@0
  inputs:
    serviceConnection: '<<Enter Service Connection Name e.g. Sec1ServiceConnection>>'
    thresholdCheck: true
    critical: '2'
    high: '5'
    medium: '10'
    low: '20'

4. Configuration Parameters

Configure the following parameters in the "Sec1 Security Settings" while adding extention to build step:

  • Enable the Threshold Check (optional) If selected, define your vulnerability threshold levels by "Severity". Default values for Critical and High are 0 and 10 respectively

    • If you set the critical vulnerability threshold to 10, your build will fail if more than 10 critical vulnerabilities are found in the scan.

    • Choose actions for the breach: Fail or Continue.

Troubleshooting

To see more information on your steps:

  • View the "Console Output" for a specific build.


-- Sec1 Security team

Last updated