Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

add bandit, fix vulnerabilities & bump pre-commit-config #444

Merged
merged 6 commits into from
Oct 22, 2022

Conversation

vvssttkk
Copy link
Contributor

close #61
continue #424

@vvssttkk vvssttkk requested a review from a team October 19, 2022 12:36
@vvssttkk vvssttkk temporarily deployed to external October 19, 2022 12:36 Inactive
@aguschin
Copy link
Contributor

Thanks! Some failed tests are caused by this PR changes, some aren't. I'm going to resolve the second and ping you once it's ready. Not sure why the ERRORs though - looks like it's because of this PR changes, but tests "work on my computer" 🤔

@aguschin aguschin added the good first issue Good for newcomers label Oct 20, 2022
@vvssttkk vvssttkk temporarily deployed to external October 20, 2022 11:35 Inactive
@aguschin
Copy link
Contributor

@vvssttkk, fixed few failed tests I was talking about. Please investigate others. E.g. one of the frequent failures I reproduced in 3.7:

tmp %f $ python                                                                                                                                   181ms
Python 3.7.10 (default, Jun 25 2021, 16:52:37)
[Clang 12.0.5 (clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> hashlib.md5()
<md5 HASH object @ 0x109a1bdb0>
>>> hashlib.md5(userforsecurity=False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: openssl_md5() takes no keyword arguments
>>>

mlem/utils/templates.py Outdated Show resolved Hide resolved
@vvssttkk
Copy link
Contributor Author

@vvssttkk, fixed few failed tests I was talking about. Please investigate others. E.g. one of the frequent failures I reproduced in 3.7:

tmp %f $ python                                                                                                                                   181ms
Python 3.7.10 (default, Jun 25 2021, 16:52:37)
[Clang 12.0.5 (clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> hashlib.md5()
<md5 HASH object @ 0x109a1bdb0>
>>> hashlib.md5(userforsecurity=False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: openssl_md5() takes no keyword arguments
>>>

but usedforsecurity, not userforsecurity
for example

>>> import hashlib
>>> hashlib.md5()
<md5 _hashlib.HASH object @ 0x7fcc9a3e5670>
>>> hashlib.md5(usedforsecurity=False)
<md5 _hashlib.HASH object @ 0x7fcc9a3e5490>

@vvssttkk vvssttkk temporarily deployed to external October 21, 2022 11:16 Inactive
@codecov
Copy link

codecov bot commented Oct 21, 2022

Codecov Report

Base: 87.62% // Head: 86.83% // Decreases project coverage by -0.79% ⚠️

Coverage data is based on head (8ab0d04) compared to base (d60f3cf).
Patch coverage: 73.17% of modified lines in pull request are covered.

❗ Current head 8ab0d04 differs from pull request most recent head 1ff102e. Consider uploading reports for the commit 1ff102e to get more accurate results

Additional details and impacted files
@@                Coverage Diff                @@
##           release/0.3.0     #444      +/-   ##
=================================================
- Coverage          87.62%   86.83%   -0.80%     
=================================================
  Files                 94       94              
  Lines               7847     7732     -115     
=================================================
- Hits                6876     6714     -162     
- Misses               971     1018      +47     
Impacted Files Coverage Δ
mlem/api/__init__.py 100.00% <ø> (ø)
mlem/cli/apply.py 94.23% <ø> (ø)
mlem/cli/build.py 100.00% <ø> (ø)
mlem/cli/checkenv.py 100.00% <ø> (ø)
mlem/cli/clone.py 100.00% <ø> (ø)
mlem/cli/dev.py 50.00% <ø> (ø)
mlem/cli/import_object.py 100.00% <ø> (ø)
mlem/cli/init.py 100.00% <ø> (ø)
mlem/cli/link.py 100.00% <ø> (ø)
mlem/cli/serve.py 89.47% <ø> (ø)
... and 72 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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@aguschin
Copy link
Contributor

Nice! Looks like a black formatting fails, but everything else works!

@vvssttkk vvssttkk temporarily deployed to external October 21, 2022 17:41 Inactive
@vvssttkk vvssttkk temporarily deployed to external October 22, 2022 10:07 Inactive
@aguschin
Copy link
Contributor

Great! Thank you @vvssttkk! Merging this! 🚀

@aguschin aguschin merged commit 3930f76 into iterative:release/0.3.0 Oct 22, 2022
@aguschin aguschin added the hacktoberfest-accepted Merged PRs with external contributions label Oct 22, 2022
@mertbozkir
Copy link

Hello @vvssttkk, how can I get in touch with you? Can you reach me from any platform? We have something for you! 🤓

@vvssttkk
Copy link
Contributor Author

vvssttkk commented Nov 3, 2022

Hello @vvssttkk, how can I get in touch with you? Can you reach me from any platform? We have something for you! 🤓

@mertbozkir emailed you back yesterday

@aguschin aguschin mentioned this pull request Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers hacktoberfest-accepted Merged PRs with external contributions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants