forked from ShiftLeftSecurity/HelloShiftLeft
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
# This workflow integrates ShiftLeft NG SAST with GitHub | ||
# Visit https://docs.shiftleft.io for help | ||
name: ShiftLeft | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
NextGen-Static-Analyis: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# We are building this application with Java 11 | ||
- name: Setup Java JDK | ||
uses: actions/[email protected] | ||
with: | ||
java-version: 11.0.x | ||
- name: Build and package with Maven | ||
run: mvn clean package -DskipTests | ||
- name: Download ShiftLeft CLI | ||
run: | | ||
curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl | ||
# ShiftLeft requires Java 1.8. Post the package step override the version | ||
- name: Setup Java JDK | ||
uses: actions/[email protected] | ||
with: | ||
java-version: 1.8 | ||
- name: NextGen Static Analysis | ||
run: ${GITHUB_WORKSPACE}/sl analyze --app HelloShiftLeft-test --vcs-prefix-correction "*=/src/main/java" --java ./target/HelloShiftLeft-1.0.0.jar | ||
env: | ||
SHIFTLEFT_ACCESS_TOKEN: ${{ secrets.SHIFTLEFT_ACCESS_TOKEN }} | ||
|