Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
my team noticed that
node-expose-sspi
is currently (indirectly) affected by CVE-2022-0235. The reason for that is the pinned dependency on an older version ofnode-fetch
("3.0.0-beta.9"
).My guess is that the old version of
node-fetch
is being used because it is the last version that can still be imported as a CommonJS module.Later versions are published as ESM which is problematic for CommonJS clients.
This PR updates node-fetch and integrates it using the following approach:
import type
where only type declarations are requiredfetch
function (seeloadNodeFetch.ts
). Essentially,eval
is used vianew Function(...)
to stop the TypeScript compiler from replacing an asynchronousimport(...)
expression.Unfortunately I am unable to run all tests right now.
My main development setup is running Linux and my Windows VM is not part of an domain, making testing the server side code rather difficult.
I was able to test the client side SSO flow manually: it appears to work well.