-
Notifications
You must be signed in to change notification settings - Fork 82
Lee at zoo corp/ttc ux 1 #7542
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
base: main
Are you sure you want to change the base?
Lee at zoo corp/ttc ux 1 #7542
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
status: 'completed', | ||
updated_at: Math.random(), | ||
// declare type ApiTokenUuid_type = string; | ||
user_id: Math.random().toString(), |
Check failure
Code scanning / CodeQL
Insecure randomness High
Math.random()
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 15 days ago
To fix the issue, replace the use of Math.random()
with a cryptographically secure random number generator. For Node.js, crypto.randomUUID()
is a suitable choice for generating unique identifiers securely. This ensures that the user_id
is generated in a way that is resistant to prediction or manipulation.
The changes will involve:
- Importing the
crypto
module from Node.js. - Replacing
Math.random().toString()
withcrypto.randomUUID()
for generating theuser_id
.
-
Copy modified line R2 -
Copy modified line R149
@@ -1,2 +1,3 @@ | ||
import type { Models } from '@kittycad/lib' | ||
import * as crypto from 'crypto'; | ||
|
||
@@ -147,3 +148,3 @@ | ||
// declare type ApiTokenUuid_type = string; | ||
user_id: Math.random().toString(), | ||
user_id: crypto.randomUUID(), | ||
}) |
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.
How the fuck do I delete you
c0c5e7b
to
4a46a24
Compare
Deployment failed with the following error:
View Documentation: https://vercel.com/docs/two-factor-authentication |
No description provided.