Skip to content

HawkScan Example

HawkScan Example #1

name: HawkScan Example
on:
workflow_dispatch:
jobs:
hawkscan:
name: HawkScan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
# - name: Download and run JavaSpringVulny release jar
# run: |
# curl -Ls https://github.com/kaakaww/javaspringvulny/releases/download/0.2.0/java-spring-vuly-0.2.0.jar -o ./java-spring-vuly-0.2.0.jar
# java -jar ./java-spring-vuly-0.2.0.jar &
- name: Build and run JavaSpringVulny (slower)
run: |
./gradlew build
./gradlew bootRun &
- name: Run HawkScan
id: run-hawkscan
uses: stackhawk/hawkscan-action@main
with:
apiKey: ${{ secrets.HAWK_API_KEY }}
env:
APP_ID: ${{ secrets.appId }}
NO_PROGRESS: true
SARIF_ARTIFACT: true
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
# Path to SARIF file relative to the root of the repository
sarif_file: stackhawk.sarif
# Optional category for the results
# Used to differentiate multiple results for one commit
category: StackHawk