prompt injection

All posts tagged prompt injection by Linux Bash
  • Posted on
    Featured Image
    Your Bash prompt runs code on every render, so unsafe PS1/PROMPT_COMMAND snippets can leak secrets, be hijacked by crafted dirs/branches, or slow your terminal. This guide shows how to harden it: prefer built-ins, sanitize untrusted text (PWD/VCS), pin absolute paths, move logic to safe PROMPT_COMMAND (array, no eval), keep root ultra-minimal, and use packaged frameworks (e.g., Starship). Includes copy-paste Bash and a quick audit checklist.
  • Posted on
    Featured Image
    Guide to hardening a RAG stack with standard Linux tools, detailing risks across ingest, index, retrieve, and generate, then delivering five copy‑paste steps: gate/scan/redact corpus with ACLs; sandbox embeddings/retrieval via firejail; deny‑by‑default egress with nftables; safe Bash wrappers for file/HTTP plus retrieval budgets; and provenance via SQLite hashes and GPG signatures—yielding auditable, least‑privilege RAG.
  • Posted on
    Featured Image
    Practical guide to harden Linux AI agents with least‑privilege, OS‑level controls and copy‑paste Bash: sandbox with Podman or bubblewrap, enforce default‑deny outbound egress via nftables, load secrets at runtime with sops/age, detect prompt injection and data leaks using canaries/lints, and log/audit with auditd and systemd—complete with apt/dnf/zypper installs—so injected pages can’t exfiltrate keys.