-
Notifications
You must be signed in to change notification settings - Fork 67
Tried splitting code to components to make it easier #94
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
Conversation
🔒 Security Scan Results✅ No critical security issues detected. The code has passed all critical security checks. |
|
Please hold off on any changes Reviewing code locally for PR check |
lperry022
left a comment
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.
The fallback JWT_SECRET is a big security risk where tokens could be forged if the env var isn’t set.
BTW this PR is also huge (142 files / 32k lines)!!! Try breaking it into smaller PRs next time to make reviews easier
Great work, just 1 change and you are all good to go!
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.
Reject - Hard Coded JWT Secret
const JWT_SECRET = process.env.JWT_SECRET || "your-jwt-secret-key";
- Using a default hard-coded JWT secret is a major security risk.
- If process.env.JWT_SECRET is not set in production, the app will fall back to "your-jwt-secret-key", which is guessable and makes all tokens forgeable by attackers.
- This would let anyone create valid JWTs and impersonate users.
Proposed Fix
Require the secret to be set in production and fail fast if it’s missing:
if (!process.env.JWT_SECRET) {
throw new Error("JWT_SECRET environment variable is required");
}
const JWT_SECRET = process.env.JWT_SECRET;
🔒 Security Scan Results✅ No critical security issues detected. The code has passed all critical security checks. |
lperry022
left a comment
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.
Great work!!
🔒 Security Scan Results✅ No critical security issues detected. The code has passed all critical security checks. |
No description provided.