-
Notifications
You must be signed in to change notification settings - Fork 18
51 lines (49 loc) · 1.28 KB
/
findsecbugs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "FindSecBugs"
on:
push:
branches:
- main
- rh/action-test
# run on new pushes only for non-draft PRs
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch:
jobs:
build-and-scan:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build -x check --parallel -Pversion=0.0.0
- name: Run FindSecBugs
uses: advanced-security/spotbugs-findsecbugs-action@v1
with:
spotbugs_target: 'codyze-cli/'
java_distribution: 'temurin'
java_version: '17'
path_prefix: 'codyze-cli/src/main/kotlin'
# optional: also upload scan results as an artifact
- name: Results as Artifact
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: spotbugs.sarif
path: '/home/runner/work/spotbugs_working+/spotbugs.sarif'