-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: recordHookStream #711
base: main
Are you sure you want to change the base?
Conversation
`Rate limited, retry attempt ${attempt + 1} of ${MAX_RETRIES}` | ||
) | ||
const delay = | ||
INITIAL_RETRY_DELAY * Math.pow(1.5, attempt) * (0.75 + Math.random()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nullify Code
Language: TypeScript
🔵 MEDIUM Severity
CWE-327
Node insecure random generator
crypto.pseudoRandomBytes()/Math.random() is a cryptographically weak random number generator.
Reply with /nullify
to interact with me like another developer
(you will need to refresh the page for updates)
`Rate limited, retry attempt ${attempt + 1} of ${MAX_RETRIES}` | ||
) | ||
const delay = | ||
INITIAL_RETRY_DELAY * Math.pow(1.5, attempt) * (0.75 + Math.random()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nullify Code
Language: TypeScript
🔵 MEDIUM Severity
CWE-338
Rules lgpl javascript crypto rule node insecure random generator
This rule identifies use of cryptographically weak random number generators.
Using cryptographically weak random number generators like crypto.pseudoRandomBytes()
and Math.random()
for security-critical tasks can expose systems to significant
vulnerabilities. Attackers might predict the generated random numbers, compromising
the integrity and confidentiality of cryptographic operations. This could lead to
breaches where sensitive data is accessed or manipulated, authentication mechanisms
are bypassed, or secure communications are intercepted, ultimately undermining the
security of the entire system or application.
Mitigation strategy:
Replace the use of these cryptographically weak random number generators with
crypto.randomBytes()
, a method provided by Node.js's crypto
module that
generates cryptographically secure random numbers. This method should be used
for all operations requiring secure randomness, such as generating keys, tokens,
or any cryptographic material.
Secure Code Example:
const crypto = require('crypto');
const secureBytes = crypto.randomBytes(256);
console.log(`Secure random bytes: ${secureBytes.toString('hex')}`);
Reply with /nullify
to interact with me like another developer
(you will need to refresh the page for updates)
Nullify Code Vulnerabilities2 findings found in this pull request
You can find a list of all findings here |
1dad681
to
3d9dfcc
Compare
) => { | ||
return (listener: FlatfileListener) => { | ||
listener.on('commit:created', { sheetSlug }, (event: FlatfileEvent) => | ||
recordReadWriteStream(callback, event, options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the then()
/catch()
syntax vs async
/await
Please explain how to summarize this PR for the Changelog:
Tell code reviewer how and what to test: