
Limiting Alias Expansion in a YAML Parser Across Languages
Where each parser sets its alias limit: SnakeYAML options, Go's built-in check, Ruby's aliases flag, DuckDB's node budget and a PyYAML guard, all tested.
Everything you need to level up your coding skills.

Where each parser sets its alias limit: SnakeYAML options, Go's built-in check, Ruby's aliases flag, DuckDB's node budget and a PyYAML guard, all tested.

A 40-line guard for accepting YAML uploads: size cap, UTF-8, safe parsing, expanded-size and depth limits, then key checks. Ten test inputs and what each did.

Check an Excel upload before parsing: size, name, zip signature, required parts, macro parts, sheet names and header row, in a fixed order with clear errors.

Read password protected Excel files from a script with msoffcrypto-tool, tell file encryption from sheet protection, and keep passwords out of code and logs.

What to do when a token lands in a values or config YAML: removing it from the file leaves it in history, gitleaks finds it, and rotation is the real fix.

Stop zip bombs and oversized xlsx uploads with limits on file size, entry count, expansion ratio and rows, enforced before parsing and sized from real files.

Open untrusted Excel files in a sandboxed worker with no network, memory and time limits, a read-only parser and no desktop Excel, then load results as data.

Which function to call in PyYAML, Ruby Psych and SnakeYAML to load untrusted YAML safely, what each default does and how to grep for the unsafe ones.

Remove personal data from an Excel file before sharing: drop author properties, mask or delete columns, clear comments and rebuild a clean copy by script.

Find hidden sheets, document properties, comments, defined names and pivot caches in a workbook before you share it, with a script that audits the file.

Compare xlsx, xlsm, xls and xlsb for data work, and set a policy that blocks macros by default while allowing reviewed exceptions with a real owner.

Build a 378-byte YAML document that expands to 34 MB, measure PyYAML, DuckDB and Go on it, and see which parsers fail early and which wait for the output.
We send one email when a new article is published. No spam.