52 of 53
ContentsAppendix F

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.

  1. Brief
  2. Build
  3. Test
  4. Fresh review
  5. You approve
Brief, build, test, review, approve: no step is skipped because the code reads well. (Advice, not a study.)
  1. 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.
  2. 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
  3. 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.
  4. 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.
  5. 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)
  1. 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.
  2. 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.
  3. 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.
  4. 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.

Cite this page

Using this book

© 2026 Steve Sparks. All rights reserved. You're welcome to quote short passages and cite any page, with a link back. To reuse diagrams or larger parts, ask through GitHub.

Quoted material and figures from other sources remain their owners'.