File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow integrates ShiftLeft NG SAST with GitHub
2+ # Visit https://docs.shiftleft.io for help
3+ name : ShiftLeft
4+
5+ on :
6+ pull_request :
7+ workflow_dispatch :
8+ push :
9+ # We recommend triggering a scan when merging to your default branch
10+ # as a best practice, especially if you'd like to compare the results
11+ # of two scans (e.g., a feature branch against the default branch)
12+ branches :
13+ - main
14+ - master
15+ jobs :
16+ ngsast-build :
17+ runs-on : ubuntu-20.04
18+ steps :
19+ - uses : actions/checkout@v2
20+
21+ - name : Download the ShiftLeft CLI and set permissions
22+ run : |
23+ curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl
24+
25+ # ShiftLeft requires Java 1.8
26+ - name : Set up Java
27+ 28+ with :
29+ java-version : 1.8
30+
31+ - name : Package with Maven
32+ run : mvn clean package
33+
34+ - name : NextGen Static Analysis
35+ run : ${GITHUB_WORKSPACE}/sl analyze --app ShiftLeftJava --tag branch=${{ github.head_ref || steps.extract_branch.outputs.branch }} --vcs-prefix-correction "io/shiftleft=src/main/java/" --java $(pwd)/target/yourJarFileName.jar
36+
37+ env :
38+ SHIFTLEFT_ACCESS_TOKEN : ${{ secrets.SHIFTLEFT_ACCESS_TOKEN }}
You can’t perform that action at this time.
0 commit comments