
ASinha596225 (Community Member) asked a question.
I am getting the following error while running veracode.yml file on my ASP.NET C# project
Run veracode/veracode-pipeline-scan-results-to-sarif@master
Error: ENOENT: no such file or directory, open 'results.json'
File paths in GitHub repository
sln file -> test/Project/
aspx/cs/bin/app_code/app_data/scripts/xml/bin -> test/Project/Project_sub/
Here's my code :-
name: Veracode
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '11 0 * * 0'
jobs:
build-and-pipeline-scan:
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
steps:
- uses: actions/checkout@v3
- run: zip -r veracode-scan-target.zip ./
- run: curl --silent --show-error --fail -O https://downloads.veracode.com/securityscan/pipeline-scan-LATEST.zip
- run: unzip -o pipeline-scan-LATEST.zip
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
- 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-scan-target.zip
continue-on-error: true
- name: Convert pipeline scan output to SARIF format
id: convert
uses: veracode/veracode-pipeline-scan-results-to-sarif@master
with:
pipeline-results-json: results.json
- uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: veracode-results.sarif
.png)
I found the solution here -> https://community.atlassian.com/t5/Bitbucket-questions/Pipeline-fails-with-No-such-file-or-directory/qaq-p/1069160
- run: zip -r veracode-scan-target.zip ./
./ points to the root folder.
Since my sln file was in not in the root folder, I specified the folder name here instead of ./ and my Veracode.yml worked successfully.