Skip to content

Update Veracode-Expert.yml #5

Update Veracode-Expert.yml

Update Veracode-Expert.yml #5

Workflow file for this run

name: Veracode_SB
on:
push:
jobs:
Package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Empacotamento dos arquivos
uses: thedoctor0/zip-release@master
with:
filename: 'veracode.zip'
path: .
- name: Publicando Artefato
uses: actions/upload-artifact@v2
with:
name: pacoteVeracode
path: veracode.zip
Veracode_SCA:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Veracode SCA
env:
SRCCLR_API_TOKEN: ${{ secrets.SCA }} # Lembrar de criar as credenciais no Secrets
run: |
curl -sSL 'https://download.sourceclear.com/ci.sh' | bash -s – scan --update-advisor --pull-request --allow-dirty
Veracode_UploadAndScan:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/DEV' || github.ref == 'refs/heads/HMG' || github.ref == 'refs/heads/Main' }}
needs: Package
steps:
- name: Download Artefato
uses: actions/download-artifact@v2
with:
name: pacoteVeracode
- uses: veracode/veracode-uploadandscan-action@master # Faz a analise da Veracode
if: ${{ github.ref == 'refs/heads/DEV' || github.ref == 'refs/heads/HMG' }}
env:
VeracodeID: ${{ secrets.VeracodeID }} # Lembrar de criar as credenciais no Secrets
VeracodeKey: ${{ secrets.VeracodeKey }}
AppName: Github Actions - ${{ github.repository }}
with:
vid: '$VeracodeID'
vkey: '$VeracodeKey'
criticality: 'VeryHigh'
appname: '$AppName'
createsandbox: true
sandboxname: ${GITHUB_REF#refs/heads/}
filepath: 'veracode.zip'
deleteIncompleteScan: false
scanallnonfataltoplevelmodules: true
includenewmodules: true
version: ${{ github.run_id }}
- uses: veracode/veracode-uploadandscan-action@master # Faz a analise da Veracode
if: ${{ github.ref == 'refs/heads/Main' }}
env:
VeracodeID: ${{ secrets.VeracodeID }} # Lembrar de criar as credenciais no Secrets
VeracodeKey: ${{ secrets.VeracodeKey }}
AppName: Github Actions - ${{ github.repository }}
with:
vid: '$VeracodeID'
vkey: '$VeracodeKey'
criticality: 'VeryHigh'
appname: '$AppName'
filepath: 'veracode.zip'
deleteIncompleteScan: false
version: ${{ github.run_id }}
Veracode_PipelineScan:
runs-on: ubuntu-latest
needs: Package
steps:
- name: Download Artefato
uses: actions/download-artifact@v2
with:
name: pacoteVeracode
- name: Veracode Pipeline Scan
continue-on-error: true
env:
VID: ${{ secrets.VeracodeID }} # Lembrar de criar as credenciais no Secrets
VKEY: ${{ secrets.VeracodeKey }}
CaminhoArquivo: './veracode.zip'
run: |
curl -sSO https://downloads.veracode.com/securityscan/pipeline-scan-LATEST.zip
unzip pipeline-scan-LATEST.zip
java -jar pipeline-scan.jar -vid $VID -vkey $VKEY -f $CaminhoArquivo --issue_details true
- name: Converte para o formato SARIF
id: convert
uses: Veracode/veracode-pipeline-scan-results-to-sarif@v1.0.5
with:
pipeline-results-json: results.json
output-results-sarif: veracode-results.sarif
finding-rule-level: "3:1:0"
- name: Publica os resultados
uses: github/codeql-action/upload-sarif@v2
with: # Path to SARIF file relative to the root of the repository
sarif_file: veracode-results.sarif