Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[synopsys-blackduck] unable to read the JSON file and results of sarif file #82

Open
zameer712 opened this issue Jan 8, 2025 · 0 comments

Comments

@zameer712
Copy link

zameer712 commented Jan 8, 2025

blackduck-scan:
name: Blackduck Scan
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v4

  - name: Cache Maven Dependencies
    uses: actions/cache@v3
    with:
      path: ~/.m2/repository
      key: maven-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
      restore-keys: |
        maven-${{ runner.os }}-

  - name: Setup JDK 21
    uses: actions/setup-java@v4
    with:
      distribution: 'graalvm'
      java-version: '21'

  - name: Verify Environment
    run: |
      java -version
      mvn -version

  - name: Build Project
    run: |
      mvn verify --no-transfer-progress -s ${{ github.workspace }}/settings.xml

  - name: Run Synopsys Detect
    uses: synopsys-sig/[email protected]
    with:
      scan-mode: INTELLIGENT
      github-token: ${{ secrets.GITHUB_TOKEN }}
      detect-version: 7.9.0
      blackduck-url: ${{ secrets.BLACKDUCK_URL }}
      blackduck-api-token: ${{ secrets.BLACKDUCK_API_TOKEN }}

  - name: Print Blackduck Scan Results
    if: failure()
    run: |
      echo "Blackduck scan encountered issues. Review logs below:"
      cat detect.log || echo "No detect.log file found."
      echo "If diagnostic mode was enabled, attach the diagnostic zip file for support."

  - name: Validate Scan Results
    if: success()
    run: |
      echo "Blackduck scan completed successfully"
      ls -la ${{ github.workspace }}
      echo "-----------"
      cat ${{ github.workspace }}/blackduckFindings.sarif.json

This is the workflow file we are using please help us with the fix

Below is the error we are getting on this workflow

2025-01-08 10:05:16 UTC INFO [main] --- Signature scan / Snippet scan on /home/runner/work/bep-devops-api/bep-devops-api: SUCCESS
2025-01-08 10:05:16 UTC INFO [main] --- Overall Status: FAILURE_DETECTOR - Detect had one or more detector failures while extracting dependencies. Check that all projects build and your environment is configured correctly.
2025-01-08 10:05:16 UTC INFO [main] ---
2025-01-08 10:05:16 UTC INFO [main] --- If you need help troubleshooting this problem, generate a diagnostic zip file by adding '-d' to the command line, and provide it to Synopsys Technical Support. See 'Diagnostic Mode' in the Detect documentation for more information.
2025-01-08 10:05:16 UTC INFO [main] ---
2025-01-08 10:05:16 UTC INFO [main] --- ===============================
2025-01-08 10:05:16 UTC INFO [main] ---
2025-01-08 10:05:16 UTC INFO [main] --- Detect duration: 00h 00m 53s 537ms
2025-01-08 10:05:16 UTC ERROR [main] --- Exiting with code 5 - FAILURE_DETECTOR
Error: Detect failed with exit code: 5. Check the logs for more information.

cc: @blackduck-serv-builder @jcroall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant