PyPI / datasets / 5.2.0

datasets 5.2.0

Source
https://github.com/huggingface/datasets
Artifact scanned
datasets-5.2.0-py3-none-any.whl (wheel · 594.0 KB · SHA-256 4be9e2882caa…)
Compared with
datasets-5.1.0-py3-none-any.whl (0 signals introduced since)
Files
157 scanned, 9 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 5 info
Scan time
4.2 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 3 of 3 warn and critical signals; 3 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-11-09 21:42

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. info warn → info by review dynamic-attribute datasets/features/features.py:600:19

    reach-by-name through `globals` (ast pass, confidence 0.60)

        def __call__(self):
            pa_type = globals()[self.__class__.__name__ + "ExtensionType"](self.shape, self.dtype)
            return pa_type
    likely benign LLM, confidence 0.93 Resolves an Arrow extension type class by name from module globals inside an Array feature's __call__.
    Reasoning

    globals() lookup of a class-name-derived ExtensionType name is a standard registry pattern in the HuggingFace datasets feature module; the lookup key is built from the class's own name, not external input, so it is not a dynamic-execution risk.

  2. info warn → info by review dynamic-attribute datasets/features/features.py:1659:53

    reach-by-name through `globals.get` (ast pass, confidence 0.60)

        _type = obj.pop("_type")
        class_type = _FEATURE_TYPES.get(_type, None) or globals().get(_type, None)
    
        if class_type is None:
    likely benign LLM, confidence 0.92 Looks up a feature class by its _type name in module globals when deserializing feature metadata.
    Reasoning

    Falls back to globals().get on a _type string read from a serialized feature dict, but it only returns a class object for later use as a feature type; it does not call arbitrary code or decode a payload. Common feature deserialization pattern in datasets.

  3. info warn → info by review decoder-decompress-payload datasets/features/nifti.py:210:26

    file imports decoder module(s) gzip and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)

                ):  # gzip magic number, see https://stackoverflow.com/a/76055284/9534390 or "Magic number" on https://en.wikipedia.org/wiki/Gzip
                    bytes_ = gzip.decompress(bytes_)
    
                nifti = nib.Nifti1Image.from_bytes(bytes_)
    likely benign LLM, confidence 0.95 Decompresses gzip-compressed NIfTI bytes when the gzip magic header is present before loading the image.
    Reasoning

    gzip.decompress is applied only after checking the gzip magic number on bytes that are then parsed as a NIfTI image. This is ordinary handling of compressed NIfTI files, not a hidden embedded payload being executed.

  4. compression ratio 0.809 is >2σ above file mean 0.713 (raw pass, confidence 0.50)

                logger.debug(
                    f"{_log_prefix}dataloader worker#{worker_info.id}, ': Starting to iterate over {len(shards_indices)}/{ex_iterable.num_shards} shards."
                )
                ex_iterable = ex_iterable.shard_data_sources(
  5. compression ratio 0.815 is >2σ above file mean 0.713 (raw pass, confidence 0.50)

                logger.debug(
                    f"{_log_prefix}dataloader worker#{worker_info.id}, ': Finished iterating over {len(shards_indices)}/{ex_iterable.num_shards} shards."
                )
            else:

Reproduce This Scan

Run disclude locally to verify. These commands scan the published file; the "new in this release" marks come from comparing it with the previous release's file, which they don't repeat. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.

cargo install disclude --version 4.3.0
curl -fsSL -o datasets-5.2.0-py3-none-any.whl https://files.pythonhosted.org/packages/ae/22/c92c96de701dd7441f553adaaa480801ff3d37575486ef82df651a45f0ec/datasets-5.2.0-py3-none-any.whl
printf '%s  %s\n' 4be9e2882caaf5db13eadc39e93f3da2a995187b99acebac1595bf6c58dfa927 datasets-5.2.0-py3-none-any.whl | shasum -a 256 -c -
unzip -q datasets-5.2.0-py3-none-any.whl -d pkg
disclude scan --untrusted --severity info pkg