Skip to content

Commit 9e46a26

Browse files
Update maven.yml
1 parent 3970c86 commit 9e46a26

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.github/workflows/maven.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ on:
1616

1717
jobs:
1818
build:
19-
2019
runs-on: ubuntu-latest
21-
2220
steps:
2321
- uses: actions/checkout@v4
2422
- name: Set up JDK 17
@@ -30,3 +28,27 @@ jobs:
3028
- name: Build with Maven
3129
run: mvn -B package --file pom.xml
3230

31+
semgrep:
32+
# User definable name of this GitHub Actions job.
33+
name: semgrep/ci
34+
# If you are self-hosting, change the following `runs-on` value:
35+
runs-on: ubuntu-latest
36+
container:
37+
# A Docker image with Semgrep installed. Do not change this.
38+
image: semgrep/semgrep
39+
steps:
40+
# Fetch project source with GitHub Actions Checkout. Use either v3 or v4.
41+
- uses: actions/checkout@v4
42+
# Run the "semgrep ci" command on the command line of the docker image.
43+
- run: semgrep ci --sarif > semgrep.sarif
44+
env:
45+
# Connect to Semgrep AppSec Platform through your SEMGREP_APP_TOKEN.
46+
# Generate a token from Semgrep AppSec Platform > Settings
47+
# and add it to your GitHub secrets.
48+
SEMGREP_APP_TOKEN: "4e4485e73a07808f2af8a5546e85fc29bed3d0ce4b21b8b6dd77ace1950bc3f8"
49+
50+
- name: Upload SARIF file for GitHub Advanced Security Dashboard
51+
uses: github/codeql-action/upload-sarif@v2
52+
with:
53+
sarif_file: semgrep.sarif
54+
if: always()

0 commit comments

Comments
 (0)