Repository navigation
[scancode-next] add "find_vulnerabilities" workflow #2508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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' | ||
| pull_request: | ||
| paths: | ||
| - 'setup.cfg' | ||
| - 'requirements*.txt' | ||
| - 'pyproject.toml' | ||
| - '.github/workflows/find-vulnerabilities.yml' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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/ | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this run on push, not on a schedule? like https://github.com/aboutcode-org/dejacode/blob/main/.github/workflows/find-vulnerabilities.yml#L6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushsince we are running on pull requests. But I can add it and it should be good since its a quick test.@ziadhany Let me know what your thoughts are :>