-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
Jest is failing on a FIPS enabled machine #10726
Comments
Wanna send some PRs adding support? And can we run on CI to ensure we don't have regressions? If it's just Happy to use some other fast hashing algo, tho - it's just for revving |
I'd like to help here. could it be a good for first issue on this repo? thanks a lot |
If you have access to a FIPS system, sure! I don't know how the development workflow would be though |
Oops :( I do not have access to a FIPS system. I will look for another issue. thanks |
correct me if I'm wrong, so |
Correct. md5 is not allowed on a FIPS machine so I agree that we'll see multiple issues getting hit across the codebase. SHA256 is an acceptable hashing algorithm if we can make it an alternate option. |
TBH I don't even see a reason to make it an alternate option, it can be the hashing algorithm for everything, it's pretty fast these days as well. |
That works too. |
Is there any plan to fix this issue soon? |
About to dig in and fix this up, want to make sure I'm not re-inventing the wheel/it hasn't been fixed elsewhere. Is this still a need? (It's definitely a need for a project of mine and I have access to a FIPS environment.) |
PR very much welcome 🙂 Ideally we'd be able to run CI on such an environment (if not thee full CI at least some sort of smoke test), but I have no idea if GH actions (or others) provide such a thing |
same - how would i find out? o.0 |
I guess one option is to have our own I have no idea if that container would actually run under FIPS or if that requires the underlying OS to use it a well? Just building that docker image and trying to use the md5 hash is probably a good test for that |
Ok, sounds good. I have a FIPS environment i can test in, also. Another question... what are the most comprehensive actions I could run in order to ensure everything works as before? I'm assuming this, while in most cases a minor code change, will touch many, many pieces of the codebase. |
Just running all the tests ( |
perfect, thanks! |
Has there been any progress on fixing this issue? |
I might be able to take care of this. Changing md5 to sha256 to all the calls for createHash seems to be sufficient to make Jest work on a FIPS machine. I'll need to review all the changes and make sure there is no unintended side affects. As far as getting a FIPs machine to test on all you have to do is install Rocky 8 in a VM and enable FIPS. |
Not sure what has happened to all of the folks above that were going to look at this, but here is a basic PR. Note that babel-loader is also broken babel/babel-loader#910 - I'll make a PR for this shortly.... At least, those were two other projects that I had in the dependency stack around jest that were failing on a fips system. I'm not a node developer... please adjust the patch to fit your needs. |
Landed #12722 which will be out in Jest 28 (possibly today, maybe tomorrow). As mentioned there, I'm unable to find a way to actually test this, but hopefully it keeps working! If anyone knows how to run tests on a FIPS machine, any help would be appreciated to ensure we don't regress 🙂 |
Jest 28 is out if people missed it. Would love to hear if it works in FIPS envs? |
I just tested it in our env, and it works for my use cases :) |
Great, thanks! Would be great to run unit tests as well, but I guess we can close for now 👍 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
Tried running Jest tests on a FIPS (Federal Information Processing Standards) compliant Linux machine. It failed immediately reporting that md5 is disabled for fips. Tracing through the Jest code, there is a "normalizeMissingOptions" function in normalize.js that calls "createHash" using md5 which OpenSSL cannot use under FIPS standards.
To Reproduce
Run a basic Jest test on a FIPS machine. Similar output should be returned as described above in the bug report.
Expected behavior
Similar output should be returned as described above in the bug report.
The text was updated successfully, but these errors were encountered: