Skip to content
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

python: move safety check to separate tox env #6451

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

XN137
Copy link
Contributor

@XN137 XN137 commented Mar 31, 2023

by not installing safety alongside the other dependencies, we are not constrained by safety's overly restrictive dependency version ranges (see inline comment)

this unblocks renovate to upgrade other linting dependencies

@@ -43,12 +43,19 @@ commands =
# flake8 includes black check due to flake8-black
# flake8 includes isort check which checks for import order due to flake8-isort
flake8 pynessie tests tools
# ignore https://pyup.io/v/51457/f17 -> https://github.com/pytest-dev/py/issues/287
Copy link
Contributor Author

Choose a reason for hiding this comment

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

no longer needed since https://github.com/pytest-dev/pytest/releases/tag/7.2.0
because pytest no longer depends on py

by not installing safety alongside the other dependencies,
we are not constrained by safety's overly restrictive dependency
version ranges (see inline comment)

this unblocks renovate to upgrade other linting dependencies
@XN137 XN137 force-pushed the separate-safety branch from 6d82054 to 89c3682 Compare March 31, 2023 07:48
commands =
# using separate env because of https://github.com/pyupio/safety/issues/455
# note that requirements_lint.txt imports all other requirement files
safety check --file requirements_lint.txt
Copy link
Contributor Author

Choose a reason for hiding this comment

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

from CI run:

     Safety v2.3.5 is scanning for Vulnerabilities...
    Scanning dependencies in your files:
  
    -> requirements_lint.txt
  
    Using non-commercial database
    Found and scanned 39 packages
    Timestamp 2023-03-31 07:50:58
    0 vulnerabilities found
    0 vulnerabilities ignored
  +==============================================================================+
  
   No known security vulnerabilities found. 

this might exclude scanning of transitive dependencies, but i guess its still better than flat out removing safety until they manage to release their new version (that blocks our other upgrade PRs)

@XN137 XN137 marked this pull request as ready for review March 31, 2023 07:54
@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (9a4479a) 83.16% compared to head (89c3682) 83.16%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #6451   +/-   ##
=========================================
  Coverage     83.16%   83.16%           
  Complexity      537      537           
=========================================
  Files           911      911           
  Lines         36029    36029           
  Branches       3210     3210           
=========================================
  Hits          29965    29965           
  Misses         4936     4936           
  Partials       1128     1128           
Flag Coverage Δ
java 83.13% <ø> (ø)
javascript 82.91% <ø> (ø)
python 83.96% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@snazy snazy left a comment

Choose a reason for hiding this comment

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

Ship it 🎉

@XN137 XN137 merged commit 21f910f into projectnessie:main Mar 31, 2023
@XN137 XN137 deleted the separate-safety branch March 31, 2023 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants