datascience_course
datascience_course copied to clipboard
CVE-2007-4559 Patch
Patching CVE-2007-4559
Hi, we are security researchers from the Advanced Research Center at Trellix. We have began a campaign to patch a widespread bug named CVE-2007-4559. CVE-2007-4559 is a 15 year old bug in the Python tarfile package. By using extract() or extractall() on a tarfile object without sanitizing input, a maliciously crafted .tar file could perform a directory path traversal attack. We found at least one unsantized extractall() in your codebase and are providing a patch for you via pull request. The patch essentially checks to see if all tarfile members will be extracted safely and throws an exception otherwise. We encourage you to use this patch or your own solution to secure against CVE-2007-4559. Further technical information about the vulnerability can be found in this blog.
If you have further questions you may contact us through this projects lead researcher Kasimir Schulz.
Sourcery Code Quality Report
❌ Merging this PR will decrease code quality in the affected files by 7.76%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 3.70 ⭐ | 6.52 ⭐ | 2.82 👎 |
Method Length | 111.86 🙂 | 125.43 😞 | 13.57 👎 |
Working memory | 7.79 🙂 | 4.51 ⭐ | -3.28 👍 |
Quality | 65.45% 🙂 | 57.69% 🙂 | -7.76% 👎 |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 124 | 143 | 19 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
98-dados/programacao_distribuida_com_DASK/prep.py | 65.45% 🙂 | 57.69% 🙂 | -7.76% 👎 |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
98-dados/programacao_distribuida_com_DASK/prep.py | flights | 12 🙂 | 321 ⛔ | 37.01% 😞 | Try splitting into smaller methods | |
98-dados/programacao_distribuida_com_DASK/prep.py | create_weather | 6 ⭐ | 195 😞 | 9 🙂 | 54.91% 🙂 | Try splitting into smaller methods |
98-dados/programacao_distribuida_com_DASK/prep.py | accounts_json | 2 ⭐ | 109 🙂 | 10 😞 | 65.80% 🙂 | Extract out complex expressions |
Legend and Explanation
The emojis denote the absolute quality of the code:
- ⭐ excellent
- 🙂 good
- 😞 poor
- ⛔ very poor
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.
Please see our documentation here for details on how these metrics are calculated.
We are actively working on this report - lots more documentation and extra metrics to come!
Help us improve this quality report!