Skip to content

Detection: add insecure-deserialization rule for Python (pickle / yaml.load) #87

Description

@bkd-dotcom

Add a rule flagging unsafe deserialization in Python.

Where: signetry_core/pipeline/findings/deterministic.py (_scan_python).

Detect: pickle.loads(...) / pickle.load(...) on non-constant input; yaml.load(x) without Loader=SafeLoader; marshal.loads.

Must NOT flag: yaml.safe_load(...), or yaml.load(x, Loader=yaml.SafeLoader).

Acceptance criteria:

  • Rule id py.insecure-deserialization, category deserialization, CWE-502, severity HIGH.
  • Tests: one vulnerable case detected, one safe case (safe_load) not flagged.
  • pytest + ruff green.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions