Appendix FFor builders
Review, test, verify
Treat AI-written work like a new colleague’s first pull request: test it, have it reviewed with fresh eyes, check what it depends on, and approve it yourself.
- Brief
- Build
- Test
- Fresh review
- You approve
- Test it. In a study run in 2021, GitHub Copilot completed 89 security-relevant coding scenarios, producing 1,689 programs; about 40 percent were found vulnerable.1 Tests and security checks catch what reads fine.
- Review with fresh eyes. Ask for a review in a new session, or from a different model. In one study, language models judging summaries favored summaries they had written themselves.2
- Check what it depends on. Code-writing models also recommend software packages that don’t exist: across 16 models and 576,000 code samples, at least 5.2 percent of packages recommended by commercial models and 21.7 percent by open-source models were made up.3 Look each new dependency up before you install it.
- Don’t let it obey what it reads. Web pages and files can carry hidden instructions (Chapter 10).4 Keep an agent’s permissions narrow, and review before it acts.
- Check its sources the way Chapter 14 describes: open them.
For how much the parts around a model matter, see the case study in Appendix B.
Notes (4)
- 1Hammond Pearce, Baleegh Ahmad, Benjamin Tan, Brendan Dolan-Gavitt, and Ramesh Karri, “Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributions,” in 2022 IEEE Symposium on Security and Privacy (SP) (IEEE, May 2022), 754–768, https://doi.org/10.1109/SP46214.2022.9833571. Cited at abstract; p. 1.
- 2Arjun Panickssery, Samuel R. Bowman, and Shi Feng, “LLM Evaluators Recognize and Favor Their Own Generations,” in Advances in Neural Information Processing Systems 37 (2024), 68772–68802, https://doi.org/10.52202/079017-2197. Cited at p. 2.
- 3Joseph Spracklen, Raveen Wijewickrama, A H M Nazmus Sakib, Anindya Maiti, Bimal Viswanath, and Murtuza Jadliwala, “We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs,” in 34th USENIX Security Symposium (USENIX Security 25) (USENIX Association, 2025), 3687–3706, https://www.usenix.org/conference/usenixsecurity25/presentation/spracklen. Cited at abstract; p. 3687.
- 4Kai Greshake, Sahar Abdelnabi, Shailesh Mishra, Christoph Endres, Thorsten Holz, and Mario Fritz, “Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection,” in Proceedings of the 16th ACM Workshop on Artificial Intelligence and Security (November 30, 2023), 79–90, https://doi.org/10.1145/3605764.3623985.
Appendix F · page 2 of 3
Turn pages with the ← and → keys.