From the course: Vibe Coding Common Web Patterns into Tailwind CSS

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Security considerations in AI-generated web code

Security considerations in AI-generated web code

From the course: Vibe Coding Common Web Patterns into Tailwind CSS

Security considerations in AI-generated web code

- [Instructor] AI-generated code is your responsibility as a professional developer. It can be easy to accept AI code, but it's important to review it and consider it. You should be immediately on guard anywhere you're using a form because that can be a vector for user input. On the project I'm demoing here, I only have newsletter signup. If you accept user input though, and map it to a class name, you may have added an attack vector for a submission to take over the entire screen using full width, height and absolute positioning. This is a pattern to look for. AI uses context, and as a developer you can unknowingly reinforce some really lousy behavior. If AI sees you extending a lot of classes, it might decide to suggest all your changes go there rather than a more appropriate location. Use extensions in the theme sparingly. In addition, AI will sometimes suggest inline styles. You might see something like this. Again, AI uses context, so if you model behavior like this, even for…

Contents