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

decide on what recommendations from python package audit to implement #3940

Closed
2 tasks
jason-upchurch opened this issue Sep 5, 2019 · 4 comments
Closed
2 tasks
Assignees
Labels
Dependencies Pull requests that update a dependency file Security: general General security concern or issue Work: Back-end
Milestone

Comments

@jason-upchurch
Copy link
Contributor

jason-upchurch commented Sep 5, 2019

Recommendations from #3782

Suggest creating a separate issue for the following issues as appropriate.

  1. Upgrade to python@3.7.4:
  • update python image in config.yml to circleci/python:3.7.4-buster
  • update requirements.txt with gevent==1.4.0
  • update requirements-dev.txt to remove pandas
    • update manage.py to remove functions (or comment) that rely on pandas (these functions are not currently used elsewhere)
  • update runtime.txt with python-3.7.4
  1. Consider replacements for marshmallow-pagination as its requirements are not routinely maintained for our purposes and has implications for generating transitive dependencies
  • an fecgov/marshmallow-pagination fork has been created with requirements updated (we can at low cost maintain this fork, or incorporate it into our codebase)
  1. At a minimum, upgrade all libraries with breaking changes (apispec is of particular interest as it is likely necessary to modify the codebase to mitigate backwards incompatibility--there is an issue open for this)
  2. remove unused libraries
  3. specify requirements in requirements.in (and, requirements-dev.in, for example) and use pip-compile --output-file requirements.txt requirements.in so that transitive dependencies are then specified in requirements.txt. This allows for deterministic builds and avoids the potential for build fails due to problems in dependent packages, but will need to be incorporated into the workflow. This approach is analogous to committing package-lock.json, pinning the transitive Node dependencies.
  4. consider removing lightly used libraries by replacing sections of codebase with functions with custom or built-in equivalents, e.g., pandas, marshmallow-pagination, rdbms-subsetter
  5. Stay ahead of library vulnerabilities by incorporating semi-annual library reviews and upgrading packages routinely (and identifying and resolving those with backwards incompatibilities)
  6. update documentation where appropriate

See reference implementation in PR #3931

Completion critera

  • hold engineering sync to have devs decide on what if any issues above to implement.
  • make additional tickets as needed.
@jason-upchurch jason-upchurch added Work: Back-end Dependencies Pull requests that update a dependency file labels Sep 5, 2019
@jason-upchurch jason-upchurch added this to the Sprint 10.1 milestone Sep 5, 2019
@jason-upchurch jason-upchurch changed the title Implement recommendations from python audit Implement recommendations from python package audit Sep 5, 2019
@jason-upchurch jason-upchurch added the Security: general General security concern or issue label Sep 5, 2019
@jason-upchurch
Copy link
Contributor Author

marshmallow-pagination: Latest commit 626a6a9 on Sep 15, 2015

@jason-upchurch jason-upchurch changed the title Implement recommendations from python package audit decide on what recommendations from python package audit to implement Sep 9, 2019
@jason-upchurch
Copy link
Contributor Author

Working on composing invite list

@jason-upchurch
Copy link
Contributor Author

engineering sync today at 1:00 p.m.

@jason-upchurch
Copy link
Contributor Author

Had engineering sync and opened related issues to conduct the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Pull requests that update a dependency file Security: general General security concern or issue Work: Back-end
Projects
None yet
Development

No branches or pull requests

1 participant