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
UX/UI and naming matter more than capability for adoption.
Recently, everyone on LinkedIn is talking about learning Claude after the demo of Claude Cowork.
I finally went down the rabbit hole.
After resisting for months, I subscribed to Claude Max 20x.
Claude Code Foundations: 5 Lessons from Cohort 1
To the learners who signed up as "guinea pigs", thank you. The first cohorts are always the messiest, as the course content and timing have not yet been test...
Are AI labs trying too hard to anthropomorphise AI to keep the illusion of AGI going?
--
DeepWiki: AI-Generated Docs for Any GitHub Repo
If you're using open-source software, one of the most common problems is outdated or poor documentation.
Even a strong brand and a great product won't save you from disruption.
So, what is the strongest moat in business? Build an ecosystem.
UX/UI and naming matter more than capability for adoption.
Recently, everyone on LinkedIn is talking about learning Claude after the demo of Claude Cowork.
Are AI labs trying too hard to anthropomorphise AI to keep the illusion of AGI going?
--
Even a strong brand and a great product won't save you from disruption.
So, what is the strongest moat in business? Build an ecosystem.
I finally went down the rabbit hole.
After resisting for months, I subscribed to Claude Max 20x.
Claude Code Foundations: 5 Lessons from Cohort 1
To the learners who signed up as "guinea pigs", thank you. The first cohorts are always the messiest, as the course content and timing have not yet been test...
DeepWiki: AI-Generated Docs for Any GitHub Repo
If you're using open-source software, one of the most common problems is outdated or poor documentation.