Skip to content

Commit bca6814

Browse files
authored
Create mavenSemgrep.yml
1 parent 5969393 commit bca6814

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/mavenSemgrep.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Java CI with Maven
10+
11+
on:
12+
push:
13+
branches: [ "master" ]
14+
pull_request:
15+
branches: [ "master" ]
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Set up JDK 17
23+
uses: actions/setup-java@v4
24+
with:
25+
java-version: '17'
26+
distribution: 'temurin'
27+
cache: maven
28+
- name: Build with Maven
29+
run: mvn -B package --file pom.xml
30+
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+
# test comment

0 commit comments

Comments
 (0)