SShortSingh.
Back to feed

Why AI Agent Tools Need Least-Privilege Design: Read-Only Defaults and Scoped Credentials

0
·7 views

A DEV Community article argues that an AI agent's security depends on the most powerful tool it can invoke, especially when it reads untrusted text. It describes a common failure in which an email integration with broad OAuth permissions and a generic HTTP tool let a hidden prompt-injection instruction trigger data forwarding and deletion. The author contends that system prompts are not a security boundary, while OAuth scopes are enforced facts. Common flaws include tools mirroring whole integrations, shared long-lived credentials, unfiltered tool output, and writes without checkpoints or audit logs. The proposed remedy is a deterministic tool gateway that treats the model as an untrusted planner, defaults to read-only access, uses scoped short-lived credentials, and restricts arguments.

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 ·

Using SSIM in Python to measure how much an image edit changed

A developer guide explains how to quantify image edits using the structural similarity index (SSIM) from scikit-image. The approach yields both an overall similarity score and a mask highlighting which regions differ between the original and edited versions. The article provides a Python script that loads and compares the images at matching sizes, then saves a changed-areas map and reports the bounding box and percentage of altered pixels. It includes a reference table interpreting SSIM ranges, from tiny local edits to substantially different images. Practical caveats are noted, such as resizing mismatches, the effect of JPEG compression noise, and the value of grayscale comparison for structural checks.

0
ProgrammingDEV Community ·

Penny-exact HOA special assessment allocation benchmarked in JavaScript

A developer published a method for splitting HOA special assessments to the exact cent, using a $1,000.01 project with three equally liable units as an example. Their largest-remainder approach gives one unit an extra cent so totals balance, and it can also apply reserve funds while keeping each reserve credit within its unit's gross share. The same logic handles weighted splits such as ownership percentages or square footage. The article also covers installment interest rounding, a discount for upfront payment, and a late-fee policy with a grace period and cap. The code is MIT-licensed and runs on Node.js 20 or later, with fixtures and timed benchmarks included.

0
ProgrammingDEV Community ·

Printing CSV Labels on a ZPL Printer via Python and TCP Port 9100

A DEV Community article explains how to print labels on ZPL-compatible printers by sending raw ZPL commands over TCP port 9100 to the printer's IP address, without a driver. It provides a short Python script that reads a CSV file and prints one label per row using a ZPL template. The author describes the ZPL syntax used, including field positioning, fonts, and Code 128 barcodes. Common pitfalls are noted, such as control characters like ^ and ~ breaking labels, non-Latin text font limitations, connection and port issues, and label size configuration. The article also promotes the author's commercial Windows app, ZebraSheet, which offers similar printing with a GUI, and admits the ZPL has been checked only with a preview renderer, not a physical printer.

0
ProgrammingDEV Community ·

Chrome extension requests broad site access; developer details what its code actually reads

A developer of TaskBoost, a Chrome companion for filing Linear issues, acknowledges its manifest requests permission to read and change data on all websites. They argue narrower alternatives like activeTab-only access, per-site optional permissions, or a popup-based design would undermine the tool's core hotkey-driven workflow. The content script, they say, is a 483-line file that stays dormant until invoked, reading only one cached storage flag on load. When triggered, it extracts just the selected text, page title, URL, description meta tags, and canonical URL, and avoids forms, cookies, storage, and full-page text.