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 library for SecureDrop Workstation filesystem operations #1252

Open
sssoleileraaa opened this issue Apr 28, 2021 · 3 comments
Open

Python library for SecureDrop Workstation filesystem operations #1252

sssoleileraaa opened this issue Apr 28, 2021 · 3 comments

Comments

@sssoleileraaa
Copy link
Contributor

Description

See freedomofpress/securedrop-export#69 and #1226 where we introduced semgrep, custom rules, and some safety functions for file system operations in utils.py. This code is useful across projects so we should create a new library called securedrop-path or securedrop-safety or something that works for functions such as:

  • safe_mkdir
  • safe_extract
  • safe_decrypt

This will also help standardize the way we create and cleanup files (which can be confusing, see #1228).

@sssoleileraaa sssoleileraaa changed the title Make a securedrop-path library for all our safety functions that we use across projects, e.g. export, client Python library for SecureDrop Workstation filesystem operations Apr 28, 2021
@eloquence
Copy link
Member

@creviera has offered to take a first stab at a spike to implement such a library, with the goal to prepare a draft PR for broader input as part of the 5/5-5/19 sprint.

@sssoleileraaa
Copy link
Contributor Author

I didn't get as far as opening a draft PR because of the security issue that came up during the sprint, but I have something started:

I propose we name the new module securedrop-pathlib. Once we agree on that, I can create a new repo and work with infra to set this up. Until then I'm working on fixing up tests, moving code around, and getting things to just work here: https://github.com/creviera/securedrop-pathlib. You can install securedrop-pathlib in the client virtualenv on this test branch by following these steps:

pip uninstall securedrop-pathlib
pip install git+https://github.com/creviera/securedrop-pathlib@master#egg=securedrop-pathlib

@eloquence
Copy link
Member

For this sprint, @creviera wants to

  • clarify setup docs in the README
  • publish the package on pypi
  • start using it in securedrop-client and securedrop-export

Going forward, issues will be tracked in the https://github.com/freedomofpress/secure-fs/ repo.

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

No branches or pull requests

2 participants