Skip to content

Snyk Monitor

Snyk Monitor #53

Workflow file for this run

name: Snyk Monitor
on:
workflow_dispatch:
push:
tags:
- "v*"
branches:
- main
schedule:
- cron: "30 5 * * 1,3,5"
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
PYTHON_VERSION: "3.10"
jobs:
snyk_scan_monitor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: snyk/actions/setup@master
- name: Extract github branch/tag name
shell: bash
run: echo "ref=$(echo ${GITHUB_REF##*/})" >> $GITHUB_OUTPUT
id: extract_ref
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Monitor python dependencies
env:
SNYK_TOKEN: "${{ secrets.SNYK_TOKEN }}"
run: |
PYTHON=python${{ env.PYTHON_VERSION }}
$PYTHON -m pip install .
$PYTHON -m pip freeze > requirements.txt
snyk monitor \
-d \
--file=requirements.txt \
--command=$PYTHON \
--skip-unresolved \
--remote-repo-url=cloud-discovery-py/${{ steps.extract_ref.outputs.ref }} \
--org=haic \
--project-name=HAIC/cloud-discovery-py/${{ steps.extract_ref.outputs.ref }}/requirements.txt