name: "Xanitizer Security Analysis"
on:
  push:
  workflow_dispatch:
jobs:
  xanitizer-security-analysis:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up JDK 11
        uses: actions/setup-java@v1
        with:
          java-version: 11
      - name: Compile Java code
        run: mvn -B compile
      - name: Install JavaScript libraries
        run: npm install
      - name: Xanitizer Security Analysis
        uses: RIGS-IT/xanitizer-action@v1
        with:
          license: ${{ secrets.XANITIZER_LICENSE }}
      - uses: actions/upload-artifact@v2
        with:
          name: Xanitizer-Reports
          path: |
            *-Findings-List.pdf
            *-Findings-List.sarif
      - uses: github/codeql-action/upload-sarif@v1
        with:
          sarif_file: Xanitizer-Findings-List.sarif
