SShortSingh.
Back to feed

How to Safely Sandbox AI Agents That Execute Code on Your Infrastructure

0
·4 views

AI agents that execute code pose a distinct security risk because the code they run is neither from a trusted developer nor a direct attacker, but from a model that may have ingested attacker-controlled content. The three main threat vectors are accidental damage, indirect prompt injection via poisoned text the agent reads, and direct abuse by users running arbitrary code on your systems. Indirect prompt injection is considered the most design-critical threat, as malicious instructions and legitimate data arrive through the same channel, making model-level refusals unreliable. A hardened Docker configuration — disabling networking, enforcing read-only filesystems, dropping all capabilities, limiting resources, and running as an unprivileged user — forms the core defense strategy. Notably, real-world container escapes like CVE-2019-5736 demonstrate that containers sharing a host kernel are not inherently secure, making regular patching and stronger isolation essential for genuinely untrusted workloads.

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 ·

Interpolation, GANs or Diffusion: Choosing the Right Image Upscaling Method

Every image upscaling method works by generating new pixel data that was never in the original image, since resolution limits mean lost detail is permanently unrecoverable. Interpolation methods like bicubic and Lanczos are fast and deterministic, inventing only smooth transitions but producing soft or ringed results. Learned feed-forward models such as ESRGAN invent textures based on their training data, but fail when the input degradation does not match what they were trained to reverse. Diffusion-based refiners go furthest, generating entirely new content guided by a prompt, offering the most visually convincing output at the cost of faithfulness to the source. The right choice depends on whether the output must serve as evidence of the original input or simply needs to look plausible.

0
ProgrammingDEV Community ·

Image dimensions, not file size, determine AI vision API token costs

When sending images to AI vision APIs, the number of input tokens charged depends entirely on an image's pixel dimensions, not its file size or compression level. This is because providers decode images to a raw pixel grid before processing, meaning a 40 KB JPEG and a 4 MB PNG of identical dimensions cost exactly the same. Each major provider uses its own formula: OpenAI tiles images into 512×512 patches after resizing, Anthropic applies a straightforward area-divided-by-750 calculation, and Google uses a flat 258-token tile system with a sharp cost jump above 384 pixels per side. The most effective way to reduce costs is resizing images before upload, since compressing files more aggressively only saves bandwidth, not tokens. These formulas were accurate as of August 2026 based on each provider's own documentation, but should be verified before use as rates and rules can change.

0
ProgrammingDEV Community ·

Solo Developer Builds Vinyl and Hi-Fi Community Platform Using AI Tools

A solo developer has launched El Club del Vinilo, a Spanish-language website combining a vinyl and Hi-Fi magazine, music discovery features, and a user community for sharing collections and setups. The platform includes a section called Café Concierto, which organises hundreds of live concert videos by genre, and a floating music player that lets visitors listen without leaving the page. The developer used AI tools including Claude to assist with coding, debugging, and feature design throughout the build process. While AI accelerated development significantly, the creator notes that core decisions about product direction and user experience still required human judgment. The project is presented as a case study in how much a single developer can now build independently using modern AI-assisted development tools.

0
ProgrammingDEV Community ·

Why AI Image APIs Block Harmless Requests and How to Diagnose Refusals

AI image generation APIs use multiple independent filtering layers — including prompt classification, input image screening, and output classification — each of which can block a request for different reasons. Latency is a useful free diagnostic, since an instant refusal points to a text classifier while a slow one suggests the image was generated before being flagged. Certain benign content categories, such as medical illustrations, art history references, kitchen tools, and historical imagery, are frequent false-positive triggers because they sit close to restricted content in a classifier's feature space. Developers are advised to log refusal times, error codes, and category distributions to better understand patterns specific to their product. Importantly, if a request genuinely violates a provider's policy, finding alternate phrasing to bypass filters still constitutes a terms-of-service violation.