Skip to content

Commit

Permalink
🏷️ add vulnerabilities badge
Browse files Browse the repository at this point in the history
  • Loading branch information
MaaniBeigy committed Sep 23, 2023
1 parent bfb1557 commit 0d43c33
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .logs/coverage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ pycvcqv/userthread.py 14 0 0 0 100%
TOTAL 160 0 28 0 100%

Required test coverage of 50.0% reached. Total coverage: 100.00%
======================== 24 passed, 2 warnings in 2.50s ========================
======================== 24 passed, 2 warnings in 2.20s ========================
59 changes: 30 additions & 29 deletions .logs/safety.txt
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
+==============================================================================+

/$$$$$$ /$$
/$$__ $$ | $$
/$$$$$$$ /$$$$$$ | $$ \__//$$$$$$ /$$$$$$ /$$ /$$
/$$_____/ |____ $$| $$$$ /$$__ $$|_ $$_/ | $$ | $$
| $$$$$$ /$$$$$$$| $$_/ | $$$$$$$$ | $$ | $$ | $$
\____ $$ /$$__ $$| $$ | $$_____/ | $$ /$$| $$ | $$
/$$$$$$$/| $$$$$$$| $$ | $$$$$$$ | $$$$/| $$$$$$$
|_______/ \_______/|__/ \_______/ \___/ \____ $$
/$$ | $$
| $$$$$$/
by pyup.io \______/
/$$$$$$ /$$
/$$__ $$ | $$
/$$$$$$$ /$$$$$$ | $$ \__//$$$$$$ /$$$$$$ /$$ /$$
/$$_____/ |____ $$| $$$$ /$$__ $$|_ $$_/ | $$ | $$
| $$$$$$ /$$$$$$$| $$_/ | $$$$$$$$ | $$ | $$ | $$
\____ $$ /$$__ $$| $$ | $$_____/ | $$ /$$| $$ | $$
/$$$$$$$/| $$$$$$$| $$ | $$$$$$$ | $$$$/| $$$$$$$
|_______/ \_______/|__/ \_______/ \___/ \____ $$
/$$ | $$
| $$$$$$/
by pyup.io \______/

+==============================================================================+

REPORT
REPORT

 Safety is using PyUp's free open-source vulnerability database. This
data is 30 days old and limited. 
 For real-time enhanced vulnerability data, fix recommendations, severity
Safety is using PyUp's free open-source vulnerability database. This
data is 30 days old and limited.
For real-time enhanced vulnerability data, fix recommendations, severity
reporting, cybersecurity support, team and project policy management and more
sign up at https://pyup.io or email sales@pyup.io
sign up at https://pyup.io or email sales@pyup.io

Safety v2.3.5 is scanning for Vulnerabilities...
 Scanning dependencies in your environment:
Safety v2.3.5 is scanning for Vulnerabilities...
Scanning dependencies in your environment:

-> /home/maanib/.cache/pypoetry/virtualenvs/pycvcqv-1nCALKhD-
py3.9/lib/python3.9/site-packages

Using non-commercial database
 Found and scanned 84 packages
Timestamp 2023-09-22 16:56:02
 0 vulnerabilities found
 0 vulnerabilities ignored
Using non-commercial database
Found and scanned 84 packages
Timestamp 2023-09-23 23:39:48
0 vulnerabilities found
0 vulnerabilities ignored

+==============================================================================+

No known security vulnerabilities found.
No known security vulnerabilities found.

+==============================================================================+

 Safety is using PyUp's free open-source vulnerability database. This
data is 30 days old and limited. 
 For real-time enhanced vulnerability data, fix recommendations, severity
Safety is using PyUp's free open-source vulnerability database. This
data is 30 days old and limited.
For real-time enhanced vulnerability data, fix recommendations, severity
reporting, cybersecurity support, team and project policy management and more
sign up at https://pyup.io or email sales@pyup.io
sign up at https://pyup.io or email sales@pyup.io

+==============================================================================+
+==============================================================================+
1 change: 1 addition & 0 deletions .shell/badges.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
echo start
sh .shell/pylint.sh
sh .shell/mypy.sh
sh .shell/safety.sh
sh .shell/complexity.sh
sh .shell/maintainability.sh
sh .shell/cov.sh
Expand Down
11 changes: 6 additions & 5 deletions .shell/safety.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash
find . -name 'safety.txt' -delete
find . -name 'vulnerabilities.svg' -delete
poetry run safety check > .logs/safety.txt
export vulnerabilities=$(grep 'vulnerabilities' .logs/safety.txt | cut -d\ -f2)
vulnerabilities=${vulnerabilities/"No"/"0"}
echo "vulnerabilities:" $vulnerabilities
poetry run safety check --output text > .logs/safety.txt
poetry run safety check --output json > .logs/safety.json
vulnerabilities_found=$(jq -r '.report_meta.vulnerabilities_found' .logs/safety.json)
export VULNERABILITIES_FOUND=$vulnerabilities_found
echo "vulnerabilities:" $VULNERABILITIES_FOUND
rm -rf assets/images/vulnerabilities.svg
poetry run python3 -m pybadges --left-text="vulnerabilities" --right-text=${vulnerabilities} --left-color="#40aef9" --right-color="#0c2739" --logo=assets/images/safety.png --embed-logo >>assets/images/vulnerabilities.svg
poetry run python3 -m pybadges --left-text="vulnerabilities" --right-text=${VULNERABILITIES_FOUND} --left-color="#40aef9" --right-color="#0c2739" --logo=assets/images/safety.png --embed-logo >>assets/images/vulnerabilities.svg
1 change: 1 addition & 0 deletions assets/images/vulnerabilities.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0d43c33

Please sign in to comment.