I was doing vibe coding and saw AI generated this code.
Notice anything?
Notice anything? 👉 It hardcodes a fallback JWT secret (‘supersecretjwtkey’) right in the code.
It is a typical example of vibe coding output.
If you push this code straight to production without reading it, you’re basically planting a time bomb in your system.
💡 One way to avoid this is to instruct your AI coding assistant upfront with rules based on best practices. For example, in this case:
“Never use hardcoded secrets. Always load them securely from environment variables.”
By giving your AI secure coding guidelines as rules, you reduce the chance of these mistakes slipping through.
Generative AI can accelerate us, but blind trust can sink us. ⚡️
Always: ✅ Set clear coding instructions for your AI ✅ Review the code for security pitfalls ✅ Replace placeholders with proper environment variables
What are the rules you give your AI coding assistant to keep your code safe and clean?
#vibecoding #security #vibecode
Enjoyed this? Subscribe for more.
Practical insights on AI, growth, and independent learning. No spam.
More in Vibe Coding
Low-code (or no-code) platforms will replace coding.
That’s the narrative we keep hearing for years.
Can AI really write production-quality code?
Here's a chance to peek how it is used in an actual project.
Vibe coding is a double-edged sword.
In the wrong hands, it's a security nightmare. In the right hands, it's a powerful security assistant.
No, vibe coding does not create tech debt.
Bad coders do.
Vibe coders, this old news will happen to you sooner or later.
Unless you set up your project correctly.
The Hype Cycle of Claude Code That Everyone Will Go Through
Last week, Boris shared he built Claude Cowork with 100% vibe coding in 10 days. It took the software world by storm.
Low-code (or no-code) platforms will replace coding.
That’s the narrative we keep hearing for years.
No, vibe coding does not create tech debt.
Bad coders do.
The Hype Cycle of Claude Code That Everyone Will Go Through
Last week, Boris shared he built Claude Cowork with 100% vibe coding in 10 days. It took the software world by storm.
Can AI really write production-quality code?
Here's a chance to peek how it is used in an actual project.
Vibe coding is a double-edged sword.
In the wrong hands, it's a security nightmare. In the right hands, it's a powerful security assistant.
Vibe coders, this old news will happen to you sooner or later.
Unless you set up your project correctly.