Skip to content

Commit b807cfd

Browse files
committed
Fail in case of vulnerabilities
Signed-off-by: tdruez <[email protected]>
1 parent 96178f8 commit b807cfd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/find-vulnerabilities.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ jobs:
1818
pipelines: "inspect_packages:StaticResolver,find_vulnerabilities"
1919
env:
2020
VULNERABLECODE_URL: https://public.vulnerablecode.io/
21+
22+
- name: Fail in case of vulnerabilities
23+
shell: bash
24+
run: |
25+
scanpipe shell --command \
26+
'from scanpipe.models import Project; project = Project.objects.get(name=${{ inputs.project-name }}); vulnerability_count = project.discoveredpackages.vulnerable().count() + project.discovereddependencies.vulnerable().count(); print(vulnerability_count, "vulnerabilities found"); exit(1) if vulnerability_count else exit(0);'

0 commit comments

Comments
 (0)