Coder Social home page Coder Social logo

veracode-pipeline-scan-results-to-sarif's Introduction

Veracode Pipeline scan results to SARIF - Github Action

Quality Gate Status

This action take the Veracode pipeline scan json result file as an input and transform it to a SARIF format.

Add the -jo true to your Pipeline Scan command to generate the JSON result file. See, details for the other pipeline scan attributes

If your github account allows code scanning, you can then upload the sarif file to show the scan findings

See - Veracode pipeline scan example in github action


Inputs

pipeline-results-json

Required The path to the pipeline json result file.

Default value "results.json"

output-results-sarif

Optional The path to the SARIF format result file.

Default value "veracode-results.sarif"

source-base-path-1 (can go from 1 to 3)

Optional In some compilations, the path representation is not the same as the repository root folder. In order to add the ability to navigate back from the scanning issue to the file in the repository, a base path to the source is required. The input format is regex base ("[search pattern]:[replace with pattern]").

Default value ""

finding-rule-level

Optional The conversion rule from Veracode finding levels to Github levels.

  • Veracode levels: 5 = Very High, 4 = High, 3 = Medium, 2 = Low, 1 = Very Low, 0 = informational.
  • GitHub levels: error, warning, note.

Example values:

  • "4:3:0" => High and Very high will show as error, Medium as warning and the rest as note
  • "3:2:1" => Medium and above will show as error, Low as warning, Very Low as note, and informational will not show at all

Note: Only error level will fail pull request check

Default value "4:3:0"

Example usage

- name: Convert pipeline scan output to SARIF format
  id: convert   
  uses: Lerer/[email protected]
  with:
    pipeline-results-json: results.json
    output-results-sarif: veracode-results.sarif
    source-base-path-1: "^com/veracode:src/main/java/com/veracode"
    source-base-path-2: "^WEB-INF:src/main/webapp/WEB-INF"
    finding-rule-level: "3:1:0"
      
- name: upload sarif file to repository
  uses: github/codeql-action/upload-sarif@v1
  with: # Path to SARIF file relative to the root of the repository
    sarif_file: veracode-results.sarif

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.