-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (32 loc) · 1.16 KB
/
Copy pathShiftLeft.yml
File metadata and controls
34 lines (32 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This workflow integrates ShiftLeft NG SAST with GitHub
# Visit https://docs.shiftleft.io for help
name: ShiftLeft
on:
pull_request:
workflow_dispatch:
push:
# We recommend triggering a scan when merging to your default branch as a best practice,
# especially if you'd like to compare the results of two scans (e.g., a feature branch against the
# default branch)
branches:
- main
- master
jobs:
"NG-SAST-Build":
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Download ShiftLeft CLI
run: |
Invoke-WebRequest -Uri 'https://cdn.shiftleft.io/download/sl-latest-windows-x64.zip' -OutFile sl.zip
Expand-Archive -Path sl.zip -DestinationPath .
- name: Build VulnerableApplications
run: dotnet build VulnerableApplications.sln
- name: Analyze with NG SAST
run: .\sl analyze --app VulnerableApplications --tag branch=$Env:GITHUB_REF --csharp --dotnet-core --cpg VulnerableApplications.sln
env:
SHIFTLEFT_ACCESS_TOKEN: ${{ secrets.SHIFTLEFT_ACCESS_TOKEN }}