Skip to content

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

Merged
stas-schaller merged 4 commits into
release/integration/ansible/v1.5.0from
VM-1452-insecure-deserialization-via-pickle-in-ansible-integration
Jul 27, 2026
Merged

VM-1452: replace pickle cache serialization with JSON#1066
stas-schaller merged 4 commits into
release/integration/ansible/v1.5.0from
VM-1452-insecure-deserialization-via-pickle-in-ansible-integration

Conversation

@idimov-keeper

@idimov-keeper idimov-keeper commented Jul 23, 2026

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.5.0; add encrypt/decrypt unit tests

@stas-schaller
stas-schaller changed the base branch from master to release/integration/ansible/v1.5.0 July 27, 2026 18:09
@socket-security

socket-security Bot commented Jul 27, 2026

Copy link
Copy Markdown

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

@stas-schaller stas-schaller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

idimov-keeper and others added 4 commits July 27, 2026 14:32
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>
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>
@stas-schaller
stas-schaller force-pushed the VM-1452-insecure-deserialization-via-pickle-in-ansible-integration branch from 3f58133 to e371c6c Compare July 27, 2026 18:34
@stas-schaller
stas-schaller merged commit d461226 into release/integration/ansible/v1.5.0 Jul 27, 2026
2 checks passed
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.

2 participants