SShortSingh.
Back to feed

Popular PostgreSQL masking tool pg_anon misses non-English PII columns by default

0
·1 views

A developer testing TantorLabs' pg_anon tool on a Chilean PostgreSQL database found that it correctly identified only 1 of 8 personal data columns — the email field — because its built-in detection rules are written for English-language schemas. Columns with Spanish names such as nombre, apellido, telefono, and rut passed through unmasked, with no error or warning from the tool. The tool works by matching column names against English regex patterns, then scanning data values for recognisable formats, but it has no rules for non-English national ID formats like Chile's RUT, Brazil's CPF, or India's Aadhaar. The developer resolved the issue by writing a custom meta-dictionary with Spanish column-name rules and a RUT-specific regex, raising detection from 1 of 8 to 8 of 8 with no false positives. The custom Spanish rules have been published in a public repository called pg-anon-rules-es so other developers working with non-English schemas can avoid starting from scratch.

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 ·

LLM Load Testing Can Cost Thousands With No Native Test Mode From Providers

Engineering teams building on LLM APIs face steep costs when running load tests, as every call to a live endpoint consumes real compute and burns real budget. A scenario with 1,000 concurrent users making three LLM calls each can generate 1.8 million API calls in just 10 minutes, resulting in bills that are hard to justify internally. The problem worsens with tool-augmented calls — web search tools can inject 30,000 to 40,000 extra tokens per call, often doubling actual costs versus initial estimates. No major LLM provider currently offers a native test mode that exercises the HTTP stack without running inference, leaving teams to rely on imperfect workarounds. Common alternatives include local proxy stubs and recorded traffic replay, each offering cost savings but failing to fully replicate real provider behavior such as rate limiting.

0
ProgrammingDEV Community ·

How AI Agents Scale from $5.70 Prototypes to Production-Grade Systems

Building reliable AI agents requires architectural decisions that hold up under real-world load, not just weekend hackathon demos. Engineers working under tight cost constraints — as low as $5.70 per month — are often forced to adopt disciplined patterns early, such as stateless design and aggressive caching. Stateless agents, where all context is passed per request, scale linearly and limit failure to individual requests rather than entire sessions. Intelligent caching of queries and tool results can cut API costs by 70–90%, making it a core architectural choice rather than an afterthought. As usage grows from dozens to millions of requests, systematic error handling, observability, and circuit breakers become essential to prevent cascading failures across dependent services.

0
ProgrammingDEV Community ·

Why Inverse Problems in Machine Learning Are Fundamentally Harder to Solve

In machine learning, most models follow a forward direction — taking an input and predicting an output — but inverse problems reverse this by inferring possible inputs from an observed result. Unlike forward problems, inverse inference is inherently ambiguous because a single observation can be consistent with multiple underlying causes. This means the goal is not to reverse a function but to reason over a distribution of plausible solutions. Common examples include reconstructing high-resolution images from low-resolution ones, inferring full images from partial data, and colorizing grayscale images. This structure links inverse problems closely to conditional generative modeling, where an observation acts as a condition and the model must generate data consistent with it.

0
ProgrammingDEV Community ·

Common File Formats Like JSON, CSV, and YAML Pose Prompt Injection Risks for AI Agents

Security researchers and published CVEs from 2025 have confirmed that standard data formats such as JSON, CSV, and YAML offer no protection against prompt injection attacks targeting AI coding agents. Because large language models process decoded string values rather than raw format structures, malicious instructions embedded in data fields are indistinguishable from legitimate content. Tools including GitHub Copilot, Cursor, and Microsoft 365 Copilot have been found vulnerable, with the AIShellJack framework reporting attack success rates of 41–84% against models like GPT-4o and Claude 3.5 via config file injection. YAML's multiline string support presents an additional risk, as embedded newlines can create false system-message boundaries within the LLM context. Detection rules for structured data injection have been adopted by Microsoft AGT, Cisco AI Defense, and OWASP, and the attack class is now formally catalogued under OWASP LLM01:2025.

Popular PostgreSQL masking tool pg_anon misses non-English PII columns by default · ShortSingh