v0.4.0
Security hardening, untrusted-data tagging, and engine unification.
- Added
_data_origin: untrusted_spreadsheetfield to all structured JSON responses — provides per-call provenance context for agent consumers acrossread,search,probe,overview,inspect,format --read,export --format json, andvba - Added
--json-envelopeflag toexport— wraps CSV and Markdown stdout in a JSON envelope with_data_originfor agent pipelines that need provenance on all output formats - Added automatic VBA security pre-check before every macro execution — macros with
risk_level=highare blocked and raiseMacroBlockedError; use--allow-riskyto override when the file source is explicitly trusted - Added extension gate to
vba --run— macro execution now requires.xlsmor.xlsb; plain.xlsxfiles are rejected with a structured error - Added macro name validation to
vba --run— rejects names containing path separators or shell meta-characters - Added XXE protection —
defusedxml.defuse_stdlib()is activated at import time, hardening all stdlib XML parsers used by openpyxl and oletools against entity expansion and DTD retrieval attacks - Fixed chart export filename sanitisation — strips path separators and
..sequences to prevent path traversal via crafted chart names - Fixed
copy_formatting()missing the writable-extension guard (now consistent withwrite_cells()andapply_formatting()) - Fixed
ASPOSE_LICENSE_DATAwarning — now emitted on env-var presence, even whenASPOSE_LICENSE_PATHtakes precedence, since the env var remains visible in process listings - Unified engine auto-detection order across
objects,recalc, andscreenshot— priority is now consistently Aspose → Excel → LibreOffice via a sharedresolve_engineutility - Added 26 security regression tests covering data-origin tagging, VBA gates, and credential warning behaviour
- Added lint-and-test CI gate before PyPI publish; pinned all GitHub Actions to immutable commit SHAs