Skip to content

Commit

Permalink
Improve readability
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <tdruez@nexb.com>
  • Loading branch information
tdruez committed Feb 19, 2025
1 parent d1c6ce5 commit 9f26637
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/find-vulnerabilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,13 @@ jobs:
- name: Fail in case of vulnerabilities
shell: bash
run: |
scanpipe shell --command \
'from scanpipe.models import Project; project = Project.objects.get(); vulnerability_count = project.discoveredpackages.vulnerable().count() + project.discovereddependencies.vulnerable().count(); print(vulnerability_count, "vulnerabilities found"); exit(1) if vulnerability_count else exit(0);'
scanpipe shell --command '
from scanpipe.models import Project
project = Project.objects.get()
vulnerability_count = (
project.discoveredpackages.vulnerable().count() +
project.discovereddependencies.vulnerable().count()
)
print(vulnerability_count, "vulnerabilities found")
exit(1) if vulnerability_count else exit(0)
'
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ install_requires =
wheel==0.45.1
pip==25.0.1
# Django
Django==5.1.6
Django==4.2.8
asgiref==3.8.1
typing_extensions==4.12.2
sqlparse==0.5.3
Expand Down

0 comments on commit 9f26637

Please sign in to comment.