Skip to content

.github/workflows/semgrem-check.yml #61

.github/workflows/semgrem-check.yml

.github/workflows/semgrem-check.yml #61

Workflow file for this run

on:
workflow_dispatch:
pull_request:
schedule:
- cron: "0 6 * * *"
jobs:
build-dependency-tree:
name: Build dependency trees
runs-on: ubuntu-latest
permissions:
contents: 'read'
actions: 'read'
checks: 'write'
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up JDK
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
distribution: zulu
java-version: 17
- name: Build dependency tree
run: ./mvnw dependency:tree -q -DoutputFile=maven_dep_tree.txt
- name: Upload dependency tree file
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: maven-dependency-tree
path: maven_dep_tree.txt
semgrep-check:
name: Run Semgrep scan
runs-on: ubuntu-latest
needs: build-dependency-tree
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
container:
image: semgrep/semgrep:1.146.0
permissions:
contents: 'read'
actions: 'read'
checks: 'write'
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Download Maven dependency tree artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: maven-dependency-tree
- name: Semgrep scan
run: |
semgrep ci --no-git-ignore