Skip to content

Sonatype Workflow Defaults #7

Sonatype Workflow Defaults

Sonatype Workflow Defaults #7

name: Sonatype Workflow Defaults
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Perform an evaluation
- name: Run evaluate action
id: evaluate
uses: sonatype/actions/evaluate@v1
with:
iq-server-url: ${{ vars.SONATYPE_IQ_URL }}
username: ${{ secrets.SONATYPE_IQ_USERNAME }}
password: ${{ secrets.SONATYPE_IQ_PASSWORD }}
application-id: sonatype-field-workshop-nodegoat
scan-targets: package-lock.json
sarif-file: 'result.sarif'
upload-sarif-file: 'true'
debug: false
# Print out the results
- name: Log evaluate action output
run: echo "${{ steps.evaluate.outputs.scan-id }} ${{ steps.evaluate.outputs.report-url }}"
- name: Dump evaluate outputs
run: echo "${{ steps.evaluate.outputs }}"
- name: Fetch SBOM
uses: sonatype/actions/fetch-sbom@v1
if: ( success() || failure() ) && steps.evaluate.outputs.scan-id
with:
iq-server-url: ${{ vars.SONATYPE_IQ_URL }}
username: ${{ secrets.SONATYPE_IQ_USERNAME }}
password: ${{ secrets.SONATYPE_IQ_PASSWORD }}
application-id: sonatype-field-workshop-nodegoat
scan-id: ${{ steps.evaluate.outputs.scan-id }}
sbom-standard: cyclonedx
sbom-version: 1.5
sbom-format: json
artifact-name: cylonedx-bom