-
Notifications
You must be signed in to change notification settings - Fork 690
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new workflow for code scanning (#940)
Added a new workflow for code scanning Signed-off-by: Yunchu Lee <[email protected]> Co-authored-by: Samet Akcay <[email protected]>
- Loading branch information
1 parent
78ab50e
commit 566e8cb
Showing
2 changed files
with
72 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,34 @@ | ||
name: Code Scanning | ||
|
||
on: | ||
workflow_dispatch: # run on request (no need for PR) | ||
schedule: | ||
# every UTC 6PM from Mon to Fri | ||
- cron: "0 18 * * 1-5" | ||
|
||
jobs: | ||
Snyk-scan: | ||
runs-on: [self-hosted, linux, x64] | ||
permissions: | ||
security-events: write | ||
steps: | ||
- name: CHECKOUT REPOSITORY | ||
uses: actions/checkout@v3 | ||
- name: Install Tox | ||
run: python -m pip install tox | ||
- name: SNYK SCANNING | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
SNYK_ENDPOINT: ${{ secrets.SNYK_ENDPOINT }} | ||
continue-on-error: true | ||
run: tox -e snyk-scan | ||
- name: UPLOAD TO SECURITY ADVISORIES | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: .tox/snyk.sarif | ||
- name: UPLOAD REPORT | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: .tox/snyk.html | ||
# Use always() to always run this step to publish scan results when there are test failures | ||
if: ${{ always() }} |
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