Skip to content

docs: security warning for MBLineProfiler.decode_line_profile (pickle.loads)#33

Merged
alubbock merged 1 commit intomainfrom
fix/pickle-warning
Mar 12, 2026
Merged

docs: security warning for MBLineProfiler.decode_line_profile (pickle.loads)#33
alubbock merged 1 commit intomainfrom
fix/pickle-warning

Conversation

@alubbock
Copy link
Copy Markdown
Owner

Summary

  • decode_line_profile uses pickle.loads, which can execute arbitrary code if the input is from an untrusted source
  • Added a security note to the docstring and to the Line profiler section of the README
  • A JSON-based alternative is theoretically possible but would require stringifying tuple dict keys and reconstructing LineStats objects; the pickle approach is retained as the attack surface is low (requires control of benchmark output files)

@alubbock alubbock force-pushed the fix/pickle-warning branch from d0f79fe to 3fd6aef Compare March 12, 2026 23:48
@alubbock alubbock merged commit f41d8a8 into main Mar 12, 2026
20 checks passed
@alubbock alubbock deleted the fix/pickle-warning branch March 12, 2026 23:54
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