add veracode workflow

This commit is contained in:
anaarmas
2021-11-19 16:42:04 +01:00
parent a85155b04a
commit 1a37cd5345
3 changed files with 74 additions and 0 deletions
@@ -0,0 +1,7 @@
{
"name": "Veracode Static Analysis",
"creator": "Veracode",
"description": "Get fast feedback on flaws with Veracode Static Analysis and the pipeline scan. Break the build based on flaw severity and CWE category.",
"iconName": "veracode",
"categories": ["Code Scanning", "javascript", "python", "java", "php", "c#", "c", "c++", "ruby", "swift", "go", "kotlin", "scala", "groovy", "tsql", "plsql", "perl", "cobol"]
}
+66
View File
@@ -0,0 +1,66 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will initiate a Veracode Static Analysis Pipeline scan, return a results.json and convert to SARIF for upload as a code scanning alert
name: Veracode Static Analysis Pipeline Scan
on:
push:
branches: [ $default-branch, $protected-branches ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ $default-branch ]
schedule:
- cron: $cron-weekly
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a job to build and submit pipeline scan, you will need to customize the build process accordingly and make sure the artifact you build is used as the file input to the pipeline scan file parameter
build-and-pipeline-scan:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it and copies all sources into ZIP file for submitting for analysis. Replace this section with your applications build steps
- uses: actions/checkout@v2
with:
repository: ''
- uses: vimtor/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310
with:
files: /
recursive: true
dest: veracode-pipeline-scan-results-to-sarif.zip
- uses: actions/upload-artifact@v1
with:
name: my-artifact
path: veracode-pipeline-scan-results-to-sarif.zip
# download the Veracode Static Analysis Pipeline scan jar
- uses: wei/curl@012398a392d02480afa2720780031f8621d5f94c
with:
args: -O https://downloads.veracode.com/securityscan/pipeline-scan-LATEST.zip
- run: unzip -o pipeline-scan-LATEST.zip
- uses: actions/setup-java@v1
with:
java-version: 1.8
- run: java -jar pipeline-scan.jar --veracode_api_id "${{secrets.VERACODE_API_ID}}" --veracode_api_key "${{secrets.VERACODE_API_KEY}}" --fail_on_severity="Very High, High" --file veracode-pipeline-scan-results-to-sarif.zip
continue-on-error: true
- uses: actions/upload-artifact@v1
with:
name: ScanResults
path: results.json
- name: Convert pipeline scan output to SARIF format
id: convert
uses: veracode/veracode-pipeline-scan-results-to-sarif@ff08ae5b45d5384cb4679932f184c013d34da9be
with:
pipeline-results-json: results.json
- uses: github/codeql-action/upload-sarif@v1
with:
# Path to SARIF file relative to the root of the repository
sarif_file: veracode-results.sarif
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620.16 469.63"><defs><style>.cls-1{fill:#00b2e5;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M470.88,235.88c0,128.94-105.7,233.75-235.42,233.75S0,364.3,0,234.79,105.66,0,235.46,0C367.42,0,470.88,103.68,470.88,235.88Zm-95.64.69c0-56.47-38-146.09-139.78-146.09-96.44,0-139.8,84.38-139.8,144.31S139,379.11,235.46,379.11,375.24,295.74,375.24,236.57Zm244.92,225.2V7.91h-167V98.49h71.42V461.77Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 526 B