Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

upgrade django and cryptography #838

Merged
merged 2 commits into from
Mar 11, 2024
Merged

Conversation

pkfec
Copy link
Contributor

@pkfec pkfec commented Feb 28, 2024

Summary

  1. upgrade django and cryptography to resolve snyk vulnerabilities
  2. Remove and replace deprecated url function with re_path

Required reviewers

1 developers

Impacted areas of the application

Eregs App and Parser

Related PRs

Note: Merge these pull requests before testing the current one.

I upgraded to the minor patch version of Django, v4.2.11, which was released on March 4th:
fecgov/regulations-parser#19
fecgov/regulations-site#16
fecgov/regulations-core#17

How to test

  1. Checkout this branch
  2. Change regparser, regulations, and regcore to point to my branch in requirements.txt and requirements-parsing.txt

regparser
-e git+https://github.com/fecgov/[email protected]#egg=regparser
regsite
-e git+https://github.com/fecgov/[email protected]#egg=regulations
regcore
-e git+https://github.com/fecgov/[email protected]#egg=regcore

Terminal One:
3. pyenv virtualenv (your virtual environment)
4. pip install -r requirements.txt
5. rm -rf node_modules
6. npm i
7. npm run build
8. dropdb eregs_local
9. createdb eregs_local
10. python manage.py migrate
11. python manage.py compile_frontend
12. python manage.py runserver (leave running)

Terminal Two:
13. pyenv virtualenv (your virtual environment)
14. pip install -r requirements-parsing.txt
15. snyk test --file=requirements-parsing.txt --package-manager=pip NOTE: Django, Cyptography are no longer flagged as vulnerable packages
16. python load_regs/load_fec_regs.py local
17. Go to http://127.0.0.1:8000/  to view 45 regulations

For more detailed instructions follow the wiki on how to setup/parse regulations on local environment

@pkfec pkfec self-assigned this Feb 28, 2024
@pkfec pkfec added this to the Sprint 24.3 milestone Feb 28, 2024
@pkfec pkfec linked an issue Feb 28, 2024 that may be closed by this pull request
1 task
Copy link
Member

@cnlucas cnlucas left a comment

Choose a reason for hiding this comment

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

Thanks @pkfec, works for me.

@cnlucas cnlucas merged commit 22ed871 into develop Mar 11, 2024
1 check passed
@cnlucas cnlucas deleted the feature/upgrade-feb-parser-packages branch March 11, 2024 13:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Snyk High] - django Denial of Service (DoS)(Due 03/15/2024) [February 2024] eRegs parsing requirements
2 participants