Open-source atomic malware analysis

Analyze another

harrrshall/BarunAction-35M main

PYTHON
Verdict: BENIGN
Mal-ecule
H₂(CrDb)
Size 6.7 KB download
First seen 26 days ago
Analyzed 11 days ago
Ecosystem huggingface
test_barunaction_hub.py python
1 from __future__ import annotations
2
3 import hashlib
4 import json
5 from pathlib import Path
6 from types import MappingProxyType
7 from typing import Any
8
9 import pytest Imports the pytest module
10
11 import barunaction
12 from barunaction import hub
13 from barunaction.cli import main as cli_main
14
15
16 def _sha256(payload: bytes) -> str:
17 return hashlib.sha256(payload).hexdigest() Performs Python SHA-256 operation
18
19
20 def _fake_release(monkeypatch: pytest.MonkeyPatch) -> tuple[dict[str, bytes], bytes]:
21 files = {
22 "barun_config.json": b'{"vocab_size":4}\n',
23 "model.safetensors": b"tiny-test-weights",
24 "tokenizer.json": b'{"version":"
24:46 \n',
25 }
26 hashes = {name: _sha256(payload) for name, payload in files.items()}
27 manifest = (
28 json.dumps(
29 {
30 "file_sha256": hashes,
31 "schema_version": "barun-
75:22 download_candidate_checkpoint(destination)
76
77 assert downloaded.path == destination.resolve() Checks condition using Python assert
78 assert downloaded.candidate_id == "candidate-v2"
79 assert downloaded.repo_id == "harrrshall/BarunAction-35M"
80 assert downloaded.revision == "candidate-v2"
81 assert dict(downloaded.checkpoint_sha256) == {
82 name: _sha256(payload) for name, payload in files.items()
83 }
84 assert downloaded.manifest_sha256 == _sha256(manifest)
85 assert calls == [
86 {
87 "allow_patterns": [*files, "checkpoint_manifest.json"],
88 "local_dir": str(destination.resolve()),
89 "repo_id": "harrrshall/BarunAction-35M
91:22 ": "candidate-v2",
92 "token": False,
93 }
94 ]
95 assert barunaction.download_candidate_checkpoint is hub.download_candidate_checkpoint Checks condition using Python assert
96
97
98 def test_download_fails_closed_on_content_mismatch(
99 tmp_path: Path,
100 monkeypatch: pytest.MonkeyPatch,
101 ) -> None:
102 files, manifest =
128:33 ndidate"
129
130 code = cli_main(["download", "--output", str(destination)])
131 payload = json.loads(capsys.readouterr().out) Parses JSON data with Python
132
133 assert code == 0
134 assert payload["ok"] is True
135 assert payload["download"]["checkpoint"] ==

Micro-behaviors

Metadata

Identity

SHA-256 3f53becda27b910dbe37bd5d29be032295edee64fb677a608d3180bc9a3f9281
Filename test_barunaction_hub.py
Package harrrshall/BarunAction-35M
Version main
PURL pkg:huggingface/harrrshall/BarunAction-35M@main

Origin

Source forager
Feed huggingface.co
Ecosystem huggingface
Domain huggingface.co
URL https://huggingface.co/harrrshall/BarunAction-35M

Timeline

First seen 5 Aug 2026 10:58 UTC
First analyzed 19 Aug 2026 19:59 UTC
Last analyzed 19 Aug 2026 19:59 UTC
Last updated 19 Aug 2026 19:59 UTC

Labeling

Label unknown
Label source forager
Traits version 73b94