<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cybersecurity on</title><link>https://augmentedresilience.com/tags/cybersecurity/</link><description>Recent content in Cybersecurity on</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Mon, 11 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://augmentedresilience.com/tags/cybersecurity/index.xml" rel="self" type="application/rss+xml"/><item><title>You Use AI at Work. That Already Makes You a Security Stakeholder.</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/you-use-ai-at-work.-that-already-makes-you-a-security-stakeholder/</link><pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/you-use-ai-at-work.-that-already-makes-you-a-security-stakeholder/</guid><description>&lt;h2 id="the-part-no-one-mentions-when-they-hand-you-an-ai-tool">The Part No One Mentions When They Hand You an AI Tool&lt;/h2>
&lt;p>When an organization rolls out an AI tool to its workforce, the conversation usually goes one direction: productivity. Here is what it can do. Here is how to use it. Here is the prompt template.&lt;/p>
&lt;p>Nobody hands you an AI tool and says: here is the security architecture surrounding every session you will have with this system. Here is the data pipeline your conversations flow through. Here is what happens if that pipeline is compromised, misconfigured, or deliberately manipulated.&lt;/p></description><content>&lt;h2 id="the-part-no-one-mentions-when-they-hand-you-an-ai-tool">The Part No One Mentions When They Hand You an AI Tool&lt;/h2>
&lt;p>When an organization rolls out an AI tool to its workforce, the conversation usually goes one direction: productivity. Here is what it can do. Here is how to use it. Here is the prompt template.&lt;/p>
&lt;p>Nobody hands you an AI tool and says: here is the security architecture surrounding every session you will have with this system. Here is the data pipeline your conversations flow through. Here is what happens if that pipeline is compromised, misconfigured, or deliberately manipulated.&lt;/p>
&lt;p>I spent time going through the Securiti AI Security and Governance Certification — eight modules covering AI risk management, data and AI relationships, security controls for LLM systems, and global regulatory compliance. What I walked away with was not primarily a framework vocabulary. It was a shift in perception. Every AI tool I use at work now looks different to me than it did before. Not more threatening, exactly — more visible. I can see the security infrastructure that surrounds it, and more importantly, I can see where that infrastructure is absent.&lt;/p>
&lt;p>That shift in perception is what this post is about.&lt;/p>
&lt;hr>
&lt;h2 id="shadow-ai-is-already-in-the-room">Shadow AI Is Already in the Room&lt;/h2>
&lt;p>Most people think of shadow AI as a rogue-employee problem. Someone downloads an unauthorized chatbot, pastes in company data, and security has a headache. That version of the story is real, but it is the least interesting one.&lt;/p>
&lt;p>The more common version is quieter. Your approved SaaS platforms — the tools your IT and procurement teams signed off on — are adding AI features as standard upgrades. A productivity suite adds AI summarization. A customer support platform adds AI-generated response suggestions. An HRIS system adds AI-assisted performance analytics. These features are often enabled by default. The vendor agreement your organization signed may or may not address what happens to the data those features process.&lt;/p>
&lt;p>This is the model discovery problem, and it is the foundation of any serious AI governance conversation. You cannot govern what you cannot see. More immediately for the individual worker: you cannot make informed decisions about what data to share with a tool if you do not know what the tool is doing with it.&lt;/p>
&lt;p>&lt;img src="https://augmentedresilience.com/images/shadow-ai-enterprise.png" alt="Image Description">&lt;/p>
&lt;p>Your prompts are data. Your conversation history is data. The documents you upload for summarization are data. Where that data goes — whether it is retained, whether it is used for model training, whether it is accessible to the vendor, whether it is encrypted in transit and at rest — determines the real risk profile of that tool. Not its feature list.&lt;/p>
&lt;p>Shadow AI is not just the tools your organization has not approved. It is the AI pipelines embedded in the tools they have approved, operating in ways nobody fully audited.&lt;/p>
&lt;hr>
&lt;h2 id="every-prompt-has-an-attack-surface">Every Prompt Has an Attack Surface&lt;/h2>
&lt;p>There is a common assumption that AI security is about protecting the model from the outside. The model is the defended thing. The user is behind the perimeter.&lt;/p>
&lt;p>That assumption is wrong, and the OWASP Top 10 for Large Language Models makes it concrete.&lt;/p>
&lt;p>&lt;strong>Prompt injection&lt;/strong> is the clearest example of why. A direct prompt injection is straightforward: a malicious user tries to override the model&amp;rsquo;s instructions by crafting adversarial input. But indirect prompt injection is different — and more relevant to ordinary workers. An indirect injection happens when an attacker embeds malicious instructions inside a document, webpage, or data source that the AI will later retrieve and process. The model reads the poisoned content and follows the embedded instructions. The user who triggered the retrieval had no idea it was happening. You can be the vehicle for an attack without ever making a malicious choice.&lt;/p>
&lt;p>&lt;strong>Sensitive data leakage&lt;/strong> is the second failure mode that every user creates exposure for. Models are trained on data. They are prompted with context. Both of those data sources can surface unexpectedly in model outputs. An AI assistant given access to organizational data stores can, under the right conditions, return information that was never intended to appear in a user-facing response. This is not a theoretical vulnerability — it is documented in production systems.&lt;/p>
&lt;p>&lt;strong>Excessive agency&lt;/strong> is what happens when AI systems are granted broad permissions to act autonomously. An AI agent that can send emails, create calendar events, modify records, or execute code has a correspondingly large attack surface. The capabilities that make it useful are the same capabilities that make a compromised or manipulated session dangerous. Every permission granted to an AI agent is a permission that can be invoked by an attacker who successfully manipulates the session.&lt;/p>
&lt;p>&lt;img src="https://augmentedresilience.com/images/llm-firewall-layers.png" alt="Image Description">&lt;/p>
&lt;p>The common thread across all of these: the AI tool is not just a tool. It is a system with inputs, outputs, retrieval pipelines, permission sets, and trust boundaries — all of which are exploitable if they are not explicitly defended. Organizations running production LLM systems without layered firewall controls — prompt, retrieval, and response — are operating with a gap between those boundaries and enforcement.&lt;/p>
&lt;hr>
&lt;h2 id="the-frameworks-that-define-the-rules-you-are-already-playing-by">The Frameworks That Define the Rules You Are Already Playing By&lt;/h2>
&lt;p>The frameworks that govern enterprise AI are not written for compliance officers. They describe the risk landscape that every AI user is operating in, whether they know it or not.&lt;/p>
&lt;p>&lt;img src="https://augmentedresilience.com/images/cover-ai-governance-enterprise.png" alt="Image Description">&lt;/p>
&lt;p>The &lt;strong>NIST AI Risk Management Framework&lt;/strong> defines risk as a function of two variables: the magnitude of harm that would result from an AI failure, and the likelihood of that failure occurring. Multiply them and you have a risk score. Every AI tool in your organization already has such a score — it just may not be formal or documented. The NIST framework is the structure that makes it formal. When security and governance teams are assessing which AI systems need the most rigorous controls, they are applying this logic. The tools in your daily workflow are part of that calculation.&lt;/p>
&lt;p>&lt;strong>Gartner&amp;rsquo;s AI TRiSM&lt;/strong> — AI Trust, Risk, and Security Management — identifies four pillars that a trustworthy AI system must satisfy: explainability and model monitoring (can you understand and track what the model is doing?), model operations (is the model managed throughout its lifecycle?), AI application security (is the model protected against attacks?), and model privacy (does the model handle data consistently with privacy requirements?). These pillars map directly to questions an individual worker should be asking about the tools they use. Not as a formal audit, but as a baseline of awareness.&lt;/p>
&lt;p>The &lt;strong>EU AI Act&lt;/strong> takes a more prescriptive approach. It classifies AI systems by risk tier, and some of the highest-risk categories are firmly in the enterprise space: AI used in hiring decisions, employee performance assessment, credit scoring, medical diagnostics, and law enforcement. If your organization uses AI to support any of these functions, those systems are subject to significant regulatory obligations before deployment — conformity assessments, documentation requirements, human oversight mechanisms, and registration in an EU database. Non-compliance carries fines of up to fifteen million euros or three percent of global annual turnover.&lt;/p>
&lt;p>That is not an abstract consequence. For workers in HRIS, finance, healthcare, or recruiting who are integrating AI tools into core workflows, this regulatory reality is immediate and specific.&lt;/p>
&lt;hr>
&lt;h2 id="security-is-not-just-its-problem-anymore">Security Is Not Just IT&amp;rsquo;s Problem Anymore&lt;/h2>
&lt;p>The certification I went through made a lot of things clearer, but one thing most clearly: AI governance is not a compliance team function that gets handed down as a policy. It is a shared responsibility that extends to everyone who interacts with AI systems at work.&lt;/p>
&lt;p>That is not a burden. It is a change in the nature of what it means to be an informed professional in an AI-integrated workplace.&lt;/p>
&lt;p>Security decisions used to happen at the perimeter — at the firewall, at the access control list, at the endpoint protection layer. The individual worker was largely downstream of those decisions. AI changes that. Every prompt is a decision about what data leaves your organization&amp;rsquo;s control. Every AI-assisted task is a point of potential exposure. Every AI agent given permission to act on your behalf is a trust extension that carries real consequences.&lt;/p>
&lt;p>I do not think this means everyone needs to become a security engineer. It means that understanding the landscape matters — knowing what shadow AI is, what prompt injection looks like, what the frameworks mean when they say high-risk, what LLM firewalls do and why they exist. That baseline of literacy is what separates an AI user who is an informed participant in their organization&amp;rsquo;s security posture from one who is an uninformed risk.&lt;/p>
&lt;p>The tools are powerful. The productivity gains are real. The security infrastructure that makes those gains sustainable is also real — and understanding it is not optional for organizations that want to keep using AI responsibly.&lt;/p>
&lt;p>If you use AI at work, you are already inside this system. The only question is whether you understand the landscape you are operating in.&lt;/p>
&lt;hr>
&lt;p>&lt;em>This post draws on material from the Securiti AI Security and Governance Certification, the NIST AI Risk Management Framework, the OWASP Top 10 for Large Language Models, and Gartner&amp;rsquo;s AI TRiSM framework.&lt;/em>&lt;/p></content></item><item><title>AI Writes Code Fast. Here's Why Security-First Thinking Matters More Than Ever.</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/ai-writes-code-fast.-here-is-why-security-first-thinking-matters-more-than-ever/</link><pubDate>Sun, 19 Apr 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/ai-writes-code-fast.-here-is-why-security-first-thinking-matters-more-than-ever/</guid><description>&lt;h2 id="speed-is-the-feature-unexamined-speed-is-the-liability">Speed Is the Feature. Unexamined Speed Is the Liability.&lt;/h2>
&lt;p>One of the most impressive things about using AI to write code is how fast it moves. You describe an endpoint, a data model, a feature — and within seconds you have working code. Not a sketch. Not pseudocode. Actual, runnable implementation.&lt;/p>
&lt;p>That speed is real, and it is genuinely useful. I use it every day.&lt;/p>
&lt;p>But here is something I noticed the longer I worked with AI-generated code: it writes to the happy path. AI is extraordinarily good at making code that works when everything goes as expected. It is considerably less reliable at writing code that stays safe when things go wrong — when someone sends unexpected input, when a dependency is compromised, when a secret accidentally surfaces in a log, when a logged-in user tries to access someone else&amp;rsquo;s data.&lt;/p></description><content>&lt;h2 id="speed-is-the-feature-unexamined-speed-is-the-liability">Speed Is the Feature. Unexamined Speed Is the Liability.&lt;/h2>
&lt;p>One of the most impressive things about using AI to write code is how fast it moves. You describe an endpoint, a data model, a feature — and within seconds you have working code. Not a sketch. Not pseudocode. Actual, runnable implementation.&lt;/p>
&lt;p>That speed is real, and it is genuinely useful. I use it every day.&lt;/p>
&lt;p>But here is something I noticed the longer I worked with AI-generated code: it writes to the happy path. AI is extraordinarily good at making code that works when everything goes as expected. It is considerably less reliable at writing code that stays safe when things go wrong — when someone sends unexpected input, when a dependency is compromised, when a secret accidentally surfaces in a log, when a logged-in user tries to access someone else&amp;rsquo;s data.&lt;/p>
&lt;p>This is not a criticism of AI models. It is a structural observation about how code generation works. AI learns from what code looks like, not from what happens to systems that run it. The attack surface is invisible at generation time.&lt;/p>
&lt;p>Security-first thinking is the discipline that fills that gap. And building it into how you work with AI is one of the highest-leverage things you can do as a developer.&lt;/p>
&lt;hr>
&lt;h2 id="what-ai-gets-wrong-by-default">What AI Gets Wrong By Default&lt;/h2>
&lt;p>Before we get to principles, it helps to see the failure modes concretely. These are patterns I started noticing after reviewing AI-generated code more carefully.&lt;/p>
&lt;p>&lt;strong>Hardcoded secrets.&lt;/strong> Ask AI to write a function that connects to a database or calls an external API, and it will often produce something like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>db &lt;span style="color:#f92672">=&lt;/span> connect(host&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;prod-db.company.com&amp;#34;&lt;/span>, user&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;admin&amp;#34;&lt;/span>, password&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Sup3rS3cr3t!&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>client &lt;span style="color:#f92672">=&lt;/span> OpenAI(api_key&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;sk-proj-abc123...&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The code works. It will also put your credentials in git history forever. A secret committed to a repository — even briefly, even to a private repo — must be treated as compromised. Git history is permanent. The only remediation is rotation.&lt;/p>
&lt;p>&lt;strong>Missing input validation.&lt;/strong> AI tends to write code that trusts request data. An endpoint that receives &lt;code>req.body.quantity&lt;/code> will often use it directly, skipping the check for whether it is a positive integer, whether it is within expected bounds, whether it contains what the code assumes it contains.&lt;/p>
&lt;p>&lt;strong>Fetch-then-check authorization.&lt;/strong> This one is subtle. AI commonly writes authorization logic like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-js" data-lang="js">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#a6e22e">order&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">await&lt;/span> &lt;span style="color:#a6e22e">db&lt;/span>.&lt;span style="color:#a6e22e">orders&lt;/span>.&lt;span style="color:#a6e22e">findById&lt;/span>(&lt;span style="color:#a6e22e">req&lt;/span>.&lt;span style="color:#a6e22e">params&lt;/span>.&lt;span style="color:#a6e22e">id&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">if&lt;/span> (&lt;span style="color:#a6e22e">order&lt;/span>.&lt;span style="color:#a6e22e">userId&lt;/span> &lt;span style="color:#f92672">!==&lt;/span> &lt;span style="color:#a6e22e">req&lt;/span>.&lt;span style="color:#a6e22e">user&lt;/span>.&lt;span style="color:#a6e22e">id&lt;/span>) &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#a6e22e">res&lt;/span>.&lt;span style="color:#a6e22e">status&lt;/span>(&lt;span style="color:#ae81ff">403&lt;/span>).&lt;span style="color:#a6e22e">send&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#a6e22e">res&lt;/span>.&lt;span style="color:#a6e22e">json&lt;/span>(&lt;span style="color:#a6e22e">order&lt;/span>);
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>That looks right. But it fetches the record first and checks ownership second. A slightly better pattern is to include the user ID in the query itself, so that non-owned records simply return null — and you return a 404, not a 403. Returning 403 confirms to an attacker that the resource exists. It is a small thing that compounds at scale.&lt;/p>
&lt;p>&lt;strong>Weak cryptography by familiarity.&lt;/strong> Ask AI to hash a password and it might reach for SHA-256. SHA-256 is a solid hash function — for data integrity. It is the wrong tool for passwords because it is fast. Fast means a GPU can test billions of candidate passwords per second against a leaked hash. bcrypt and Argon2 are deliberately slow. That slowness is the security property.&lt;/p>
&lt;p>&lt;strong>No rate limiting on authentication.&lt;/strong> AI generates login endpoints without the defensive scaffolding that should always accompany them: rate limiting per IP, account lockout after repeated failures, uniform response times to prevent user enumeration.&lt;/p>
&lt;p>None of these are exotic edge cases. They are the everyday failure modes that show up in security audits and breach post-mortems, again and again.&lt;/p>
&lt;hr>
&lt;h2 id="the-mindset-shift-from-checklist-to-first-principles">The Mindset Shift: From Checklist to First Principles&lt;/h2>
&lt;p>Here is where I want to push back against the usual framing. Security is often presented as a checklist — OWASP Top 10, compliance requirements, &amp;ldquo;use HTTPS.&amp;rdquo; Checklists have their place, but they do not produce secure code. They produce code that passes the checklist.&lt;/p>
&lt;p>Security-first thinking is different. It is a way of looking at code that asks one question at every boundary: &lt;em>who or what is being trusted here, and has that trust been earned?&lt;/em>&lt;/p>
&lt;p>Every class of vulnerability — SQL injection, XSS, CSRF, IDOR, broken authentication, insecure deserialization — reduces to a single failure: &lt;strong>untrusted data crossing a trust boundary with the authority of trusted data.&lt;/strong>&lt;/p>
&lt;p>SQL injection happens when user input is trusted to be SQL-safe before it reaches the database. XSS happens when user-generated content is trusted to be display-safe before it enters the DOM. IDOR happens when a request parameter is trusted to represent a resource the current user is allowed to access.&lt;/p>
&lt;p>Once you see security through this lens — trust boundaries and their enforcement — you stop asking &amp;ldquo;did I remember the checklist item?&amp;rdquo; and start asking &amp;ldquo;where are the trust boundaries in this code, and what enforces them?&amp;rdquo; That question applies to every system, every language, every framework. It does not go stale.&lt;/p>
&lt;p>This is what I mean by security-first thinking as a mindset rather than a procedure. It is not about knowing rules. It is about developing the habit of seeing trust assumptions in code.&lt;/p>
&lt;hr>
&lt;h2 id="the-eight-principles">The Eight Principles&lt;/h2>
&lt;p>When I worked through this with Luna recently — building a security knowledge base from 50 cybersecurity books — we distilled the trust boundary framework down to eight irreducible properties that AI-generated code must satisfy.&lt;/p>
&lt;p>I want to walk through each one because they are not independent rules. They are facets of the same underlying principle.&lt;/p>
&lt;p>&lt;strong>1. Input is untrusted by default.&lt;/strong> Every value arriving from outside your process — HTTP body, query parameters, headers, cookies, file uploads — is hostile until validated. Client-side validation is UX. Server-side validation is security. They cannot substitute for each other.&lt;/p>
&lt;p>&lt;strong>2. Output is encoded for its context.&lt;/strong> A string displayed in HTML needs HTML encoding. A value interpolated into SQL needs parameterization. A value passed to a shell command needs to go through an argument array, not string concatenation. The encoding is not about the string itself — it is about the context it will be interpreted in.&lt;/p>
&lt;p>&lt;strong>3. Secrets never live in code.&lt;/strong> Passwords, API keys, tokens, certificates — these belong in environment variables or a secrets manager, never in source files. This is absolute. Git history is permanent.&lt;/p>
&lt;p>&lt;strong>4. Authentication is verified, not assumed.&lt;/strong> Every protected route, every protected function, checks identity on that request. Being logged in at some prior point does not carry forward.&lt;/p>
&lt;p>&lt;strong>5. Authorization is checked at the data layer.&lt;/strong> Being authenticated is not the same as being authorized to access a specific resource. Ownership checks belong in the query itself, not as a post-fetch condition.&lt;/p>
&lt;p>&lt;strong>6. Least privilege is the default.&lt;/strong> Database connections, service accounts, IAM roles, file operations — each gets only the access its specific function requires. Nothing more. A compromised least-privilege component fails safely. A compromised over-privileged one does not.&lt;/p>
&lt;p>&lt;strong>7. Cryptography is never homegrown.&lt;/strong> Cipher and hash choices go to battle-tested libraries: bcrypt or Argon2 for passwords, AES-GCM for encryption, HMAC-SHA256 for message authentication. The failure modes of hand-rolled crypto are subtle and catastrophic.&lt;/p>
&lt;p>&lt;strong>8. Dependencies are trust extensions.&lt;/strong> Every package you add is code you are trusting. Its transitive dependencies are code you are trusting. Supply chain attacks are real. Lock files, audits, and version pinning are not paranoia — they are basic hygiene.&lt;/p>
&lt;p>These eight properties are not a checklist to run through at the end. They are filters to apply while generating code. The question during every code-writing session is: which of these are relevant to what I am building right now?&lt;/p>
&lt;hr>
&lt;h2 id="baking-it-into-your-ai-workflow">Baking It Into Your AI Workflow&lt;/h2>
&lt;p>Knowing principles is not the same as applying them consistently. The reason I started building infrastructure around this is that consistency requires more than intention — it requires systems.&lt;/p>
&lt;p>Here is what I built, and it came directly from the work of turning 50 cybersecurity books into a searchable knowledge base.&lt;/p>
&lt;p>&lt;strong>Tier 1 topic files.&lt;/strong> Each of the eight principles above now lives in a concise reference file — 8 to 12KB each — distilled from the source material. &lt;code>input-validation.md&lt;/code>, &lt;code>secrets-management.md&lt;/code>, &lt;code>authentication.md&lt;/code>, &lt;code>authorization.md&lt;/code>, &lt;code>cryptography.md&lt;/code>, and the others. Each file is dense but scannable: concrete patterns, code examples, anti-patterns, quick checklists.&lt;/p>
&lt;p>&lt;strong>Engineer PREFERENCES.&lt;/strong> I wired those topic files into the Engineer agent through a PREFERENCES file. The trigger table maps code categories to topic files: anything involving SQL gets &lt;code>xss-injection-prevention.md&lt;/code> loaded. Anything involving authentication loads &lt;code>authentication.md&lt;/code>. Anything involving secrets loads &lt;code>secrets-management.md&lt;/code>. The agent loads the relevant files silently before writing code and runs the associated checklist before declaring work done.&lt;/p>
&lt;p>The result is that security context is present in every relevant code-generation session without me having to ask for it. The principles are not something I have to remember to invoke. They are part of the workflow infrastructure.&lt;/p>
&lt;p>This is what I keep coming back to with PAI: the value is not in any single AI interaction. It is in building infrastructure that makes the right thing the default thing. Security-first code used to require conscious effort and specialized knowledge in the moment. Now it is loaded context — always present, reliably applied.&lt;/p>
&lt;hr>
&lt;h2 id="security-and-ai-are-not-in-tension">Security and AI Are Not in Tension&lt;/h2>
&lt;p>I want to end on this because it is easy to come away from a security conversation feeling like the message is &amp;ldquo;AI is dangerous, slow down, be careful.&amp;rdquo; That is not the message.&lt;/p>
&lt;p>AI writing code fast is a genuine capability improvement. Being able to go from specification to working implementation in minutes changes what is possible for a small team or a solo developer. That is real.&lt;/p>
&lt;p>Security-first thinking is not a constraint on that capability. It is the thing that makes the output of that capability trustworthy. Code that moves fast and ships vulnerable systems is not actually faster in any meaningful sense — it is accumulating debt that will be paid with interest.&lt;/p>
&lt;p>The combination is the point. AI that knows how to think about trust boundaries, that loads security context automatically, that applies principles rather than just patterns — that is a force multiplier, not a liability. You get the speed and you get the rigor.&lt;/p>
&lt;p>Building toward that combination is one of the more interesting engineering problems I have worked on. The knowledge base, the topic files, the wiring into the workflow — it is all aimed at the same thing: making security-first thinking something that happens automatically, not something that requires a specialist in the room.&lt;/p>
&lt;p>The specialist knowledge exists. We built it into 77KB of reference material drawn from 50 books. Now it is always in the room.&lt;/p>
&lt;hr>
&lt;p>&lt;em>Part of the PAI series on building infrastructure that makes AI more useful, more reliable, and more trustworthy. The security knowledge base and topic files referenced in this post were built using Claude Code, PostgreSQL, pgvector, and source material from O&amp;rsquo;Reilly&amp;rsquo;s security catalog.&lt;/em>&lt;/p></content></item><item><title>I Turned 50 Cybersecurity Books Into a Searchable Brain</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/i-turned-50-cybersecurity-books-into-a-searchable-brain/</link><pubDate>Sat, 21 Mar 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/i-turned-50-cybersecurity-books-into-a-searchable-brain/</guid><description>&lt;h2 id="the-problem-with-security-books">The Problem With Security Books&lt;/h2>
&lt;p>I have a lot of cybersecurity books. PDFs from Humble Bundles, O&amp;rsquo;Reilly downloads, books I&amp;rsquo;ve bought and never finished, reference material I collected &amp;ldquo;just in case.&amp;rdquo; Like most people, they lived in a folder I rarely opened.&lt;/p>
&lt;p>The reason is friction. When I needed to look something up — say, how SQL injection payloads work, or the steps for privilege escalation on Linux — I&amp;rsquo;d have to remember which book covered it, open it, and search inside. Or just Google it and hope Stack Overflow had something decent.&lt;/p></description><content>&lt;h2 id="the-problem-with-security-books">The Problem With Security Books&lt;/h2>
&lt;p>I have a lot of cybersecurity books. PDFs from Humble Bundles, O&amp;rsquo;Reilly downloads, books I&amp;rsquo;ve bought and never finished, reference material I collected &amp;ldquo;just in case.&amp;rdquo; Like most people, they lived in a folder I rarely opened.&lt;/p>
&lt;p>The reason is friction. When I needed to look something up — say, how SQL injection payloads work, or the steps for privilege escalation on Linux — I&amp;rsquo;d have to remember which book covered it, open it, and search inside. Or just Google it and hope Stack Overflow had something decent.&lt;/p>
&lt;p>That&amp;rsquo;s not a knowledge base. That&amp;rsquo;s a graveyard.&lt;/p>
&lt;p>So I built something better: a local semantic search engine over all of them, powered by PostgreSQL, pgvector, and OpenAI embeddings. Now I ask questions in plain English and get back the exact passages — with the book and chapter — that answer them. The whole thing runs locally on my machine.&lt;/p>
&lt;p>Here&amp;rsquo;s how I built it, and why it&amp;rsquo;s become one of the most useful tools in my PAI (Personal AI Infrastructure) stack.&lt;/p>
&lt;hr>
&lt;h2 id="what-semantic-search-actually-means">What Semantic Search Actually Means&lt;/h2>
&lt;p>Traditional search is keyword matching. You type &amp;ldquo;SQL injection&amp;rdquo; and it finds documents containing those exact words.&lt;/p>
&lt;p>Semantic search is different. It converts your query and your documents into vectors — lists of numbers that represent &lt;em>meaning&lt;/em> in high-dimensional space. Similar concepts cluster together regardless of exact wording. Ask &amp;ldquo;how to bypass database input validation&amp;rdquo; and you&amp;rsquo;ll surface the same SQL injection content, even though you never typed &amp;ldquo;SQL injection.&amp;rdquo;&lt;/p>
&lt;p>This matters enormously for a security knowledge base. Security concepts have dozens of names. &amp;ldquo;Privilege escalation,&amp;rdquo; &amp;ldquo;privesc,&amp;rdquo; &amp;ldquo;root access,&amp;rdquo; &amp;ldquo;vertical privilege abuse&amp;rdquo; — these all mean the same thing. Semantic search finds all of them.&lt;/p>
&lt;hr>
&lt;h2 id="the-stack">The Stack&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>PostgreSQL 17&lt;/strong> — the database&lt;/li>
&lt;li>&lt;strong>pgvector 0.8.2&lt;/strong> — vector similarity search extension for Postgres&lt;/li>
&lt;li>&lt;strong>OpenAI text-embedding-3-small&lt;/strong> — converts text chunks to 1536-dimensional vectors&lt;/li>
&lt;li>&lt;strong>CyberSecKB.ts&lt;/strong> — a custom Bun/TypeScript CLI I built to tie it all together&lt;/li>
&lt;/ul>
&lt;p>Everything runs locally. The only external call is to OpenAI&amp;rsquo;s embedding API (which runs once at ingest time, not at query time).&lt;/p>
&lt;hr>
&lt;h2 id="the-pipeline-from-pdf-to-searchable-knowledge">The Pipeline: From PDF to Searchable Knowledge&lt;/h2>
&lt;h3 id="step-1-convert-pdfs-to-markdown">Step 1: Convert PDFs to Markdown&lt;/h3>
&lt;p>Raw PDFs are terrible for text processing. I convert everything to Markdown first using a &lt;code>pdf2md&lt;/code> Python tool:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>cd ~/projects/pdf-to-markdown
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>source venv/bin/activate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Text-based PDFs (most books):&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python pdf2md input/mybook.pdf
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Image-based or scanned PDFs (use OCR first):&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ocrmypdf --force-ocr input/mybook.pdf /tmp/ocr.pdf
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python pdf2md /tmp/ocr.pdf output/mybook.md
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Move to library:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>mv output/mybook.md ~/projects/cybersecurity-library/books/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="step-2-ingest-into-the-database">Step 2: Ingest into the Database&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>TOOL&lt;span style="color:#f92672">=&lt;/span>~/.claude/skills/PAI/USER/KNOWLEDGE/CYBERSECURITY/Tools/CyberSecKB.ts
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Single book with topics tagged:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bun $TOOL ingest &lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> --file ~/projects/cybersecurity-library/books/mybook.md &lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> --title &lt;span style="color:#e6db74">&amp;#34;My Book Title&amp;#34;&lt;/span> &lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> --topics web,network,linux
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Or load everything at once:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bun $TOOL ingest --batch ~/projects/cybersecurity-library/books/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The ingest process:&lt;/p>
&lt;ol>
&lt;li>Reads the Markdown file&lt;/li>
&lt;li>Splits it into ~800-token chunks, preserving chapter headings&lt;/li>
&lt;li>Sends chunks to OpenAI&amp;rsquo;s embedding API in batches&lt;/li>
&lt;li>Stores chunks + their vector embeddings in PostgreSQL&lt;/li>
&lt;/ol>
&lt;h3 id="step-3-search">Step 3: Search&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Plain English query:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bun $TOOL search &lt;span style="color:#e6db74">&amp;#34;how do attackers bypass WAF rules for SQL injection&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Filter by topic:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bun $TOOL search &lt;span style="color:#e6db74">&amp;#34;privilege escalation&amp;#34;&lt;/span> --topics linux --limit &lt;span style="color:#ae81ff">5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Check what&amp;#39;s in the KB:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bun $TOOL list
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bun $TOOL stats
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;h2 id="what-it-looks-like-in-practice">What It Looks Like in Practice&lt;/h2>
&lt;p>Here&amp;rsquo;s a real query. I asked:&lt;/p>
&lt;pre tabindex="0">&lt;code>bun $TOOL search &amp;#34;SQL injection bypass techniques&amp;#34; --limit 3
&lt;/code>&lt;/pre>&lt;p>Result:&lt;/p>
&lt;pre tabindex="0">&lt;code>━━━ [63.3%] Web Penetration Testing With Kali Linux → Detecting and Exploiting Injection-Based Flaws
The `;` metacharacter in a SQL statement is used similarly to how it&amp;#39;s used
in command injection to combine multiple queries on the same line...
━━━ [62.5%] Web Penetration Testing With Kali Linux → Detecting and Exploiting Injection-Based Flaws
If user input is used without prior validation, and it is concatenated
directly into a SQL query, a user can inject different data...
━━━ [60.4%] Web Penetration Testing With Kali Linux → Detecting and Exploiting Injection-Based Flaws
Input taken from cookies, input forms, and URL variables is used to build
SQL statements that are passed back to the database...
&lt;/code>&lt;/pre>&lt;p>Each result shows the similarity score, book title, chapter, and a preview. I can immediately tell which book to go deeper in.&lt;/p>
&lt;p>Another query — privilege escalation:&lt;/p>
&lt;pre tabindex="0">&lt;code>bun $TOOL search &amp;#34;privilege escalation linux&amp;#34; --limit 3
&lt;/code>&lt;/pre>&lt;pre tabindex="0">&lt;code>━━━ [66.1%] Cybersecurity Attack And Defense Strategies → Privilege Escalation
Most systems are built using the least privilege concept — users are
purposefully given the least privileges they need to perform their work...
━━━ [65.9%] Kali Linux Cookbook → Privilege Escalation
CVE-2015-1328: overlayfs vulnerability affecting Ubuntu where it does not
do proper checking of file creation in the upper filesystem area...
━━━ [65.8%] Cybersecurity Attack And Defense Strategies → Privilege Escalation
On Linux, vertical escalation allows attackers to have root privileges
that enable them to modify systems and programs...
&lt;/code>&lt;/pre>&lt;p>This is the power of the system: I asked about a concept, not a keyword, and got specific, sourced, actionable results from three different books.&lt;/p>
&lt;hr>
&lt;h2 id="the-current-state-of-the-kb">The Current State of the KB&lt;/h2>
&lt;p>After the initial batch ingest:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>50 books&lt;/strong> indexed&lt;/li>
&lt;li>&lt;strong>11,757 chunks&lt;/strong> stored and embedded&lt;/li>
&lt;li>Coverage spans: penetration testing, malware analysis, forensics, identity and access, cloud security, social engineering, cryptography, threat modeling, and more&lt;/li>
&lt;/ul>
&lt;p>Some of what&amp;rsquo;s in there:&lt;/p>
&lt;ul>
&lt;li>&lt;em>Practical Malware Analysis&lt;/em> (620 chunks)&lt;/li>
&lt;li>&lt;em>Cybersecurity Threats, Malware Trends and Strategies&lt;/em> (552 chunks)&lt;/li>
&lt;li>&lt;em>Cybersecurity Attack and Defense Strategies&lt;/em> (460 chunks)&lt;/li>
&lt;li>&lt;em>Security Chaos Engineering&lt;/em> (387 chunks)&lt;/li>
&lt;li>&lt;em>Hardware Hacking Handbook&lt;/em> (378 chunks)&lt;/li>
&lt;li>&lt;em>Modern Data Protection&lt;/em> (338 chunks)&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="why-this-fits-into-pai">Why This Fits Into PAI&lt;/h2>
&lt;p>This knowledge base is part of my PAI system — Personal AI Infrastructure. The idea behind PAI is to build infrastructure that &lt;em>amplifies&lt;/em> what I can do with AI, rather than using AI one prompt at a time.&lt;/p>
&lt;p>The Security KB is a perfect example. It&amp;rsquo;s not about asking ChatGPT &amp;ldquo;explain SQL injection.&amp;rdquo; It&amp;rsquo;s about having my own curated library, chunked, embedded, and ready to surface exactly the passage I need — from books I trust, with sources I can trace back.&lt;/p>
&lt;p>When I&amp;rsquo;m working through a security challenge or studying for a certification, I can query the KB directly. Luna (my PAI assistant) can also query it as part of a larger workflow — search the KB, pull context into the prompt, and answer questions grounded in my actual library rather than generic training data.&lt;/p>
&lt;hr>
&lt;h2 id="building-it-with-claude-code">Building It With Claude Code&lt;/h2>
&lt;p>The entire CyberSecKB tool was built using Claude Code through PAI. The process:&lt;/p>
&lt;ol>
&lt;li>Described what I wanted: ingest markdown books, chunk by section, embed with OpenAI, store in pgvector&lt;/li>
&lt;li>Claude Code scaffolded the TypeScript CLI&lt;/li>
&lt;li>We hit a few real-world issues along the way:
&lt;ul>
&lt;li>The OpenAI project key needed embedding model access enabled separately&lt;/li>
&lt;li>Batch size of 2048 hit the 300k token/request limit — tuned down to 200&lt;/li>
&lt;li>The 1M tokens/minute rate limit required adding a 15-second delay between batches&lt;/li>
&lt;li>A SQL type error in the search function when no topics filter was passed&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ol>
&lt;p>Each issue was diagnosed and fixed in the same conversation. The tool went from concept to 50 books indexed in a single session.&lt;/p>
&lt;hr>
&lt;h2 id="whats-next">What&amp;rsquo;s Next&lt;/h2>
&lt;p>A few things I want to add:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Tag all books with proper topics&lt;/strong> — the batch ingest skipped topic assignment; I&amp;rsquo;ll tag each book so &lt;code>--topics web&lt;/code> or &lt;code>--topics linux&lt;/code> filters actually work&lt;/li>
&lt;li>&lt;strong>Tier 1 topic files&lt;/strong> — condensed 5-15KB reference files for the most-used topics (SQLi, XSS, privilege escalation, etc.) that load directly into context&lt;/li>
&lt;li>&lt;strong>AI Security KB integration&lt;/strong> — the AI Security research KB shares the same database; queries cross both domains automatically&lt;/li>
&lt;/ul>
&lt;p>The knowledge base is live. The friction is gone. Now the books actually get used.&lt;/p>
&lt;hr>
&lt;p>&lt;em>Built with PAI, Claude Code, PostgreSQL, pgvector, and OpenAI embeddings. All processing runs locally except the embedding API calls at ingest time.&lt;/em>&lt;/p></content></item></channel></rss>