Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/find-vulnerabilities.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Find dependencies vulnerabilities

on:
workflow_dispatch:
schedule:
# Run weekly
- cron: '0 0 * * 0'
Comment on lines +5 to +7

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I didn't add on push since we are running on pull requests. But I can add it and it should be good since its a quick test.
  • schedule will catch new advisories that we collect in between commits.

@ziadhany Let me know what your thoughts are :>

pull_request:
paths:
- 'setup.cfg'
- 'requirements*.txt'
- 'pyproject.toml'
- '.github/workflows/find-vulnerabilities.yml'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to run the pipeline if we edit this pipeline?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ziadhany I added it to make it run on my fork and this PR initially. However I think we should keep it since we would want to run it again if we change this workflow anytime in future. That is why it is here. What are your thoughts?


jobs:
scan-dependencies:
runs-on: ubuntu-24.04
permissions:
contents: read

name: Inspect packages with ScanCode.io
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: scancode-inputs
sparse-checkout: |
pyproject.toml
setup.cfg
requirements.txt
sparse-checkout-cone-mode: false
persist-credentials: false # do not keep the token around

- name: Fail on known vulnerabilities
uses: aboutcode-org/scancode-action@76777db8400d719de67ba3e465c5881037b45cb9 # v0.1
with:
pipelines: "inspect_packages:StaticResolver,find_vulnerabilities"
check-compliance: true
compliance-fail-on-vulnerabilities: true
env:
VULNERABLECODE_URL: https://public.vulnerablecode.io/