Skip to content
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

CWE-1104 for uuid-apikey package #960

Closed
ElectricNroff opened this issue Dec 16, 2022 · 0 comments · Fixed by #970
Closed

CWE-1104 for uuid-apikey package #960

ElectricNroff opened this issue Dec 16, 2022 · 0 comments · Fixed by #970
Assignees

Comments

@ElectricNroff
Copy link
Contributor

ElectricNroff commented Dec 16, 2022

https://snyk.io/advisor/npm-package/uuid-apikey says "We found indications that uuid-apikey is an Inactive project." Also, apparently CVE Services normally only uses it for:

if (uuidAPIKey.isUUID(identifier)) {

and apparently uuid.validate could be used instead because https://www.npmjs.com/package/uuid is already being used, and also https://www.npmjs.com/package/validator is already being used and has its own isUUID function.

The uuid-apikey package was used in approximately 2020 to generate CVE Services API keys as users were created, but is no longer used for that. The uuid-apikey package is also used by src/scripts/hashPasswords.js - which might be used by people setting up new instances of the cve-services Open Source project, but there is no inherent reason why their needs for API keys could not be met by code similar to:

const randomKey = cryptoRandomString({ length: getConstants().CRYPTO_RANDOM_STRING_LENGTH })
newUser.secret = await argon2.hash(randomKey)

Because of https://cwe.mitre.org/data/definitions/1104.html concerns, it would be best if a potentially unmaintained package, which may be a personal project of a single developer, is not routinely used as part of the CVE Services production service.

@slubar slubar linked a pull request Dec 21, 2022 that will close this issue
jdaigneau5 added a commit that referenced this issue Dec 22, 2022
#960 remove uuid-apikey package due to CWE-1104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants