File-SOPS

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for File-SOPS

0.005     2026-10-21 18:35:30Z
  - Crypt::Age is raised to 0.005, the release whose header parser no longer
    overwrites the caller's $_; with 0.004 a decrypt inside for (@files)
    rewrote the list. A test holds the guarantee for decrypt, decrypt_file and
    extract. (k203)

0.004     2026-09-20 15:52:56Z
  - SECURITY: fixes CVE-2026-85783, an unbounded age-header stanza count that
    let a single document force expensive work per decrypt attempt. Crypt::Age
    is raised to 0.004; decrypt (and decrypt_file/extract/rotate/edit) also caps
    age entries processed per document at 64 by default, raise-able via the new
    max_stanzas argument. (k192, k194)
  - creation_rules_for no longer prints a spurious escape-sequence warning to
    STDERR before refusing a path_regex that Perl and Go RE2 read apart; the
    refusal itself is unchanged. (k197)

0.003     2026-09-03 16:02:56Z
  - DATA LOSS: multi-document YAML is read and written: decrypt returns an
    ArrayRef of HashRefs for a stream (one document stays a HashRef), encrypt
    accepts one, extract takes document => $n, and one MAC spans all documents.
    A stream used to be silently reduced to its last document on write. (k31)
  - New ENV (dotenv) and INI format handlers (format => 'env' | 'ini'), full
    round-trips against sops in both directions, comments included. (k36, k37)
  - A "True"/"False" string and the non-finite spellings .inf/.Inf/.INF/+.inf/
    -.inf/.nan/.NaN are written double-quoted, as sops writes them, instead of
    bare (where Go read a boolean or a float back). (k99)
  - decrypt_file and edit write those same spellings quoted too, so decrypt_file
    is a faithful inverse of what sops wrote instead of flipping such a leaf back
    to a float or boolean on the next encrypt. (k186)
  - The four encryption rules (unencrypted_suffix, encrypted_suffix,
    unencrypted_regex, encrypted_regex) are usable as arguments to encrypt and
    encrypt_file, or carried via metadata => $meta.
  - New method encrypt_in_place: encrypt a single file atomically, permissions
    preserved.
  - New method edit: decrypt, open $EDITOR, re-encrypt; returns 0 when nothing
    changed, re-encrypts under a new data key, no editor fallback. (k41)
  - New method creation_rules_for: read the .sops.yaml governing a file and get
    the encrypt arguments its first matching rule asks for. (k45)
  - Metadata keeps sops-section fields it does not model (shamir_threshold,
    key_groups, ...) across a rewrite; new methods policy_args and rule_value.
  - SECURITY: encryption-rule regexes and .sops.yaml path_regex are matched in
    Go RE2's dialect, not Perl's, so a rule selects the same keys as sops -- a
    Perl \w/\d/\s over a non-ASCII key used to leave a value readable that sops
    encrypts. (k161)
  - SECURITY: rotate no longer silently drops the sops-section parts it did not
    create (other backends' key material, rules), which revoked PGP/KMS
    recipients while reporting success; it refuses a file whose key material it
    cannot re-encrypt.
  - SECURITY: decrypt no longer returns data it could not verify -- a missing,
    malformed or undecryptable MAC now dies instead of silently returning the
    document. Pass ignore_mac => 1 for the old behaviour.
  - SECURITY: the data key and per-value GCM nonce are length-checked where they
    are generated; a short return dies instead of reaching the cipher. (k52)
  - DATA LOSS: encrypt_file, decrypt_file and rotate write atomically now; they
    used to truncate the target first and ignore write errors, so a failed write
    left an empty file and still returned true. A written file gets a new inode.
    (k46)
  - Fix MAC verification of a document with values excluded from encryption --
    the default _unencrypted suffix made the library reject its own output.
  - Fix encryption rules being applied one key level at a time instead of to the
    whole key path, which left everything under an api_enc: block readable.
  - Fix a non-deterministic decrypt: a type:float came back an order of magnitude
    out on about one leaf in a hundred.
  - Fix any document with a non-ASCII key: the AAD is always UTF-8 now, where a
    key above U+00FF died and a Latin-1 key was authenticated wrongly. decrypt,
    decrypt_file and extract return characters, not bytes.
  - A value's type comes from the value, not from a text pattern: quoted
    "false"/"1"/"007" is a string, bare false is a bool, a Perl number is written
    in Go's canonical form, and an unknown type: is an error.
  - Values are UTF-8 encoded unconditionally (like the AAD) -- pass characters,
    not bytes; decode at your boundary first.
  - Perl's native boolean is written type:bool, not the integer 1/0.
  - A caller reference (blessed or unblessed) as a leaf is refused instead of
    written as an unreadable heap address or Perl tag. (k65)
  - An integer outside Go's int64 range is refused, naming the key path; store
    the digits as a string to keep them.
  - The top-level sops key is reserved in YAML and JSON: encrypt refuses a
    structure carrying it, encrypt_file refuses an already-encrypted input (ENV
    and INI do not reserve a bare sops key). (k157)
  - A YAML leaf whose spelling Go resolves differently from libyaml (0755, 010,
    0x1f, 1_000, .inf, a bare timestamp, ...) is refused at write time, naming
    the key path, instead of written and rejected later by its own MAC. (k86)
  - A bare leading-zero YAML integer reads back as Go's octal value (0755 -> 493),
    not libyaml's decimal 755. (k127)
  - Non-finite floats (.inf/-.inf/.nan) round-trip against sops: type:float in an



( run in 2.283 seconds using v1.01-cache-2.11-cpan-60884a8df76 )