Import Flaws into Azure DevOps

Ticketing Systems

You can add the Veracode Flaw Importer task to your Azure DevOps and Team Foundation Server (TFS) build pipelines. The task uses the Veracode Azure DevOps Extension to automatically import flaws from Veracode Static Analysis as work items.

Before You Begin

Before you can import flaws into Azure DevOps, you must meet these prerequisites:

  • Ensure these projects are in the same Azure DevOps organization or TFS team project collection:
    • The project to which the running release or build job belongs, where the Flaw Importer task is running
    • The project to which you want to import the flaws
  • You have installed the Veracode Azure DevOps Extension.
  • You have generated Veracode API credentials. If your credentials contain variables, you must start each variable with a $ and wrap the variable value in parentheses. For example, you enter the id variable as $(Id).
  • The Veracode Flaw Importer generates work items based on the Agile, Scrum, and CMMI process templates in Azure DevOps. You can customize the default fields in the process templates, such as changing the state names to match the names of your actual states and their transition values. When configuring the Flaw Importer you can specify the custom fields to add to work items when importing flaws. If you import flaws using custom process templates and you also want to add custom fields to generated work items, before specifying the custom fields ensure you have configured the required predefined variables in your build or release configurations.


This task uses the Veracode Azure DevOps Extension to automate the import of flaws from Veracode Static Analysis in your Software Development Life Cycle.

You can also Use YAML to Configure Azure DevOps Pipelines for Importing Flaws.


  1. In your Azure DevOps or TFS project, go to your build definition.

  2. Add Veracode Flaw Importer as a build task.

  3. Click the Import flaws task to open the Veracode Flaw Importer window.

  4. In the Flaw Importer window, from the Connection Details section, select a connection source for connecting to Veracode:

    • Service Connection: select an existing service connection that uses your Veracode API credentials or click New to create a new service connection. For a new connection, in the New service connection window, by default, the Server URL is populated with the URL for accessing Veracode. Enter your Veracode API credentials, a name for the service connection and, then, click Save. The new connection is selected in the Select Service Connection dropdown menu.
    • Credentials: enter your Veracode API credentials. If you use variables for your credentials, you must start each variable with a $ and wrap the variable value in parentheses. For example, for a variable named id, enter $(Id).
  5. In the Flaw Source section, enter the application name and sandbox name, if applicable, for which you want to import flaws from Veracode.

  6. In the Work Item Settings section, from the Import dropdown menu, select the flaw type to import as work items:

    • All Flaws: includes mitigated and remediated flaws from all scans. During the import process, the extension changes the state of the work items for all mitigated and remediated flaws to resolved or closed. This option imports all flaws without any restrictions.
    • All Unmitigated Flaws: includes flaws from all scans.
    • All Flaws Violating Policy: includes all open flaws from all scans that affect policy.
    • All Unmitigated Flaws Violating Policy: includes open flaws from all scans that affect policy. Selected by default.

    Note: The Flaw Importer task does not import vulnerabilities from Veracode Software Composition Analysis (SCA) scans as work items.

    When generating new work items for imported flaws, the extension also imports mitigation and annotation comments. If you add comments to a previously imported flaw with work items, the extension does not import the new comments to work items during subsequent flaw imports.

  7. From the Work Item Type dropdown menu, select the work item type to generate for all imported flaws.

    Note: The Scrum process template does not support the Issue work item type. Also, the Veracode Flaw Importer task can only import flaws to customized work item types that do not contain required fields. If your customized work item types contain required fields, you must select different work item types that do not contain required fields, or the flaws fail to import.

  8. In the Area Path field, enter the path to the area where you want to group the work items. You can enter up to five levels in the path. To enter the area paths, use the format <project name>\<area 1>\<area 2>. The value in <project name> is the name of the project in the Build Pipeline or Release Pipeline task for which you want to import flaws.

  9. Optionally, select the Overwrite Area Path in Work Items on Import checkbox to replace the area path in new and existing work items with the value in the Area Path field. If you clear this checkbox, existing work items retain their current area path.

  10. In the Add Custom Tag field, enter a custom tag name to add user-defined tags to all work items generated from current build.

  11. Select the Add CWE as a Tag checkbox to add a tag with the CWE number to all the work items that the current build generates.

  12. Select the Add Build ID as a Tag checkbox to add a tag to each work item showing the build number of the build that contains the imported flaw.

  13. Select the Add Scan Name as a Tag checkbox to add a tag to each work item showing the name of the scan that found the imported flaw.

  14. In the Flaw Import Limit section, enter the maximum number of flaws to import at one time. The default is 1000.

  15. In the Custom Fields field, if you are using custom process templates with custom fields, you can specify the custom fields to add to new, but not existing, work items. Enter key-value pairs to specify each field name and value. Add each key-value pair, separated with a colon, on a new line.

    To add Agile-based custom fields for story points, priority, work estimate, and test system information, add these values:

    Microsoft.VSTS.TCM.SystemInfo:My Test System

    Note: Ensure these field names match the field names defined in Azure and that all values are valid for a given field type. If there are any mismatch or validation errors, you can only see these errors in the console after importing flaws.

  16. In the Advanced Scan Settings section, configure these options:

    • Proxy Settings: if you use a proxy to access Veracode, enter the proxy settings. For example:

      -phost - pport 5252 -puser proxyuser -ppassword proxypassword

      Note: Do not enclose any of the values in single or double quotations.

    • Team Foundation Server Password: do not change this value from the default of $(password).

  17. Optionally, to add debugging to your pipeline, add a new variable and enter these values in the New variable window:

    • Name: system.debug
    • Value: true
  18. Click Save & queue to save your configurations and add the build to your queue.


After the flaw import task has completed successfully, the work items related to flaws in a given application appear in Azure DevOps or TFS. In Azure DevOps, you can search on the Work or Queries pages, for example, to find the work items you created.