<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Snippipedia</title>
    <description>The latest articles on DEV Community by Snippipedia (@snippipedia).</description>
    <link>https://dev.to/snippipedia</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4143544%2F80213e26-48b3-432f-b616-47ae38c0d9c5.png</url>
      <title>DEV Community: Snippipedia</title>
      <link>https://dev.to/snippipedia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/snippipedia"/>
    <language>en</language>
    <item>
      <title>Prove Your Cyber Insurance Answers: Commands for the Questionnaire Controls</title>
      <dc:creator>Snippipedia</dc:creator>
      <pubDate>Sat, 24 Oct 2026 09:55:12 +0000</pubDate>
      <link>https://dev.to/snippipedia/prove-your-cyber-insurance-answers-commands-for-the-questionnaire-controls-4344</link>
      <guid>https://dev.to/snippipedia/prove-your-cyber-insurance-answers-commands-for-the-questionnaire-controls-4344</guid>
      <description>&lt;p&gt;I swapped 2 of the usual tags (webdev, ai) for devops and startup because this piece is about infrastructure evidence. Swap back if you prefer.&lt;/p&gt;

&lt;p&gt;Someone will eventually ask you to confirm the “yes” boxes on a cyber insurance application. MFA everywhere. EDR on every host. Clean email authentication. Nothing exposed. Here’s how to produce evidence instead of opinions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters...&lt;/strong&gt; in 2022 an insurer and a manufacturer agreed to an order rescinding a cyber policy and declaring it void from inception after the insurer said MFA protected only the firewall. Evidence is the difference between a yes and a maybe.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MFA... find the accounts that break your “yes”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AWS IAM users with console passwords but no MFA-&lt;/p&gt;

&lt;p&gt;`aws iam generate-credential-report&lt;/p&gt;

&lt;h1&gt;
  
  
  wait a few seconds, then (use base64 -D on macOS):
&lt;/h1&gt;

&lt;p&gt;aws iam get-credential-report --query Content --output text | base64 -d \&lt;br&gt;
  | awk -F, 'NR&amp;gt;1 &amp;amp;&amp;amp; $4=="true" &amp;amp;&amp;amp; $8=="false" {print $1}'`&lt;/p&gt;

&lt;p&gt;That lists IAM users with a password and no MFA. It misses your identity provider, which is where most staff accounts live. Export the same view from Okta, Entra or Google Workspace. The target list length is zero.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EDR... diff the agents against the inventory&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Insurers care whether EDR is on every server, including the forgotten ones-&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sort -u assets.txt &amp;gt; a.txt&lt;br&gt;
sort -u edr-agents.txt &amp;gt; e.txt&lt;br&gt;
comm -23 a.txt e.txt   # in inventory, missing from EDR&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Anything printed is a host your “yes” doesn’t cover.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Email authentication... anyone can check it, including the carrier&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Underwriters look for SPF, DKIM and DMARC, with DMARC set to reject.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;dig +short TXT _dmarc.example.com   # want p=reject&lt;br&gt;
dig +short TXT example.com | grep -i spf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exposed remote access... scan only what you own&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An analysis of published carrier forms says Beazley asks whether RDP is exposed to the internet.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# only scan IP ranges you own or are authorized to test&lt;br&gt;
nmap -Pn -p 3389,445,5900 203.0.113.10&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backups... keep a restore log&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A nightly job isn’t evidence. A dated restore is.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;echo "$(date -u +%FT%TZ) restore-test db=orders result=ok" &amp;gt;&amp;gt; restore-log.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Package it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One folder per control, one dated export per answer, one owner per folder. Begin about 90 days before renewal and reconcile every answer with evidence. When the broker’s questionnaire arrives, your answers already exist.&lt;/p&gt;

&lt;p&gt;Not legal advice. Ask your broker and a coverage lawyer about rescission rules in your state. Disclosure: I do security consulting at &lt;a href="//www.snippipedia.com"&gt;Snippipedia&lt;/a&gt;).&lt;/p&gt;

