Skip to content

Commit 0828651

Browse files
Enhancement: Pin Scan Actions versions, add permissions, and upgrade Core Actions to latest
1 parent e52f8a2 commit 0828651

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ on:
1919
jobs:
2020
build-and-test:
2121
runs-on: ubuntu-latest
22+
timeout-minutes: 30
2223

2324
steps:
2425
- name: Checkout code
25-
uses: actions/checkout@v5
26+
uses: actions/checkout@v6
2627
with:
2728
fetch-depth: 0
2829

.github/workflows/scan-cve.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
concurrency:
1212
group: cve-scan-${{ github.ref }}
1313
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
security-events: write
18+
1419

1520
jobs:
1621
depchecktest:
@@ -28,10 +33,10 @@ jobs:
2833
run: mvn -B clean package -DskipTests
2934
working-directory: .
3035
- name: Depcheck
31-
uses: dependency-check/Dependency-Check_Action@main
36+
uses: dependency-check/Dependency-Check_Action@1.1.0
3237
id: Depcheck
33-
env:
34-
JAVA_HOME: /opt/jdk
38+
# Environment variables are inferred by the action or setup-java
39+
3540
with:
3641
project: ${{github.repository}}
3742
path: '.'

.github/workflows/scan-license.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ env:
4949
"
5050
REPORT_PATH: "target/generated-resources/licenses.xml"
5151

52+
permissions:
53+
contents: read
54+
55+
5256
jobs:
5357
scan:
5458
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)