v0.2.272026-11-12
Greenmask 0.2.27
Security
fix: update pgx to 5.12.0 for GHSA-95fj-3fxw-g62g: a connection that relies on requireauth or channel_binding=require without sslmode=verify-full could accept a server that skips authentication #551
* fix: update golang.org/x/crypto to 0.58.0 (denial of service in ssh, used by the SSH storage) and golang.org/x/net to 0.62.0 (HTTP/2, used by the Azure storage) #557
* fix: build with Go 1.26.11, which distrusts compromised intermediate certificates in crypto/x509
Changes
Columns that could be left unmasked
fix: RealAddress dumped the columns after a NULL keepnull column unmasked #509
fix: Dict with failnot_matched: false and no default replaced an unmatched value with the original data #510
* fix: in a table with a custom transformer, a when condition was evaluated while the previous transformer was still writing the row, so a transformer could run on the wrong rows #523
Features
feat: add common.timezone (COMMONTIMEZONE), the time zone in which dump and validate read timestamptz values, UTC by default. pgx 5.11 and later would otherwise read them in the time zone of the machine. External transformers built with the new pkg/toolkit use it too #551
* feat: validate reports a missing column in a when condition; the dump used to fail on the first row #524
feat: RandomMac gets keepnull #512
Fixes
* fix: numeric values with more than 10000 digits after the decimal point failed to decode after the shopspring/decimal update
* fix: RandomDate and RandomUnixTimestamp depended on the time zone of the machine and could leave the range; truncate to milliseconds and microseconds did nothing; RandomUnixTimestamp mixed up units #532
* fix: NoiseDate ignored a static min and max alone, made the time part of ratios 1000 times larger and rejected equal ratios #530
* fix: template functions randomInt and randomString excluded max, randomString used only part of the symbols, and equal bounds panicked #520
* fix: Template and TemplateRecord panicked on an unknown column, ignored validate and broke .DecodeValue #515
fix: Json ignored errornot_exist for a static value, wrote invalid JSON for NULL input and lost precision of static numbers #519
fix: RandomCompany with engine: hash gave different companies for the same value; keepnull was ignored with the random engine #514
* fix: Masking counted bytes instead of characters and could write invalid UTF-8 #518
* fix: RandomIp generated addresses outside a subnet with host bits or a leading zero byte #517
* fix: RandomEmail rejected RFC 5322 characters in the original local part #537. Closes #536
* fix: RandomString, RandomChoice and RandomMac panicked on invalid parameters or NULL #511 #513 #512
* fix: RandomCCNumber no longer accepts int4, which cannot hold its output #527
* fix: Hash accepts sha3-256 #529
fix: Replace and RegexpReplace can be used with applyfor_references #526
* fix: correct NOT NULL warnings for HashedPassword, Dict and RandomChoice #528
* fix: a dynamic parameter default for NULL could change between rows #525
* fix: RandomPerson read one generator byte more than it requested; output is unchanged #516
* fix: subset with polymorphic virtual references could drop valid rows #538. Closes #396
* change: pgx 5.11 parses postgres:// connection URIs exactly as libpq does, see the pgx changelog #551
Documentation and build
docs: document install.sh, validation severities, when exceptions and keepnull defaults #508
* chore: configure Dependabot and update GitHub Actions and Go dependencies #539 #540 #541 #542 #543 #544 #545 [#553](https://github.com/GreenmaskIO/greenma
v0.2.262026-10-23
Greenmask 0.2.26
Changes
* feat: add --diff-mode=summary to the validate command. It compares the same rows as --diff but prints only counts per table and column — changed, unchanged and NULLs kept — with no original or transformed value and no primary key. This makes validate usable where production data may be read but must not be shown, such as kept CI logs, a shared terminal or an AI agent's transcript. Text and --format=json output are supported #495 #503
feat: the summary warns when a transformed column keeps more than --diff-unchanged-threshold percent of its non-NULL values (default 90, 100 turns it off), which usually means a no-op transformer, and when a column changed although no transformer affects it. These are validation warnings: they print with --warnings or --strict, have a hash that can go into resolvedwarnings, and --strict exits non-zero on an unresolved one. The hash ignores row counts, so it stays the same when --rows-limit, the data or the threshold change #503
* fix: make the gender chosen by RandomPerson reproducible across runs. The list of genders was built from a map, so its order changed between runs and the deterministic engine could pick a different gender, and so a different name, for the same input #502. Closes #501
* docs: move the documentation site to Docusaurus and drop MkDocs #498 #500 #504
* docs: add the Save and reset test environments with arcave page: restore a masked dump into a Docker Compose project once, save it as an arcave savepoint and reset the whole environment in one command #499
* docs: add make docs-serve and make docs-build to preview the documentation locally with the stock Docusaurus theme, and a CONTRIBUTING.md guide for contributors #505
docs: correct the documented defaults of Hash function, RandomNumeric decimal, RandomString symbols and RandomPerson gendermapping to match the code #493
Note
--diff-mode=values stays the default, so the existing validate --diff output is unchanged. --data with --diff-mode=summary and without --diff is an error, because plain --data prints every value. Without --data the mode is ignored, so diff_mode: summary can stay in a shared config.
Full Changelog: v0.2.25...v0.2.26
Contributors
@autistic-avenger
@Maxwell2022
@theluckystrike
@wwoytenko
@YauhenBichel
Links
Feel free to reach out to us if you have any questions or need assistance:
* Discord
* Email
* Twitter
[Telegram [RU]](https://t.me/greenmaskru)
* DockerHub
v0.2.252026-09-30
Greenmask 0.2.25
This is a bugfix release. It fixes a data corruption issue present in every earlier release, starting from 0.1.0-beta. Check the Am I affected? section below.
Changes
* fix: keep the byte following \. or \N in values written by transformers. The COPY encoder escaped these sequences and then skipped one byte too many, so the next byte was dropped from the dump. Depending on the dropped byte, the value was silently altered, or the restore of the whole table failed with invalid input syntax for type json or invalid byte sequence for encoding "UTF8" #490. Closes #489
* fix: write ASCII control characters without a named escape (for example 0x01) once. Previously they were written twice, so the restored value contained the character twice #490
* fix: clean the S3 integration test prefix before and after the suites, so objects left by an interrupted run no longer fail the next one, and add make rebuild-images, rebuild-greenmask-image and rebuild-integration-image targets that rebuild the local images without cache #490
Am I affected?
Dumps made by an earlier release are not repaired by upgrading: the byte was lost when the dump was made. If you are affected, make a new dump with 0.2.25.
A table is affected only if all of the following are true:
1. The dump was made with Greenmask 0.2.24 or earlier.
2. A transformer targets the column, and the row was not skipped by a when condition. Columns no transformer targets and rows skipped by when are copied byte for byte and are not affected.
3. The value the transformer writes back contains one of:
* \. or \N followed by at least one more character, for example a\.b, \.php$ or C:\Nightly. In a JSON value this includes a string ending in \., since the closing quote follows it.
* an ASCII control character other than tab, newline, carriage return, backspace, form feed and vertical tab.
In practice, this affects transformers that keep part of the original value:
* Template and TemplateRecord that output the original value or part of it, including the jsonSet, jsonSetRaw and jsonDelete functions
* Json — all keys of the document are written back, including the keys the operations do not touch
* RegexpReplace, and Masking types that keep part of the value, such as email, url or addr
* Replace, Dict and RandomChoice when the configured values contain these sequences
* custom transformers that return the original value or part of it
Transformers that generate a new value from scratch, such as random numbers, dates, UUIDs or hashes, do not produce these sequences.
Typical data that triggers the issue: regular expressions (\.php$), Windows paths (C:\Nightly\build) and web server configuration stored in text or json/jsonb columns.
To check a column in the source database, run the query below for each transformed column. A non-zero count means dumps of this column made before 0.2.25 may be affected:
``sql
SELECT count(*)
FROM myschema.mytable
WHERE my_column::text ~ '\\[.N].'
OR my_column::text ~ '[\x01-\x07\x0e-\x1f]';
``
Full Changelog: v0.2.24...v0.2.25
Contributors
@cbay
@wwoytenko
Links
Feel free to reach out to us if you have any questions or need assistance:
* Discord
* Email
* Twitter
[Telegram [RU]](https://t.me/greenmaskru)
* DockerHub
v0.2.242026-09-28
Greenmask 0.2.24
Changes
feat: add the HashedPassword transformer. It writes a bcrypt hash of one known password into a column, so test accounts can log in after the restore. The password is read from an environment variable via resolveenv, so it stays out of the config and the dump #482. Closes #480
feat: add server-side encryption for the S3 storage. The new sse parameter sets the encryption mode (AES256, aws:kms or aws:kms:dsse), kmskeyarn selects the KMS key for the KMS-backed modes, and bucketkeyenabled turns on S3 Bucket Keys to cut KMS request cost on large dumps. Encryption is applied to both single-part and multipart uploads, so dumps larger than maxpart_size are covered as well #473 #484
* feat: forward PostgreSQL notices to the log. Messages raised with RAISE NOTICE or RAISE WARNING were previously discarded at every log level. Notices from restore scripts are logged between the executing script and script execution complete entries: WARNING at warn, NOTICE, INFO and LOG at info, DEBUG at debug #479. Notices raised while dumping or restoring table data (for example by row-level triggers) are tagged with the worker id and logged at debug, except WARNING, which stays at warn, so a trigger raising one notice per row does not flood the log #485
fix: validate the S3 storage config before the dump starts. An unknown sse value now fails immediately instead of on the first upload, once the dump has already been produced. Setting kmskeyarn or bucketkey_enabled without a KMS-backed sse is rejected as well — previously the KMS key was silently dropped and the dump was encrypted with a key other than the configured one #484
* fix: use the upstream Minio image for the integration test storage service #483
* docs: extend the supporting a new PostgreSQL version guide #477
Full Changelog: v0.2.23...v0.2.24
Contributors
@YauhenBichel
@Jadyn-Iinuma-AuditBoard
@lukasbaumgart
@wwoytenko
Links
Feel free to reach out to us if you have any questions or need assistance:
* Discord
* Email
* Twitter
[Telegram [RU]](https://t.me/greenmaskru)
* DockerHub
v0.2.232026-08-22
Greenmask 0.2.23
Changes
feat: add --exclude-extension option to the dump command, mirroring --exclude-schema and --exclude-table (requires pgdump 17 or later) #470
fix: fail the dump when sequence privileges are missing on PostgreSQL 18 and later. Since PostgreSQL 18 pgsequencelastvalue() returns NULL instead of raising permission denied for sequence, so Greenmask silently dumped setval(<start>, false) and every sequence was reset on restore. Unreadable sequences are now reported together with a remediation hint and the dump fails #471. Fixes bug #469
fix: exclude generated columns from subset dump queries — subsetted tables were dumped with SELECT "schema"."table". while restore omits generated columns, so every row was one field too wide #472
fix: RandomEmail no longer requires the source value to be a valid email when the configured templates do not reference originallocalpart or originaldomain #468. Fixes bug #466
* fix: fix subset-related unit test and bump Go dependencies #475
Full Changelog: v0.2.22...v0.2.23
Contributors
@Maxwell2022
@climax-lars
@tucksaun
@kalra-mohit
@wwoytenko
Links
Feel free to reach out to us if you have any questions or need assistance:
* Discord
* Email
* Twitter
[Telegram [RU]](https://t.me/greenmaskru)
* DockerHub
v0.2.222026-07-01
Greenmask 0.2.22
Changes
* feat(storage): add Azure Blob Storage backend (storage.type: azure) supporting shared key, SAS token, and default credential chain authentication, as well as sovereign clouds #457. Closes #299
* feat(storage): add SSH/SFTP storage backend (storage.type: ssh) for storing dumps on a remote host over SFTP #458
feat: support providing the config file path via the GREENMASKCONFIG environment variable when --config is not set #459. Closes #455
* feat: add validate --strict parameter to exit with a non-zero status if there are unresolved warnings #460. Closes #454
Full Changelog: v0.2.21...v0.2.22
Contributors
@wwoytenko
@danlamanna
@jaap3
Links
Feel free to reach out to us if you have any questions or need assistance:
* Discord
* Email
* Twitter
[Telegram [RU]](https://t.me/greenmaskru)
* DockerHub
v0.2.212026-05-29
Greenmask 0.2.21
Changes
* fix: handle exclusion constraints (EXCLUDE) during table introspection instead of returning a hard error #452. Fixes bug #451
* bump go dependencies #445
* fixed inaccurate and duplicate comment for tupleSize (https://github.com/GreenmaskIO/greenmask/pull/448)
* fix(pgcopy): return typed error instead of panicking on extra columns from query: (https://github.com/GreenmaskIO/greenmask/pull/435)
Full Changelog: v0.2.20...v0.2.21
Contributors
@wwoytenko
@danlamanna
@Lethusang
@SAY-5
Links
Feel free to reach out to us if you have any questions or need assistance:
* Discord
* Email
* Twitter
[Telegram [RU]](https://t.me/greenmaskru)
* DockerHub
v0.2.202026-05-10
Greenmask 0.2.20
Changes
* fix: add remote storage for validate if --schema is provided #443
Full Changelog: v0.2.19...v0.2.20
Contributors
@wwoytenko
@danlamanna
Links
Feel free to reach out to us if you have any questions or need assistance:
* Discord
* Email
* Twitter
[Telegram [RU]](https://t.me/greenmaskru)
* DockerHub
v0.2.192026-04-15
Greenmask 0.2.19
Changes
Added environment variable interpolation in transformer parameters via resolveenv: true transformer option #431
Full Changelog: v0.2.18...v0.2.19
Contributors
@wwoytenko
Links
Feel free to reach out to us if you have any questions or need assistance:
* Discord
* Email
* Twitter
[Telegram [RU]](https://t.me/greenmaskru)
* DockerHub
v0.2.182026-03-30
Greenmask 0.2.18
Changes
* Added environment variable interpolation in YAML configuration (${VAR}, ${VAR:-default}, and ${VAR?message}) #421
* Batched S3 DeleteObjects calls to respect the 1000 object limit #426
* Bumped Python dependencies and version #427
* Bumped Go dependencies and fixed integration tests #424
* Added internal code documentation #416
Full Changelog: v0.2.17...v0.2.18
Contributors
@rsuchkov
@wwoytenko
Links
Feel free to reach out to us if you have any questions or need assistance:
* Discord
* Email
* Twitter
[Telegram [RU]](https://t.me/greenmaskru)
* DockerHub