SShortSingh.
Back to feed

npm package bug let LLM-approved DB updates silently overwrite unreviewed columns

0
·1 views

A developer building a tool to let language models propose and human-approve SQL UPDATE statements discovered a critical verification flaw in version 0.4.0 of the open-source npm package @hyuga/llm-safe-sql. The approval card correctly showed only the column being changed, but the underlying apply logic used that same display-only list to verify row state before writing — meaning columns written by the SQL statement but absent from the display were never checked. In a test scenario, a postcode column was altered by a separate query between approval and execution, yet the apply step proceeded silently with no warning, effectively overwriting the intervening change. The root cause was conflating two distinct sets: columns whose values change versus all columns the SQL statement touches. Version 0.4.2 fixes the issue by introducing a separate 'covered' set for verification, causing the apply step to refuse execution and prompt a fresh plan when any written column has changed since approval.

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 ·

Transformers 5.15.0 and Meta Muse Glimmer Lead Latest AI Releases

A review of eleven recent AI and agent updates found only two meeting a strict 36-hour recency threshold. Meta Muse Glimmer is a roughly 30-billion-parameter multimodal model released under Apache 2.0, designed for agentic workloads with 4-bit weights reportedly under 20 GB. Hugging Face's Transformers 5.15.0 adds support for Muse Glimmer, FSDP plans across 94 causal-LM classes, batched Omni audio generation, and Tekken tokenizer support. The update also introduces notable breaking changes, including opt-in kernels for linear-attention families and revised cache-cropping behavior using negative offsets. Six additional tools — including SGLang 0.5.17, Anthropic Python SDK 0.121.0, and Pydantic AI 2.27.0 — are flagged for a broader 72-hour watchlist pending further verification.

0
ProgrammingDEV Community ·

Engineering Team Shrinks 190 GB Production Database to 45 GB Before Cloud Migration

A software team reduced a production database from 190 GB to 45 GB in a single overnight maintenance window ahead of a cost-sensitive cloud migration. Initial measurements revealed that only 106.7 GB of the 190.6 GB allocated was actually in use, meaning 84 GB was simply unreclaimed empty space from past growth spikes. The team found that the largest storage offenders were not high-row-count tables but blob-heavy tables with relatively few rows, including one configuration table consuming 13 GB across just 21,000 rows. To prevent the transaction log from overwhelming available disk space during bulk deletions, the database was temporarily switched from full to simple recovery mode, keeping log size stable at 6.5 GB throughout the three-hour operation. The team documented six key lessons, emphasizing the importance of measuring allocated versus used space and ranking tables by size in megabytes rather than row count before planning any cleanup.

0
ProgrammingDEV Community ·

How to Secure Your Software Supply Chain With SBOMs, Signing, and SLSA

Most production code consists of third-party dependencies that are trusted by default, making the software supply chain a prime attack vector, as seen in incidents like SolarWinds and the xz backdoor. A Software Bill of Materials (SBOM) provides a machine-readable inventory of every component in a software artifact, enabling faster vulnerability assessment when new CVEs emerge. Code signing and provenance verification — facilitated by tools like Sigstore — help confirm that artifacts are genuine and unmodified throughout the build process. The SLSA framework offers a tiered maturity model for hardening build pipelines, while least-privilege CI practices and dependency hygiene further reduce exposure. Shifting security checks as early as possible in the pipeline — ideally at pull-request stage — significantly reduces the cost and impact of discovering vulnerabilities later in production.

npm package bug let LLM-approved DB updates silently overwrite unreviewed columns · ShortSingh