Vibeleaderboard
← All Intel
Intel / video

Avoiding vulnerabilities in AI code

Source
youtube.com
Author
a16z
Date

Context

An AI code example can encourage unsafe password handling even when it contains no real password. In this interview, a security researcher reports asking models to write service integrations and receiving examples that placed a placeholder directly in the code. A user following that pattern would insert their actual there, rather than load it from an environment variable or a secrets manager. The reported problem is the implementation pattern the model teaches. The researcher explicitly distinguishes it from reproducing a working secret out of training data, which was a separate research question.

Key takeaways · AI-distilled
  • The guest says that when his team asked several LLMs to write GitHub or Stripe integrations, most hardcoded the API key in the code, usually as a placeholder, instead of reading it from an environment variable or a secrets manager.
  • The guest cites research finding that LLMs asked to build an entire introduce security vulnerabilities at about the rate of a junior developer, or slightly higher.
  • He maps three techniques onto secure coding: curating training data, reinforcement learning toward preferred outputs, and a supervising model that edits output. The first two risk side effects, such as filtering slurs also dropping works like To Kill a Mockingbird.
  • He calls the supervisor approach the most promising but most expensive: a second model acting as a security engineer, for example swapping a hardcoded password for an environment variable, without needing to be an expert in the first model's domain.
  • His advice for teams without an AI security reviewer: keep a human who knows secure coding reviewing generated code, possibly two reviewers, and do not drop code review. He argues labs have invested more in stopping models from hacking than in secure code generation.
Terms in this piece · Glossary
  • Credential — Something presented with a request to prove that the sender is a particular identity, such as a password or a generated key.
  • Secret — A value such as a password, key or token that lets its holder act as someone; it must be kept out of code and shared files.
  • Application — Software arranged so that a person can use it; in this course, the software around a model that accepts your request, prepares the context and shows the reply.
  • alignment — The work of making AI systems actually pursue what their builders and users intend, rather than something subtly or dangerously different.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Read the source www.youtube.com
More from a16z
Recommended reads