Skip to content

Release KSM Ansible v1.5.0 - #982

Open
stas-schaller wants to merge 4 commits into
masterfrom
release/integration/ansible/v1.5.0
Open

Release KSM Ansible v1.5.0#982
stas-schaller wants to merge 4 commits into
masterfrom
release/integration/ansible/v1.5.0

Conversation

@stas-schaller

@stas-schaller stas-schaller commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Release branch for Keeper Secrets Manager Ansible v1.5.0, adding subfolder record creation, replacing the unsafe cache serialization format, and fixing a crash in keeper_create on empty complex fields.

Changes

New Features

  • Subfolder targeting (KSM-845): keeper_create now accepts an optional folder_uid parameter to place new records in a subfolder within a shared folder, rather than always creating at the shared folder root.

Bug Fixes

  • Cache serialization (KSM-1103 / VM-1452): Replaced pickle with JSON for the record cache encrypt/decrypt path. pickle.loads() on attacker-influenced data (e.g. via AWX extra vars) is a known RCE vector; JSON is safe regardless of input source.
    • A cache from an older plugin version (still pickle-format) or an otherwise invalid cache is now detected and ignored with a warning, falling back to fetching records from the vault, rather than raising an unhandled exception.
  • keeper_create crashes on empty complex field: keeper_create crashed with "Could not create record: list index out of range" when a playbook supplied a dict-typed complex field (address, name, host, etc.) with value: []. Playbook values are now converted from [] to unpopulated before being passed to the helper, so the record is created with the field empty rather than crashing. Root cause in the helper library is tracked as KSM-1119.

Maintenance

  • Bumped minimum SDK dependencies: keeper-secrets-manager-core>=17.3.0, keeper-secrets-manager-helper>=1.1.2
  • Added paths filter to test.ansible.yml CI workflow including sdk/python/core dependency

Breaking Changes

None.

Related Issues

@stas-schaller
stas-schaller force-pushed the release/integration/ansible/v1.5.0 branch from 3764ddf to a44f0da Compare April 9, 2026 19:38
- feat: add folder_uid parameter to keeper_create for subfolder record targeting (KSM-845)
- fix: replace pickle with JSON cache serialization to eliminate unsafe deserialization path (KSM-1103)
- ci: add paths filter to test.ansible.yml including sdk/python/core dependency
@stas-schaller
stas-schaller force-pushed the release/integration/ansible/v1.5.0 branch from 78e254e to 06df0d6 Compare July 16, 2026 18:24
@stas-schaller
stas-schaller marked this pull request as ready for review July 16, 2026 18:27
idimov-keeper and others added 3 commits July 27, 2026 14:40
* VM-1452: replace pickle cache serialization with JSON

Remove insecure pickle.loads from the Ansible record cache path (CWE-502) and round-trip Record state via Fernet-encrypted JSON.

* VM-1452: invalidate legacy cache and fall back to vault

Ignore unusable pickle/invalid record caches without deserializing them, warn, and fetch from the vault so plays continue until keeper_cache_records rebuilds JSON.

* VM-1452: avoid AnsibleError str() in cache fallback test

Newer ansible-core can recurse in AnsibleError.__str__; assert on exception args instead so CI stays green.

* docs(ansible): correct changelog version 1.4.1 -> 1.5.0
- Add KSM-845 changelog entry to both READMEs' 1.5.0 section, which
  only documented the VM-1452 cache fix
- Add playbook-level test for keeper_create_subfolder.yml, exercising
  the actual YAML via AnsibleTestFramework rather than only the Python
  create_record() unit test, matching every other example playbook's
  coverage in this suite
helper FieldType.__init__ crashes with IndexError when a dict-typed
field (address, name, host, passkey, etc.) has value: [] -- the
server's normal representation of an unpopulated complex field.

keeper_create passed field values from playbook args directly to
Field(), so any playbook with an explicitly empty complex field
crashed with AnsibleError("Could not create record: list index out
of range"), giving no signal about which field caused the failure.

Fix: convert value: [] to None with "or None" before passing to
Field(). FieldType.__init__ treats None as "no value" and skips the
dict-field index that crashes on empty lists, so the field is created
as unpopulated rather than crashing. Applies to both standard fields
and custom_fields.

Root cause in the helper is tracked as KSM-1119. Cleanup comments
added at both Field() sites to flag the workaround for removal once
the helper ships the "if self.value:" guard in FieldType.__init__.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unable work with subfolders in Ansible code?

2 participants