AI systems have moved beyond generating text into taking action. They're in production. They query internal data, make API calls, and interact with other production systems, often with more access than most humans get. AI systems aren't deterministic; they reason, adapt, and operate on untrusted input in ways that traditional security models simply weren't designed for. This creates new vulnerabilities and shifts the entire control surface. This book is about that shift. In AI Security Engineering, Dan Borges and David Campbell show you how to rethink security for AI systems built on retrieval pipelines, persistent memories, and agents that take action. Drawing from real-world adversarial testing and production deployments, they focus on how these systems actually fail: prompt injection that turns inputs into instructions, poisoned retrieval that corrupts decisions at runtime, and agents that quietly accumulate more authority than intended. Rather than relying on the model to do the right thing you'll learn how to design systems that constrain what AI systems are allowed to do, enforce least privilege at the capability level, and build architecture that can observe, interrupt, and contain failures when they happen.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
# AI Security Engineering — Reading Guide
## 【One-Line Pitch】
A practical security engineering handbook for teams building production AI systems—especially retrieval-augmented pipelines, persistent memory, and agentic architectures—showing how to apply classic security principles to the new, nondeterministic attack surface of LLMs. Read this if you're deploying AI beyond chatbots and need to think like an adversary before attackers do.
## 【Book Arc】
- **Opening (~0%–10%)**: Establishes the core thesis—AI systems have moved from generating text to taking actions in production, creating a fundamentally new control surface. The authors frame the book around real failure modes: prompt injection, poisoned retrieval, and authority creep in agents.
- **Early (~19%–33%)**: Builds the conceptual foundation by mapping AI security problems onto traditional security principles. Covers first-principles reasoning, untrusted input as the root of most AI vulnerabilities, and why classic controls like input validation and sanitization remain relevant for LLM-based systems.
- **Middle (~38%–52%)**: Introduces the Behaviour, Identity, and Control (BIC) framework, diving into authentication vs. authorization, trust boundaries, and access control as the backbone of securing agentic systems. Discusses "control decay"—how security controls lose effectiveness over time as technologies evolve.
- **Middle (~52%–62%)**: Explores defense in depth as the strategic response to inevitable control failure. Draws on military and infosec history (Schneier, OWASP) to argue for overlapping, independent layers of security rather than single-point solutions, and connects this to kill-chain thinking from adversarial tradecraft.
## 【Key Takeaways】
- **AI systems are a new attack surface, not just a new technology** (Opening): Because LLMs reason, adapt, and act on untrusted input, traditional deterministic security models break down. The book's premise is that you must design for failure, not assume the model will behave.
- **Map new AI vulnerabilities to known security categories** (Early): Prompt injection is fundamentally an untrusted input problem, similar to SQL injection or XSS. Reframing AI failures as classic vulnerability classes lets you reuse decades of proven mitigation strategies.
- **Treat all external input as potentially malicious until validated** (Early): This principle, borrowed from web security, is the single most important mental model for AI systems—anywhere a user or agent can send input is an attack surface. Input sanitization and output validation remain essential controls.
- **Access control is the #1 issue for agentic AI** (Middle): The BIC framework (Behaviour, Identity, Control) emphasizes that verified identity and explicit authorization must precede any action. The authors note access control remains the top OWASP issue even in 2025, and it's especially critical when agents accumulate authority.
- **Map trust boundaries before designing controls** (Middle): Every point where identity, permissions, or security assumptions change is a boundary requiring explicit authority checks. Implementing these checks ubiquitously through common middleware is a practical pattern for consistent enforcement.
- **Security controls decay—plan for it** (Middle): Like "bit rot," security measures become less effective as surrounding technologies evolve. The authors argue that continuous testing, updating, and challenging of controls is mandatory, not optional, especially with AI-assisted exploit development accelerating.
- **Defense in depth is the antidote to control failure** (Middle): Overlapping, independent controls ensure that failure of one layer doesn't mean total compromise. This isn't overengineering—it's a systems engineering approach to inevitable human and technical error.
## 【Reading Tips】
- **Skim the front matter** (~0%–10%): The preface and conventions are standard O'Reilly boilerplate. Jump straight to the security principles discussion around the 19% mark.
- **Deep-read the principles chapters** (~19%–52%): This is the conceptual core. The BIC framework and trust boundary mapping are the most actionable mental models—take time to internalize how they apply to your own systems.
- **Watch for the "reframing" technique**: The authors repeatedly show how AI vulnerabilities map to classic categories (injection, access control, etc.). Pay attention to these mappings—they're the book's real value for practitioners.
- **Note the OWASP references**: The book engages with OWASP Top 10 for both general web and agentic applications. If you're familiar with OWASP, use it as an anchor; if not, consider skimming the OWASP Top 10 for Agentic Applications in parallel.
- **Excerpts don't cover later chapters**: The sample material ends around 62% of the book. Later content presumably covers specific attack techniques, case studies, and implementation patterns—if those are your priority, check the table of contents or a fuller edition.
## 【Coverage Limits】
This guide is based on excerpts covering roughly the first 60% of the book, focusing on security principles and frameworks. Specific attack demonstrations, detailed case studies, and hands-on implementation guidance from later chapters are not covered here.
##
Excerpt 1
a, Inc. , 141 Stony Circle, Suite 195, Santa Rosa, CA 95401. O’Reilly books may be purchased for educational, business, or sales promotional use. Online edit...
ease note that the GitHub repo will be made active later on. If you’d like to be actively involved in reviewing and commenting on this draft, please reach ou...
ially malicious until validated within the intended context.” Several historical attack categories, like SQL injection, cross-site scripting (XSS), and comma...
mation security we tend to call this security control decay. Our friend Chris Nickerson regularly preaches about the dangers of security control decay, or th...
s . This is where defense in depth is arguably most helpful. There is a saying in infosec that goes “attackers only have to be right once, defenders have to ...
ry to distinguish intended behavior from anomalous behavior.” One of the best ways to organize computer telemetry in my opinion is through a concept known as...
across other common control sets, such as NIST 800-53 again. NIST SP 800-53 control framework Controls emphasize: Secure failure states Least privilege enfor...
forms deployed across governments and Fortune 100 companies. Before Scale AI, David shaped platform security and engineering culture at Uber, DoorDash, and N...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
AI Security Engineering (Dan Borges and David Campbell)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share to WeChat Moments
AI Security Engineering (Dan Borges and David Campbell)(Z-Library)
Scan the QR code with WeChat to open this book
Tap the ··· menu in the top-right corner
Choose Share to Moments
You are already in WeChat. Tap ··· in the top-right corner and choose Share to Moments.
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
AI Security Engineering (Dan Borges and David Campbell)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
这本书讨论的是当 AI 系统从生成文本走向真实行动之后,安全工程该如何跟上。作者指出,AI 已经进入生产环境,会查询内部数据、调用 API、与其他生产系统交互,而且往往拥有比大多数人类更高的访问权限。与此同时,AI 系统并非确定性的,它会推理、会适应,并要处理不可信输入,这些特性恰恰是传统安全模型在设计时没有考虑过的,因此带来了新的脆弱面。
围绕这一判断,书中给出几条可以抓住的线索。其一是把历史安全教训映射到新问题上:从第一性原理出发提炼适用于 AI 系统的核心安全原则,其中“不可信输入”被放在重要位置,并与 SQL 注入、XSS 等历史攻击类别关联,说明它们如何演化为提示注入这类 AI 新威胁。作者强调,对这类失败场景既要主动测试,也要建立能够普遍约束这些失败情况的控制措施。
其二是访问控制与信任边界。书中区分认证与授权,提出“行为、身份与控制”的框架,并讨论“控制衰减”——安全控制会随技术演进而失效,需要持续测试和更新。其三是纵深防御与最小权限。作者引用信息安全领域那句“攻击者只需对一次,防御者必须每次都对&r...
Digital LibraryAI Assistant
Hi — I can help you pick a book. Tell me a topic, language, or level, e.g. “a light English read”. If that's too broad, I'll ask one follow-up.
Loading comments...
Reply to Comment
Edit Comment