SShortSingh.
Back to feed

Prompt injection is a permissions problem, not just a detection one

0
·2 views

An AI agent that can call tools may take an action dictated by text hidden in a document, email, or web page, a technique known as prompt injection. The article argues that model-based filters that flag malicious text are useful as one layer but cannot be relied on as the sole safeguard, since they miss some attacks unpredictably. Instead, the proposed approach focuses on limiting what a compromised agent can reach: refusing tools not on its approved list, enforcing organisation-set risk classes, and requiring human approval tied to specific calls. Credentials are kept in an encrypted vault that the model never sees, and every decision is written to a signed, chained ledger. The author reports that recording each decision takes about 19 microseconds on their runtime.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

FSCSS 1.2.3 Adds Derived Arrays for Reusing Method Output as Collections

FSCSS array methods such as .reverse, .list, and .length return strings rather than array objects, and they cannot be chained. Version 1.2.3 introduces derived arrays, where a new @arr declaration takes a method's output and resolves it into a proper array that can be indexed, looped over, and derived from again. The approach is illustrated with examples such as reversing a color list, building 1-based index sequences sized to a source array, and appending items with the mutation operator. The guidance recommends declaring a new array step whenever a result needs to be reused, since chaining is unsupported. The author notes that derived arrays add no new runtime type but make method results dependable for practical module patterns.

0
ProgrammingDEV Community ·

Hardening Local Reverse Proxies for AI Agent Sidecars and MCP Tools

Developers running MCP servers, local vector databases, and AI coding agents often expose many localhost services through reverse proxies such as Nginx, Caddy, or Traefik. A common docker-compose mistake maps ports to 0.0.0.0, which lets any device on the same local network reach internal agent tooling. Binding explicitly to 127.0.0.1 closes that exposure. The article also warns of DNS rebinding attacks, where a malicious site can use a rebound DNS record to make a browser send requests to local endpoints, and recommends strict Host header whitelisting as a defense. Blocking path traversal and access to sensitive dotfiles at the proxy layer is also advised.

0
ProgrammingDEV Community ·

Storing Money in Code: Integer Cents Versus Decimal Types

This lecture is aimed at developers who need to store prices, total carts, split bills, or convert currencies without losing a cent. It demonstrates that binary floating-point errors corrupt amounts: int(19.99 * 100) yields 1998 instead of 1999, and the same flaw appears in JavaScript and SQLite. The recommended approach is to store amounts as integer counts of each currency's minor unit, such as 1999 for 19.99 USD, which keeps arithmetic exact across languages and databases. Because minor-unit counts differ by currency (JPY and KRW have none, USD and EUR have two, BHD has three), the author found that locale formatters and runtime libraries disagree, so developers should maintain their own currency table. A small Python converter is provided that parses text with Decimal and rejects input with more decimal places than the currency allows.

0
ProgrammingDEV Community ·

AI-Suggested npm Package Didn't Exist, Exposing 'Slopsquatting' Risk

AI assistants sometimes recommend installable packages that do not exist, and attackers can exploit this by registering those names and publishing malicious code. This practice, called slopsquatting, was seen with a fabricated package named react-codeshift, which appeared in over 200 GitHub files after AI-generated instructions cited it. Security researcher Charlie Eriksen of Aikido registered the name first on January 14, 2026, as a harmless placeholder, though it still draws dozens of downloads weekly. The article demonstrates that npm lifecycle scripts like postinstall can execute automatically during installation, even without importing the package. It recommends checking a package's existence, age, and download count in the registry before installing anything an AI suggests.