-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.23 KB
/
shiftleft.yml
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
35
36
37
38
39
40
41
# This workflow integrates Qwiet preZero with GitHub
# Visit https://docs.shiftleft.io for help
name: Qwiet
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:
ngsast-build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Build
run: |
go build ./...
- name: Download the Qwiet CLI and set permissions
run: |
curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl
# Qwiet requires Java 1.8
- name: Set up Java
uses: actions/[email protected]
with:
java-version: 1.8
- name: Analyze application with Qwiet
run: ${GITHUB_WORKSPACE}/sl analyze --app ShiftLeftGo --tag branch=${{ github.head_ref || steps.extract_branch.outputs.branch }} --go $(pwd)
env:
SHIFTLEFT_ACCESS_TOKEN: ${{ secrets.SHIFTLEFT_ACCESS_TOKEN }}