</description>
      <category>security</category>
      <category>cybersecurity</category>
      <category>devops</category>
      <category>startup</category>
    </item>
    <item>
      <title>Prompt Injection vs SQL Injection: What Transfers, What Doesn't</title>
      <dc:creator>Snippipedia</dc:creator>
      <pubDate>Sun, 11 Oct 2026 00:06:39 +0000</pubDate>
      <link>https://dev.to/snippipedia/prompt-injection-vs-sql-injection-what-transfers-what-doesnt-2765</link>
      <guid>https://dev.to/snippipedia/prompt-injection-vs-sql-injection-what-transfers-what-doesnt-2765</guid>
      <description>&lt;p&gt;If you write backend code, you know the SQL injection fix by heart. Here’s the same bug twice, then what carries over to LLM features and what doesn’t.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Same bug, two languages&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1- # Vulnerable: input becomes part of the command&lt;br&gt;
cur.execute(f"SELECT status FROM orders WHERE email = '{email}'")&lt;/p&gt;

&lt;h1&gt;
  
  
  Fixed: command and data travel separately
&lt;/h1&gt;

&lt;p&gt;cur.execute("SELECT status FROM orders WHERE email = %s", (email,))&lt;/p&gt;




&lt;p&gt;2- # Same shape. No placeholder syntax exists for this one.&lt;br&gt;
prompt = f"""You are a support assistant. Only discuss order status.&lt;/p&gt;

&lt;p&gt;Customer message:&lt;br&gt;
{user_message}&lt;/p&gt;

&lt;p&gt;Knowledge base excerpts:&lt;br&gt;
{retrieved_chunks}&lt;br&gt;
"""&lt;br&gt;
reply = llm.generate(prompt)&lt;/p&gt;




&lt;p&gt;There’s no bind parameter for the second block. Chat APIs separate system and user roles, and that helps the model prioritize, but it’s trained behavior, not an enforced boundary. The UK NCSC’s December 2025 write-up says the same thing from the other direction: no inherent distinction between data and instruction, so prompt injection may never be fully mitigated the way SQL injection can be.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What carries over from the SQLi playbook&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;3 habits transfer directly. Give the “database user” (here, the tools) the minimum rights. Treat everything the model emits as untrusted. And never derive authorization from a claim the model makes.&lt;/p&gt;

&lt;p&gt;from pydantic import BaseModel, Field&lt;/p&gt;

&lt;p&gt;class OrderStatusArgs(BaseModel):&lt;br&gt;
    order_id: str = Field(pattern=r"^[A-Z0-9]{8}$")&lt;/p&gt;

&lt;p&gt;ALLOWED_TOOLS = {"get_order_status"}  # read-only&lt;/p&gt;

&lt;p&gt;def run_tool(call, session):&lt;br&gt;
    if call.name not in ALLOWED_TOOLS:&lt;br&gt;
        raise PermissionError(f"tool not allowed: {call.name}")&lt;br&gt;
    args = OrderStatusArgs.model_validate(call.arguments)&lt;br&gt;
    # identity comes from the session, never from model output&lt;br&gt;
    return get_order_status(&lt;br&gt;
        customer_id=session.customer_id,&lt;br&gt;
        order_id=args.order_id,&lt;br&gt;
    )&lt;/p&gt;

&lt;p&gt;OWASP’s advised mitigations point the same way: limit which tools an agent can use, what each tool can do, and what permissions it holds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A cheap tripwire (not a fix)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;import secrets&lt;/p&gt;

&lt;p&gt;CANARY = f"cnry-{secrets.token_hex(6)}"  # generate per deployment, keep in config&lt;br&gt;
SYSTEM_PROMPT = f"...internal ref {CANARY}..."&lt;/p&gt;

&lt;p&gt;def check_output(text: str) -&amp;gt; str:&lt;br&gt;
    if CANARY in text:&lt;br&gt;
        alert("system prompt leak")  # log it and block the response&lt;br&gt;
        return "Sorry, I can't help with that."&lt;br&gt;
    return text&lt;/p&gt;

