Skip to content

update all module artifact uris #4

update all module artifact uris

update all module artifact uris #4

Workflow file for this run

name: "SpotBugs"
on:
push:
branches: [ adamve/spotbugs-reports-v3 ]
pull_request:
branches: [ adamve/spotbugs-reports-v3 ]
schedule:
- cron: '25 16 * * 0'
jobs:
spotbugs-analyze:
name: SpotBugs Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Build with Gradle
run: ./gradlew spotbugsRelease spotbugsMain
- name: Fix SARIF
run: |
cat <<< $(jq '.runs |= map( if .taxonomies == [null] then .taxonomies = [] else . end)' ./build/spotbugs/spotbugs-support.sarif) > ./build/spotbugs/spotbugs-support.sarif
cat <<< $(jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri |= "android/src/main/java/" + .' ./build/spotbugs/spotbugs-android.sarif) > ./build/spotbugs/spotbugs-android.sarif
cat <<< $(jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri |= "AndroidDemo/src/main/java/" + .' ./build/spotbugs/spotbugs-AndroidDemo.sarif) > ./build/spotbugs/spotbugs-AndroidDemo.sarif
cat <<< $(jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri |= "core/src/main/java/" + .' ./build/spotbugs/spotbugs-core.sarif) > ./build/spotbugs/spotbugs-core.sarif
cat <<< $(jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri |= "fido/src/main/java/" + .' ./build/spotbugs/spotbugs-fido.sarif) > ./build/spotbugs/spotbugs-fido.sarif
cat <<< $(jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri |= "management/src/main/java/" + .' ./build/spotbugs/spotbugs-management.sarif) > ./build/spotbugs/spotbugs-management.sarif
cat <<< $(jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri |= "oath/src/main/java/" + .' ./build/spotbugs/spotbugs-oath.sarif) > ./build/spotbugs/spotbugs-oath.sarif
cat <<< $(jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri |= "openpgp/src/main/java/" + .' ./build/spotbugs/spotbugs-openpgp.sarif) > ./build/spotbugs/spotbugs-openpgp.sarif
cat <<< $(jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri |= "piv/src/main/java/" + .' ./build/spotbugs/spotbugs-piv.sarif) > ./build/spotbugs/spotbugs-piv.sarif
cat <<< $(jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri |= "support/src/main/java/" + .' ./build/spotbugs/spotbugs-support.sarif) > ./build/spotbugs/spotbugs-support.sarif
cat <<< $(jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri |= "testing/src/main/java/" + .' ./build/spotbugs/spotbugs-testing.sarif) > ./build/spotbugs/spotbugs-testing.sarif
cat <<< $(jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri |= "yubiotp/src/main/java/" + .' ./build/spotbugs/spotbugs-yubiotp.sarif) > ./build/spotbugs/spotbugs-yubiotp.sarif
- name: upload SARIF
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: build/spotbugs/
category: spotbugs-analysis