Skip to content

VM-1452: replace pickle cache serialization with JSON#1066

Open
idimov-keeper wants to merge 3 commits into
masterfrom
VM-1452-insecure-deserialization-via-pickle-in-ansible-integration
Open

VM-1452: replace pickle cache serialization with JSON#1066
idimov-keeper wants to merge 3 commits into
masterfrom
VM-1452-insecure-deserialization-via-pickle-in-ansible-integration

Conversation

@idimov-keeper

Copy link
Copy Markdown
Collaborator

VM-1452: replace pickle cache serialization with JSON
Summary:

  • Replace pickle with Fernet-encrypted JSON for Ansible record cache encrypt/decrypt (CWE-502)
  • Round-trip KSM Record state so get/set/copy/remove/lookup cache paths keep working
  • Reject legacy/malicious pickle payloads; bump to 1.4.1; add encrypt/decrypt unit tests

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

Co-authored-by: Cursor <cursoragent@cursor.com>
idimov-keeper and others added 2 commits July 24, 2026 14:21
Ignore unusable pickle/invalid record caches without deserializing them, warn, and fetch from the vault so plays continue until keeper_cache_records rebuilds JSON.

Co-authored-by: Cursor <cursoragent@cursor.com>
Newer ansible-core can recurse in AnsibleError.__str__; assert on exception args instead so CI stays green.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant