-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 concern for private key in tvm repo #1189
Comments
I think it is purely used for demo purposes to run SGX, cc @nhynes |
yep, it's for the SGX demo. It's not a security concern but it can't be removed otherwise the demo won't run. |
Is there a reason not to generate the key at the beginning and destroy it at the end? |
No, but generating the key is non-trivial |
Leaving the key in the repo means that it will be flagged by many security tools, even if the key is not used for anything but the demo. I think the simplest fix would be move the demo into a separate repo for demos and examples, which would let TVM itself not be flagged, but not require the work to generate the key each. I think long term we should probably generate the key each time. |
If we just don't want any private key in TVM repo, a quick workaround might be create a gist to store the private key file. |
Hmm. I wonder if a fake key can be auto-generated from random bytes instead. I'll look into that
Which ones, exactly? Do they check the file extension or do they look in the file, itself? |
In this case it was specifically an internally developed one and I assumed that others would flag it as well. And I believe it looks in the file itself, this part is also supposed to flag keys that are hard coded as well. |
This change is not enough to not have it flagged by the security tools as they are looking for any private keys hardcoded in the repo, and once the key is removed we should also rewrite the commit history to remove it there as well, otherwise it is still in the repo. Here is a link that details easy ways to do that. https://help.github.com/articles/removing-sensitive-data-from-a-repository/ |
Rewriting history for a public repo is a no-go. I suggest that you whitelist TVM in your security checker. This should be relatively easier since your tool is developed in-house. |
There is a private key stored in tvm repo:https://github.com/dmlc/tvm/blob/fdba6cc9bd3bec9ccd0592fa3900b7fe25d6cb97/apps/sgx/enclave_private.pem Do we have any potential security concern?Can we remove it?
The text was updated successfully, but these errors were encountered: