Skip to content

Scanner-snyk-python

Scanner-snyk-python #1

name: Scanner-snyk-python
permissions:
contents: read
on:
schedule:
- cron: '0 3 * * 0' # GMT time, 3:00 GMT == 11:00 China Every Sunday
# push:
# branches: [ "main" ]
# pull_request:
# branchs: [ main ]
workflow_dispatch:
inputs:
snyk_apitoken:
description: 'Snyk token'
required: false
type: string
default: 'monitor'
snyk_org:
description: 'Enter synk org: (eg- iags_mlp)'
required: true
type: string
default: 'iags_mlp'
jobs:
snyk-python:
runs-on: [self-hosted, SDL]
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3
- name: set env
run: |
echo "SNYK_APITOKEN=${{inputs.snyk_apitoken}}"
echo "SNYK_ORG=${{inputs.snyk_org}}"
- name: "pip install bigdl-chronos"
run: |
source activate snykchronos
pip install --pre --no-cache-dir bigdl-chronos-spark3[all]
pip freeze > requirements.txt
- name: "snyk python"
run: |
source activate snykchronos
snyk monitor --file=./requirements.txt --command=python3 --org=iags_mlp --package-manager=pip --project-name=bigdl-chronos