-
Notifications
You must be signed in to change notification settings - Fork 18
61 lines (58 loc) · 1.53 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
52
53
54
55
56
57
58
59
60
61
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:
runs-on: ubuntu-latest
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: Upload JARs
uses: actions/upload-artifact@v4
with:
name: jar-bundle
path: '**/*.jar'
scan:
needs: build
runs-on: ubuntu-latest
permissions:
security-events: write
strategy:
# We need to run it multiple times to manually fix the file paths and exclude gradle results
matrix:
module: [ 'codyze-cli/', 'codyze-core/', 'codyze-backends/cpg/' ]
steps:
- name: Download JARs
uses: actions/download-artifact@v4
with:
name: jar-bundle
path: '${{ matrix.module }}/'
- name: Run FindSecBugs for Codyze CLI
uses: advanced-security/spotbugs-findsecbugs-action@v1
with:
spotbugs_target: ${{ matrix.module }}
java_distribution: 'temurin'
java_version: '17'
path_prefix: '${{ matrix.os }}src/main/kotlin/'