{
  "schema_version": 1,
  "title": "Model Supply Chain: Safe Loading and Provenance",
  "review_type": "AI-assisted source-support audit; not independent expert verification",
  "sources": [
    {
      "id": "S1",
      "key": "safe-audit",
      "title": "🐶Safetensors audited as really safe and becoming the default",
      "author": "Hugging Face / EleutherAI / Stability AI authors. (2023).",
      "url": "https://huggingface.co/blog/safetensors-security-audit",
      "requested_url": "https://huggingface.co/blog/safetensors-security-audit",
      "accessed_at": "2026-11-13T22:38:58.051Z",
      "source_type": "primary",
      "version": null,
      "published_at": "2023-05-23T00:00:00.000Z",
      "source_date_note": "Hugging Face / EleutherAI / Stability AI authors. (2023).",
      "retrieved_body_sha256": "f69fe8eb422ccb5abd7f91025fa02065accc866aafbad2e8d5791cb0baeb8e47",
      "library": {
        "id": "e9409320abb4181ca2f3cd5138dfebe9",
        "revision": "8ddc8d11334f7341d1088ee1fbb9e4b3",
        "published_at": "2023-05-23T00:00:00.000Z",
        "captured_at": "2026-11-06T19:58:19.907Z",
        "exact_quote_in_saved_original": true,
        "passage_matches": [
          {
            "evidence_id": "S1-E1",
            "exact_match": true
          }
        ]
      },
      "evidence": [
        {
          "id": "S1-E1",
          "location": "What is safetensors?; The security audit",
          "quote": "it is impossible to prove the absence of flaws",
          "normalized_text_offset": 4154
        }
      ],
      "limitations": "A historical audit report announcement; not a guarantee for every version, model or loader.",
      "checks": [
        "publisher URL and final redirect inspected",
        "actual relevant primary passage read",
        "exact excerpt matched",
        "scope and available version/date inspected"
      ]
    },
    {
      "id": "S2",
      "key": "safe-pickle",
      "title": "pickle — Python object serialization — Python 3.13.18 documentation",
      "author": "Python Software Foundation. (Python 3.13.18 documentation).",
      "url": "https://docs.python.org/3.13/library/pickle.html",
      "requested_url": "https://docs.python.org/3.13/library/pickle.html",
      "accessed_at": "2026-11-13T22:44:36.757Z",
      "source_type": "primary",
      "version": "Python 3.13.18",
      "published_at": null,
      "source_date_note": "Python Software Foundation. (Python 3.13.18 documentation).",
      "retrieved_body_sha256": "9f24353b6161eca71875bf69e1efba6f052ae2836842447e516b2025cbd85cac",
      "library": null,
      "evidence": [
        {
          "id": "S2-E1",
          "location": "Warning at the start of pickle documentation",
          "quote": "It is possible to construct malicious pickle data which will execute arbitrary code during unpickling.",
          "normalized_text_offset": 865
        }
      ],
      "limitations": "The example never imports pickle or deserializes external bytes.",
      "checks": [
        "publisher URL and final redirect inspected",
        "actual relevant primary passage read",
        "exact excerpt matched",
        "scope and available version/date inspected"
      ]
    },
    {
      "id": "S3",
      "key": "safe-loading",
      "title": "Loading models · Hugging Face",
      "author": "Hugging Face maintainers. (Transformers v5.5.2).",
      "url": "https://huggingface.co/docs/transformers/v5.5.2/en/models",
      "requested_url": "https://huggingface.co/docs/transformers/v5.5.2/en/models",
      "accessed_at": "2026-11-13T22:44:37.155Z",
      "source_type": "primary",
      "version": "v5.5.2",
      "published_at": null,
      "source_date_note": "Hugging Face maintainers. (Transformers v5.5.2).",
      "retrieved_body_sha256": "5a95197b02ceef6547245511091fd1c414ec038ce72280f03b792ef6ab906e25",
      "library": null,
      "evidence": [
        {
          "id": "S3-E1",
          "location": "Custom models",
          "quote": "load a custom model from a specific revision",
          "normalized_text_offset": 10437
        },
        {
          "id": "S3-E2",
          "location": "Custom models",
          "quote": "Set trust_remote_code=True in from_pretrained() to load a custom model.",
          "normalized_text_offset": 10162
        }
      ],
      "limitations": "Remote custom code and revision selection are separate from the tensor storage format.",
      "checks": [
        "publisher URL and final redirect inspected",
        "actual relevant primary passage read",
        "exact excerpt matched",
        "scope and available version/date inspected"
      ]
    },
    {
      "id": "S4",
      "key": "safe-hash",
      "title": "hashlib — Secure hashes and message digests — Python 3.13.18 documentation",
      "author": "Python Software Foundation. (Python 3.13.18 documentation).",
      "url": "https://docs.python.org/3.13/library/hashlib.html",
      "requested_url": "https://docs.python.org/3.13/library/hashlib.html",
      "accessed_at": "2026-11-13T22:44:36.770Z",
      "source_type": "primary",
      "version": "Python 3.13.18",
      "published_at": null,
      "source_date_note": "Python Software Foundation. (Python 3.13.18 documentation).",
      "retrieved_body_sha256": "09a84954f8af1eec095d506b5fe6d1c6faa1ea98f56cc22c250a6cc85107bd77",
      "library": null,
      "evidence": [
        {
          "id": "S4-E1",
          "location": "Hash algorithms; Usage",
          "quote": "use sha256() to create a SHA-256 hash object",
          "normalized_text_offset": 877
        }
      ],
      "limitations": "A digest checks bytes against a trusted expected value; publisher authenticity requires a separate trust decision.",
      "checks": [
        "publisher URL and final redirect inspected",
        "actual relevant primary passage read",
        "exact excerpt matched",
        "scope and available version/date inspected"
      ]
    }
  ],
  "claims": [
    {
      "id": "C01",
      "notebook_locations": [
        "workflow"
      ],
      "claim": "Identify artifact — Publisher + files — Record where the artifact came from and which files will be consumed. — A display name or filename is not a complete provenance record.; Fix version — Immutable revision — Select a specific revision and obtain a trusted expected digest. — A moving branch can change; pinning still does not prove the chosen revision benign.; Review load path — Format + code — Inspect whether deserialization or custom code can execute behavior. — Tensor data and accompanying executable code require separate analysis.; Controlled review — Verify + assess — Compare digests and apply the declared local review policy. — The toy’s best outcome remains a candidate for controlled review, never guaranteed safe.",
      "source_ids": [
        "S1",
        "S2",
        "S3",
        "S4"
      ],
      "evidence_ids": [
        "S1-E1",
        "S2-E1",
        "S3-E1",
        "S3-E2",
        "S4-E1"
      ],
      "verdict": "editorial_diagram_with_source_supported_roles",
      "reason": "Diagram is a teaching workflow, not an exhaustive protocol or measured system. Each role and arrow is bounded in nearby text."
    },
    {
      "id": "C02",
      "notebook_locations": [
        "experiment"
      ],
      "claim": "Toggle four declared facts. A digest mismatch stops the toy workflow. Pickle or custom code requires code-execution review. An unpinned revision needs provenance review. Otherwise the result is a candidate for controlled loading review. The outcome is an author-defined review policy, not a malware detector, signature verifier or safety certification. The example’s digest is calculated over literal local bytes; no external artifact is opened. Digest mismatch: Stop: Do not treat a file with unexpected bytes as the reviewed artifact. Pickle or custom code: Code-execution review: Pinning and digest equality do not remove executable behavior. Pinned data-only path; digest matches: Candidate for controlled review: Authenticity, loader behavior and downstream model behavior remain separate questions.",
      "source_ids": [],
      "evidence_ids": [],
      "verdict": "original_synthetic_experiment",
      "reason": "Original fixed inputs and outputs; Python assertions and independent browser arithmetic checked in verification artifacts."
    },
    {
      "id": "C03",
      "notebook_locations": [
        "workflow"
      ],
      "claim": "A model artifact can include weights, configuration, tokenizer files and executable loader code. Safetensors is designed for tensor storage, while Python pickle can execute arbitrary code during unpickling. A data-focused tensor format addresses one loading path; it does not make accompanying Python code trustworthy.",
      "source_ids": [
        "S1",
        "S2",
        "S3"
      ],
      "evidence_ids": [
        "S1-E1",
        "S2-E1",
        "S3-E1",
        "S3-E2"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C04",
      "notebook_locations": [
        "workflow"
      ],
      "claim": "The Hugging Face loading guide describes explicit opt-in for custom model code and recommends selecting a specific revision. Separately, a checksum can show that bytes match an expected digest. If the expected digest comes from the same compromised place as the file, equality alone does not establish who produced those bytes.",
      "source_ids": [
        "S3",
        "S4"
      ],
      "evidence_ids": [
        "S3-E1",
        "S3-E2",
        "S4-E1"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C05",
      "notebook_locations": [
        "interpretation"
      ],
      "claim": "Python’s warning is about what unpickling can execute. Renaming a pickle file does not change that behavior. The format control describes the actual loading path assumed by the toy, not the file extension. The displayed code hashes bytes and never deserializes them.",
      "source_ids": [
        "S2"
      ],
      "evidence_ids": [
        "S2-E1"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C06",
      "notebook_locations": [
        "interpretation"
      ],
      "claim": "The 2023 safetensors audit announcement explicitly acknowledges that absence of flaws cannot be proved. That historical review is evidence about a specific review effort, not a promise about all future versions or all content shipped beside weights. The diagram keeps executable custom code on a separate review lane.",
      "source_ids": [
        "S1",
        "S3"
      ],
      "evidence_ids": [
        "S1-E1",
        "S3-E1",
        "S3-E2"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C07",
      "notebook_locations": [
        "interpretation"
      ],
      "claim": "Editorial artifact record: publisher identity, immutable revision, exact file list, expected digests and their trusted origin, loader version, custom code review and intended execution boundary. A checksum comparison supports byte identity under its assumptions; it does not evaluate model behavior or licensing.",
      "source_ids": [
        "S3",
        "S4"
      ],
      "evidence_ids": [
        "S3-E1",
        "S3-E2",
        "S4-E1"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C08",
      "notebook_locations": [
        "reproduce"
      ],
      "claim": "The original standard-library Python example passed its assertions and 16 input fixtures. Its browser implementation is separately compared against those results.",
      "source_ids": [],
      "evidence_ids": [],
      "verdict": "tested_original_example",
      "reason": "No publisher code executed; no model, external network call or privileged action in the examples."
    },
    {
      "id": "C09",
      "notebook_locations": [
        "self-check"
      ],
      "claim": "What can malicious pickle data do during unpickling? Correct answer: Execute arbitrary code. The Python documentation explicitly warns about arbitrary code execution.",
      "source_ids": [
        "S2"
      ],
      "evidence_ids": [
        "S2-E1"
      ],
      "verdict": "source_supported_and_worked_example",
      "reason": "Answer rechecked against the declared fixture and cited source scope."
    },
    {
      "id": "C10",
      "notebook_locations": [
        "self-check"
      ],
      "claim": "Does a matching digest by itself authenticate the publisher? Correct answer: No. It shows byte agreement with an expected value; the origin of that expected value still matters.",
      "source_ids": [
        "S4"
      ],
      "evidence_ids": [
        "S4-E1"
      ],
      "verdict": "source_supported_and_worked_example",
      "reason": "Answer rechecked against the declared fixture and cited source scope."
    },
    {
      "id": "C11",
      "notebook_locations": [
        "self-check"
      ],
      "claim": "Does a tensor format remove risk from accompanying custom Python code? Correct answer: No. The loader may execute code separately from reading tensor data.",
      "source_ids": [
        "S3"
      ],
      "evidence_ids": [
        "S3-E1",
        "S3-E2"
      ],
      "verdict": "source_supported_and_worked_example",
      "reason": "Answer rechecked against the declared fixture and cited source scope."
    },
    {
      "id": "C12",
      "notebook_locations": [
        "self-check"
      ],
      "claim": "What is this toy’s most permissive outcome? Correct answer: Candidate for controlled review. The policy is a review aid and makes no safety guarantee.",
      "source_ids": [],
      "evidence_ids": [],
      "verdict": "original_example_or_reasoned_limitation",
      "reason": "Answer rechecked against the declared fixture and cited source scope."
    }
  ],
  "original_experiment": {
    "scope": "A local artifact-review decision model and harmless byte hashes. No model is downloaded, deserialized or executed.",
    "assumptions": "The outcome is an author-defined review policy, not a malware detector, signature verifier or safety certification. The example’s digest is calculated over literal local bytes; no external artifact is opened.",
    "results_file": "verification/python-results.json"
  },
  "library_gap": null,
  "excluded_evidence": [],
  "limitations": [
    "No real model or GPU measured.",
    "Sources and version/date labels checked as recorded; this does not prove absence of errors."
  ],
  "separate_audit_file": "verification/source-audit.json",
  "publication": {
    "state": "published",
    "approved_on": "2026-11-14",
    "published_on": "2026-11-14",
    "source_checks_on": "2026-11-13"
  }
}
