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
From ChatGPT to Claude Code: A Non-Techie’s Introduction to the Raw Power of AI by a Techie
Not because I don't like sharing. But because the only tool I use for 99% of my AI needs is Claude Code. And while I think it is not hard to learn, I'm never...
OpenClaw vs Hermes Agent
A learner asked me this after a workshop last week.
3 months ago I posted "Vibe coders, this will happen to you sooner or later."
The post went viral:
Why Your OpenClaw Agent Is One Message Away from Getting Hacked?
A stranger sent a very long, sophisticated-looking message to her agent. It was filled with detailed research instructions about finance news, complete with ...
How to connect Claude Code to Telegram the official way after Anthropic banned OpenClaw.
Recently, some learners asked me how I connected my Claude Code to Telegram after Anthropic banned OpenClaw.
Once in a while, I've heard of someone losing his Claude Cowork chat history after an update.
It has happened to one of my workshop alumni, Kelvin Lee, too. Read his post at https://lnkd.in/gitnMqde
From ChatGPT to Claude Code: A Non-Techie’s Introduction to the Raw Power of AI by a Techie
Not because I don't like sharing. But because the only tool I use for 99% of my AI needs is Claude Code. And while I think it is not hard to learn, I'm never...
Why Your OpenClaw Agent Is One Message Away from Getting Hacked?
A stranger sent a very long, sophisticated-looking message to her agent. It was filled with detailed research instructions about finance news, complete with ...
How to connect Claude Code to Telegram the official way after Anthropic banned OpenClaw.
Recently, some learners asked me how I connected my Claude Code to Telegram after Anthropic banned OpenClaw.
OpenClaw vs Hermes Agent
A learner asked me this after a workshop last week.
3 months ago I posted "Vibe coders, this will happen to you sooner or later."
The post went viral:
Once in a while, I've heard of someone losing his Claude Cowork chat history after an update.
It has happened to one of my workshop alumni, Kelvin Lee, too. Read his post at https://lnkd.in/gitnMqde