-
Notifications
You must be signed in to change notification settings - Fork 18
Add documentation of security implications #140
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
Changes from 1 commit
9a8ece5
f9e559b
7571289
63fb592
036cc5c
a4cceaa
c3f4cd5
be28bb7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,34 @@ | ||||||||||||||
# Security Implication of the Typeshed Stub Uploader | ||||||||||||||
|
||||||||||||||
Security for the stub uploader is of the highest importance. If the stub | ||||||||||||||
uploader gets compromised, an attacker could upload manipulated stub | ||||||||||||||
packages to gain full access to developer machines or even production hosts. | ||||||||||||||
Considering the high trust, quick turnaround, and automated installation of | ||||||||||||||
stub packages, this could have significant security implications. | ||||||||||||||
|
||||||||||||||
## Maintainers | ||||||||||||||
|
||||||||||||||
TBD | ||||||||||||||
|
||||||||||||||
## Typeshed Data | ||||||||||||||
|
||||||||||||||
To ensure that a compromised typeshed repository can't lead to copromised | ||||||||||||||
srittau marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
stub packages, all typeshed data is verified by the stub uploader before | ||||||||||||||
building packages. The stub uploader ensures that only stub and metadata | ||||||||||||||
files are added to the stub packages. This also means that no code from the | ||||||||||||||
typeshed repository must be executed while building packages, and no | ||||||||||||||
modules must be imported. | ||||||||||||||
|
||||||||||||||
## Dependencies | ||||||||||||||
|
||||||||||||||
Another possible attack vector are dependencies of stub packages. | ||||||||||||||
srittau marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
A compromised dependency can have a similar effect to when a stub package | ||||||||||||||
gets compromised directly. Therefore, only certain dependencies are | ||||||||||||||
allowed: | ||||||||||||||
|
||||||||||||||
* Dependencies on other stub packages created by typeshed. | ||||||||||||||
* Dependencies on packages the upstream package depends on – even recursively. | ||||||||||||||
Since it's likely that a stub package gets installed alongside the | ||||||||||||||
upstream package, this does not introduce an additional security liability. | ||||||||||||||
* Dependencies that are explicitly allowlisted in the stub uploader. These | ||||||||||||||
dependencies are vetted to be from a trusted source. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice to expand upon this and actually describe and explain the possible attack in #61 (comment). This kind of hints at how the attack goes, but IMO does not describe it in enough detail. It is the biggest security issue in stub_uploader I'm aware of, and typeshed maintainers need to be aware of it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd like to hold off documenting this here at the moment. I kept this section quite vague for the moment, mostly because I think we should resolve and implement #90 first and can then discuss the measures and reasons in this document. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe:
Suggested change
|
Uh oh!
There was an error while loading. Please reload this page.