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
OpenClaw vs Hermes Agent
A learner asked me this after a workshop last week.
The votes are in for Cohort 3.
Congrats to Francis Lee ., the winner of the portable monitor from my Foundations of Claude Code workshop.
Create a Free LinkedIn Carousel with Vibe Coding
(See the carousel below that I created for one of my posts)
Claude Code can code nice UI. But nice UI doesn't mean good UI.
Manual UI testing is becoming one of my biggest bottlenecks when coding with AI now.
Claude.ai, Claude Desktop, Cowork, or Claude Code: which one should you use, and when? And why is Claude Code not only for coding?
I get this question a lot, in workshops, in my DMs, and in offline conversations.
💡 Little-known hack to get the most out of Cursor for FREE
If you're using Cursor on the free plan, you will eventually hit the dreaded "servers overload" screen.
OpenClaw vs Hermes Agent
A learner asked me this after a workshop last week.
Create a Free LinkedIn Carousel with Vibe Coding
(See the carousel below that I created for one of my posts)
Claude.ai, Claude Desktop, Cowork, or Claude Code: which one should you use, and when? And why is Claude Code not only for coding?
I get this question a lot, in workshops, in my DMs, and in offline conversations.
The votes are in for Cohort 3.
Congrats to Francis Lee ., the winner of the portable monitor from my Foundations of Claude Code workshop.
Claude Code can code nice UI. But nice UI doesn't mean good UI.
Manual UI testing is becoming one of my biggest bottlenecks when coding with AI now.
💡 Little-known hack to get the most out of Cursor for FREE
If you're using Cursor on the free plan, you will eventually hit the dreaded "servers overload" screen.