-
-
Notifications
You must be signed in to change notification settings - Fork 742
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
FIPS Compatibility - gravatar-url removal / update / replacement to correct md5 usage #4475
Comments
Thanks for bringing this to our attention. I see the easiest path forward to inline the "generateGravatar" function in to the unleash code base. There is not compelling reason to use a library for this, as it basically is a simple md5 of the email. It feels a bit like an unnecessary workaround to please the "FIPS" requirements. I am not sure if there are any way at all to flag this module as safe, as it does not contribute to any cryptographic activities. Next steps:
Any takers? |
Hi, Is the issue still open? |
Yes, @mahimairaja |
That great! I would like to work on this issue. Can you please assign this issue to me |
So Can you please guide me. I could understand that I have to implement md5 hashing
|
@mahimairaja - I'd look at src/lib/util/generateImageUrl.ts . replacing the gravatar-url with an inline private function. Then add some tests confirming that you generate the valid URLs with query parameters. Preferably in a src/lib/util/generateImageUrl.test.ts |
As #4475 says, MD5 is not available in secure places anymore. This PR swaps out gravatar-url with an inline function using crypto:sha256 which is FIPS-140-2 compliant. Since we only used this method for generating avatar URLs the extra customization wasn't needed and we could hard code the URL parameters. fixes: Linear https://linear.app/unleash/issue/SR-112/gh-support-swap-out-gravatar-url-lib closes: #4475
Describe the feature request
The imported
gravatar-url
package uses md5 hash method (unsupported in FIPS environments), which prevents Unleash from running where FIPS is enforced.There's a set of nested dependencies through
sindresorhus
repos, having to follow unleash -> gravatar-url -> md5-hex to actually get a crypto module change.Background
https://en.gravatar.com/site/implement/hash/
https://github.com/sindresorhus/md5-hex/blob/main/index.js
aws/constructs#272
This problem is easy to fix in python. I can't find the same option to specify non-cryptographic use cases in node.
Solution suggestions
gravatar-url
The text was updated successfully, but these errors were encountered: