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

Security precautions #7

Open
8 tasks
afshin opened this issue Jun 28, 2019 · 8 comments
Open
8 tasks

Security precautions #7

afshin opened this issue Jun 28, 2019 · 8 comments

Comments

@afshin
Copy link
Member

afshin commented Jun 28, 2019

Introduction

On the cusp of our 1.0 release, we should revisit our security procedures to make sure we are taking reasonable precautions to protect our users and ourselves.

I propose the following checklist as a model for how we handle these issues.

Risk factors

We recognize that our project is high profile and it could be a vector of attack in a few ways:

Vector Severity Risk
1 Malicious code injection into JupyterLab source high low
2 Compromised dependencies in package.json files high moderate
3 Publishing compromised Python packages to PyPI/Conda high low
4 Publishing compromised JS packages to NPM high moderate

Mitigation - how we handle these risks

1. Malicious code injection into JupyterLab source

  • Know your maintainers (KYM): careful trust-building in each maintainer who has merge rights
  • A sound code review process for every pull request; all PRs must be reviewed by someone who is not the author and must pass the automated test suite
  • Mandatory two-factor authentication (2FA) on GitHub for maintainers who can merge pull requests

2. Compromised dependencies in package.json files

  • Regularly reviewing outdated dependencies before each release
  • GitHub's NPM dependency notifications

3. Publishing compromised Python packages to PyPI/Conda

  • Mandatory two-factor authentication (2FA) for PyPI
  • Mandatory two-factor authentication (2FA) on GitHub for users who merge conda-forge pull requests

4. Publishing compromised JS packages to NPM

  • Mandatory two-factor authentication (2FA) for NPM
@blink1073
Copy link
Contributor

We don't publish to conda directly. It is done via merging a pull request on the conda-forge repo.

@afshin
Copy link
Member Author

afshin commented Jun 28, 2019

Cheers, updated the list.

@jasongrout
Copy link
Contributor

* Know your maintainers (KYM): careful trust-building in each maintainer who has publishing rights.

KYM for each maintainer who has merge rights as well as those that have publishing rights. Note that those two sets are distinct. For example, our conda-forge package has a maintainer with publish rights (i.e., merge rights on the conda-forge feedstock) who does not have merge rights in the jlab repo.

@vidartf
Copy link
Member

vidartf commented Jun 28, 2019

Mandatory two-factor authentication (2FA) for PyPI.

Note that there isn't proper 2FA for PyPI. There is some work in progress that they call 2FA, but it is more of a 1.5FA

@blink1073
Copy link
Contributor

AFAIK the only remaining issue is recovery codes: pypi/warehouse#5800

@afshin
Copy link
Member Author

afshin commented Jun 28, 2019

I haven't tried publishing on PyPI since I added 2FA to my account.

@afshin
Copy link
Member Author

afshin commented Jun 28, 2019

@jasongrout You're totally right. I had that in three spots and when I consolidated, I did not clarify. Updated now.

@vidartf
Copy link
Member

vidartf commented Jun 28, 2019

@blink1073 I mean that 2 factors are not needed on upload, only to generate a token that is stored for use on upload (pypi/warehouse#5815). This means there is only one factor when uploading (something stored on your computer).

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

4 participants