&lt;p&gt;This only catches verbatim leaks. An attacker who asks for a paraphrase or an encoding walks right past it. Use it as detection, never as protection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test it like the attacker gets to iterate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In NIST’s agent hijacking tests, the strongest standard attack succeeded 11% of the time, while attacks tailored to the target hit 81%. In “The Attacker Moves Second,” researchers from OpenAI, Anthropic, and Google DeepMind broke 12 published defenses with adaptive attacks, most above 90% success, though most had reported near-zero originally. Each defense used its own benchmark, so read the numbers as directional.&lt;/p&gt;

&lt;p&gt;A static payload list in CI is fine as a regression check. It isn’t evidence your system is safe.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A design budget- the Rule of 2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Meta’s Agents Rule of 2 says that within one session an agent should satisfy no more than 2 of 3 properties: processing untrusted input, accessing sensitive systems or private data, and changing state or communicating externally. If a feature needs all three, that’s the one to put a human approval step in front of.&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>ai</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Post-Quantum Cryptography Migration- A Practical Starting Point for Developers</title>
      <dc:creator>Snippipedia</dc:creator>
      <pubDate>Sat, 03 Oct 2026 12:21:34 +0000</pubDate>
      <link>https://dev.to/snippipedia/post-quantum-cryptography-migration-a-practical-starting-point-for-developers-158b</link>
      <guid>https://dev.to/snippipedia/post-quantum-cryptography-migration-a-practical-starting-point-for-developers-158b</guid>
      <description>&lt;p&gt;Most production stacks are running RSA and ECC in a dozen places the developer didn't consciously choose — a cloud provider default, an npm package, a library that made the decision years ago. NIST finalized FIPS 203 (ML-KEM), FIPS 204 (ML-DSA), and FIPS 205 (SLH-DSA) in August 2024. These are your drop-in replacements. Where to start-&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Find your RSA/ECC surface area&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;//Scan your codebase for explicit RSA/ECC references&lt;br&gt;
grep -r "RSA|EC|elliptic|rsa|ecdsa|ecdh" ./src --include="&lt;em&gt;.js" --include="&lt;/em&gt;.ts" --include="*.py"&lt;/p&gt;

&lt;p&gt;// Check your package.json for crypto-heavy deps&lt;br&gt;
cat package.json | grep -i "crypto|jose|jwt|tls|ssl"&lt;/p&gt;

&lt;p&gt;Beyond your own code: check your JWT signing algorithm (RS256 = RSA, ES256 = ECC — both need migration eventually), your TLS certificate type (EC cert vs RSA cert), your cloud provider's key management service configuration, and your S3 or blob storage encryption settings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Check library support&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;OpenSSL 3.x supports hybrid PQC in experimental mode. BoringSSL (used by Chrome, Node.js) has ML-KEM support in active development. For Node.js specifically, the node:crypto module currently follows OpenSSL — watch the OpenSSL PQC roadmap for your version.&lt;/p&gt;

&lt;p&gt;For AWS: KMS now supports ML-KEM key agreement in preview regions. GCP Cloud KMS has a PQC roadmap published. Check your region's support before planning migration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Hybrid mode first, not big-bang&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;NIST recommends running classical and post-quantum algorithms in parallel during the 2025–2027 migration window. For TLS, this means negotiating ML-KEM where both sides support it and falling back to X25519 where they don't. Most modern TLS implementations support hybrid key exchange via config flags — no code changes required for the negotiation layer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Prioritise by data lifespan&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Health records, financial data, legal documents, anything with a 5-10 year sensitivity window — migrate these encryption paths first. Session tokens and short-lived auth data can wait. This is about making rational risk-based decisions, not panicking and rebuilding everything.&lt;/p&gt;

&lt;p&gt;Full business-level context and the SMB checklist at &lt;strong&gt;&lt;a href="https://www.snippipedia.com/articles/post-quantum-cryptography" rel="noopener noreferrer"&gt;Here&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>cryptography</category>
      <category>cybersecurity</category>
    </item>
  </channel>
</rss>
