Scan report
JustVugg / colibri
Could an attacker exploit mistakes in this code?
Real issues worth reviewing before you rely on this code.
- High
- 0
- Medium
- 39
- Low
- 116
Sources: Bandit, Semgrep, pip-audit
Does this code look like it is trying to cause harm?
Real issues worth reviewing before you rely on this code.
- High
- 10
- Medium
- 5
- Low
- 9
Sources: YARA, ClamAV, GuardDog, dependency checker
- Likely real
- 15
- Uncertain
- 24
- Likely noise
- 140
The risk classifier rates every finding for how likely it is to be a real issue. Likely noise still counts, just much less.
What we found, in plain English
The repository JustVugg/colibri shows a medium vulnerability score of 51.0, which means there are several insecure coding patterns that an attacker could potentially exploit if the code is used in production. While some issues appear to be malicious attempts to hide credentials or evade security checks, many others look like ordinary mistakes made by developers who forgot to pin specific library versions or use weak passwords. The scan also identified 179 total findings, with several high-priority alerts pointing to hardcoded secrets and unsafe file access methods that need immediate attention before the code can be deployed safely.
Written by a local language model from the findings below. The risk scores come from the classifier, not from this summary.
Detections by engine
Score over time
Overall score each time this repository was scanned.
Findings
Highest severity first. Select a finding to see the code and what it means.
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/tools/convert_fp8_to_int4.py
- Likely real
- Uncertain, 33% confidence
YARA rule matched: detect_credential_harvester — References credential/secret material by name AND a deliberate outbound-send API in the same file - narrower than \'reads any env var\', which large legitimate codebases do constantly regardless of intent. Still not proof the two are connected (YARA can\'t trace data flow) - a known limitation, see NOTES.md
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/coli
- Likely real
- Uncertain, 33% confidence
YARA rule matched: detect_credential_harvester — References credential/secret material by name AND a deliberate outbound-send API in the same file - narrower than \'reads any env var\', which large legitimate codebases do constantly regardless of intent. Still not proof the two are connected (YARA can\'t trace data flow) - a known limitation, see NOTES.md
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/Makefile
- Likely real
- Probably noise, 18% confidence
YARA rule matched: detect_anti_analysis — Checks for a debugger, VM, or sandbox before continuing - a common malware evasion technique, essentially never present in ordinary application code
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/colibri.c
- Likely real
- Probably noise, 18% confidence
YARA rule matched: detect_anti_analysis — Checks for a debugger, VM, or sandbox before continuing - a common malware evasion technique, essentially never present in ordinary application code
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/tools/k3_tokenizer.py
- Likely real
- Probably noise, 3% confidence
YARA rule matched: detect_base64_exec — Encoded payload decoded and then executed
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/openai_server.py
- Likely real
- Probably noise, 3% confidence
YARA rule matched: detect_base64_exec — Encoded payload decoded and then executed
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/tools/make_kimi_k3_ref.py
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/tools/convert_glm53.py
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/download_fp8.py
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/coli
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- Dependency checker · CVEs, typosquats and risky installs
- Counts towards
- Supply chain
- File
- pyproject.toml
- Likely real
- Yes, 54% confidence
Unpinned dependency: 'datasets' has no version lock — supply chain risk
datasets -
- Engine
- Dependency checker · CVEs, typosquats and risky installs
- Counts towards
- Supply chain
- File
- pyproject.toml
- Likely real
- Yes, 54% confidence
Unpinned dependency: 'tokenizers' has no version lock — supply chain risk
tokenizers -
- Engine
- Dependency checker · CVEs, typosquats and risky installs
- Counts towards
- Supply chain
- File
- pyproject.toml
- Likely real
- Yes, 54% confidence
Unpinned dependency: 'safetensors' has no version lock — supply chain risk
safetensors -
- Engine
- Dependency checker · CVEs, typosquats and risky installs
- Counts towards
- Supply chain
- File
- pyproject.toml
- Likely real
- Yes, 54% confidence
Unpinned dependency: 'numpy' has no version lock — supply chain risk
numpy -
- Engine
- Dependency checker · CVEs, typosquats and risky installs
- Counts towards
- Supply chain
- File
- pyproject.toml
- Likely real
- Yes, 54% confidence
Unpinned dependency: 'huggingface_hub' has no version lock — supply chain risk
huggingface_hub -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/openai_server.py line 2498
- Likely real
- Uncertain, 49% confidence
Use of weak SHA1 hash for security. Consider usedforsecurity=False
2497 key = repr(prefix) 2498 digest = hashlib.sha1(key.encode("utf-8", "replace")).digest() 2499 return int.from_bytes(digest[:8], "big") % kv_slots -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/cluster.py line 145
- Likely real
- Uncertain, 49% confidence
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
144 headers={"Content-Type": "application/json"}, method="POST") 145 with urlopen(request, timeout=5) as response: 146 return json.load(response) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/repair_mtp_int8.py line 53
- Likely real
- Uncertain, 49% confidence
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
52 try: 53 with urllib.request.urlopen(req, timeout=30, context=_SSL_CTX) as r: 54 data = r.read() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/cluster.py line 153
- Likely real
- Uncertain, 49% confidence
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
152 headers={"Content-Type": "application/json"}, method="POST") 153 with urlopen(request, timeout=5) as response: 154 return json.load(response) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/cluster.py line 158
- Likely real
- Uncertain, 49% confidence
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
157 def discover_workers(coordinator): 158 with urlopen(_endpoint(coordinator, "topology"), timeout=5) as response: 159 topology = json.load(response) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fp8_to_int4.py line 938
- Likely real
- Uncertain, 49% confidence
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
937 try: 938 with urllib.request.urlopen(req, timeout=8) as r: 939 if r.status != 206: # Range ignorato: multi-stream impossibile -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fp8_to_int4.py line 1001
- Likely real
- Uncertain, 49% confidence
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
1000 try: 1001 with urllib.request.urlopen(req, timeout=8) as r: 1002 if have and r.status == 200: # server ha ignorato il Range: riparti pulito -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fp8_to_int4.py line 1072
- Likely real
- Uncertain, 49% confidence
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
1071 import urllib.request 1072 idx = json.loads(urllib.request.urlopen( 1073 f"https://huggingface.co/{a.repo}/resolve/main/model.safetensors.index.json", timeout=30).read())["weight_map"] 1074 pref = f"model.layers.{a.n_layers}." -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fp8_to_int4.py line 1095
- Likely real
- Uncertain, 49% confidence
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
1094 import urllib.request 1095 idx = json.loads(urllib.request.urlopen( 1096 f"https://huggingface.co/{a.repo}/resolve/main/model.safetensors.index.json", timeout=30).read())["weight_map"] 1097 idx_shards = sorted(set(v for k, v in idx.items() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_kimi_k3_ref.py line 93
- Likely real
- Uncertain, 49% confidence
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
92 print(f"[ref] downloading {url}", file=sys.stderr) 93 with urllib.request.urlopen(url, timeout=60) as resp: 94 path.write_bytes(resp.read()) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/repair_mtp_int8.py line 68
- Likely real
- Uncertain, 49% confidence
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
67 self.base = f"https://huggingface.co/{repo}/resolve/{revision}/" 68 with urllib.request.urlopen(self.base + "model.safetensors.index.json", timeout=30, context=_SSL_CTX) as r: 69 self.wmap = json.loads(r.read())["weight_map"] -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/try_tool_calling.py line 53
- Likely real
- Uncertain, 49% confidence
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
52 headers={"Content-Type": "application/json"}) 53 with urllib.request.urlopen(req, timeout=timeout) as resp: 54 return json.loads(resp.read()) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/try_tool_calling.py line 42
- Likely real
- Uncertain, 49% confidence
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
41 """Ask the server which model it is serving, so the caller never has to guess the id.""" 42 with urllib.request.urlopen(url + "/v1/models", timeout=timeout) as resp: 43 data = json.loads(resp.read()).get("data") or [] -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /colibri/_version.py line 15
- Likely real
- Uncertain, 40% confidence
Use of exec detected.
14 _ns = {} 15 exec((Path(__file__).resolve().parent.parent / "c" / "version.py").read_text(), _ns) 16 __version__ = _ns["__version__"] -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_olmoe.py line 91
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in snapshot_download()
90 print("Downloading safetensors...") 91 src_dir = snapshot_download(args.repo, max_workers=4) 92 else: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_glm53.py line 362
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in hf_hub_download()
361 def pull(fn, sub): 362 return hf_hub_download(a.repo, fn, token=_meta_token(), 363 local_dir=os.path.join(a.outdir, sub)) 364 index = json.load(open(pull("model.safetensors.index.json", "_meta"))) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fp8_to_int4.py line 1063
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in hf_hub_download()
1062 for fn in ["config.json", "tokenizer.json", "tokenizer_config.json", "generation_config.json"]: 1063 try: shutil.copy(hf_hub_download(a.repo, fn, local_dir=a.outdir+"/_meta"), a.outdir) 1064 except Exception: pass -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fp8_to_int4.py line 857
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in hf_hub_download()
856 try: 857 with open(hf_hub_download(a.repo, "config.json")) as fh: 858 check_model_family(json.load(fh), a.repo) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_olmoe.py line 86
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in snapshot_download()
85 try: 86 src_dir = snapshot_download(args.repo, local_files_only=True, max_workers=4) 87 except LocalEntryNotFoundError: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_olmoe_merged.py line 209
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in hf_hub_download()
208 try: 209 p = hf_hub_download(repo, fn, local_dir=str(out_dir) + "/_meta") 210 shutil.copy2(p, out_dir / fn) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_olmoe_merged.py line 229
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in hf_hub_download()
228 f"({free_gb(out_dir):.0f} GB free)...", flush=True) 229 local_path = hf_hub_download(repo, shard_name, local_dir=str(tmp)) 230 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_qwen36.py line 251
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in hf_hub_download()
250 # download config + index only first (cheap) to learn structure 251 cfg_path = hf_hub_download(args.repo, "config.json", token=token) 252 try: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_qwen36.py line 253
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in hf_hub_download()
252 try: 253 idx_path = hf_hub_download(args.repo, "model.safetensors.index.json", token=token) 254 except Exception: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_qwen36.py line 281
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in hf_hub_download()
280 if args.repo: 281 tok_path = hf_hub_download(args.repo, "tokenizer.json", token=token) 282 else: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_qwen36.py line 347
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in hf_hub_download()
346 if args.repo: 347 p = hf_hub_download(args.repo, name, token=token, local_dir=str(tmp), 348 local_dir_use_symlinks=False) 349 else: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/fetch_benchmarks.py line 51
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in load_dataset()
50 try: 51 return load_dataset(path, cfg, split=split) 52 except (KeyboardInterrupt, SystemExit): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_qwen36_oracle.py line 80
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in snapshot_download()
79 try: 80 mdir = snapshot_download(args.repo, local_files_only=True) 81 except Exception: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_qwen36_oracle.py line 82
- Likely real
- Probably noise, 19% confidence
Unsafe Hugging Face Hub download without revision pinning in snapshot_download()
81 except Exception: 82 mdir = snapshot_download(args.repo) 83 else: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_qwen38_oracle.py line 66
- Likely real
- Probably noise, 17% confidence
Unsafe Hugging Face Hub download without revision pinning in from_pretrained()
65 try: 66 model = Qwen4ExpForCausalLM.from_pretrained( 67 model_dir, 68 torch_dtype=torch.bfloat16, 69 local_files_only=True, 70 ) 71 except Exception as exc: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_deepseek_v4_oracle.py line 38
- Likely real
- Probably noise, 17% confidence
Unsafe Hugging Face Hub download without revision pinning in from_pretrained()
37 try: 38 tokenizer = AutoTokenizer.from_pretrained(model, trust_remote_code=True) 39 model_obj = AutoModelForCausalLM.from_pretrained( -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_deepseek_v4_oracle.py line 39
- Likely real
- Probably noise, 17% confidence
Unsafe Hugging Face Hub download without revision pinning in from_pretrained()
38 tokenizer = AutoTokenizer.from_pretrained(model, trust_remote_code=True) 39 model_obj = AutoModelForCausalLM.from_pretrained( 40 model, trust_remote_code=True, torch_dtype=torch.bfloat16 41 ).eval() 42 except Exception as exc: # noqa: BLE001 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_olmoe_real_oracle.py line 33
- Likely real
- Probably noise, 17% confidence
Unsafe Hugging Face Hub download without revision pinning in from_pretrained()
32 print(f"Loading tokenizer from {MODEL_ID} ...") 33 tokenizer = AutoTokenizer.from_pretrained(MODEL_ID) 34 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_olmoe_real_oracle.py line 42
- Likely real
- Probably noise, 17% confidence
Unsafe Hugging Face Hub download without revision pinning in from_pretrained()
41 print(" (this will use ~14 GB RAM — please be patient)") 42 model = OlmoeForCausalLM.from_pretrained( 43 MODEL_ID, 44 torch_dtype=torch.bfloat16, 45 device_map="cpu", 46 low_cpu_mem_usage=True, 47 ) 48 model.eval() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_qwen36_oracle.py line 87
- Likely real
- Probably noise, 17% confidence
Unsafe Hugging Face Hub download without revision pinning in from_pretrained()
86 print(f"Loading tokenizer from {mdir} ...") 87 tokenizer = AutoTokenizer.from_pretrained(mdir) 88 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_qwen36_oracle.py line 96
- Likely real
- Probably noise, 17% confidence
Unsafe Hugging Face Hub download without revision pinning in from_pretrained()
95 print(" (large models need a lot of RAM -- be patient)") 96 model = AutoModelForCausalLM.from_pretrained( 97 mdir, torch_dtype=torch.bfloat16, device_map="cpu", low_cpu_mem_usage=True 98 ) 99 model.eval() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/quant_ablation.py line 446
- Likely real
- Probably noise, 17% confidence
Unsafe Hugging Face Hub download without revision pinning in from_pretrained()
445 for scheme in schemes: 446 model = AutoModelForCausalLM.from_pretrained( 447 a.model, dtype=torch.float16, low_cpu_mem_usage=True, 448 device_map={"": 0} if a.device == "cuda" else None, trust_remote_code=True) 449 model.eval() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/quant_ablation.py line 437
- Likely real
- Probably noise, 17% confidence
Unsafe Hugging Face Hub download without revision pinning in from_pretrained()
436 437 tk = AutoTokenizer.from_pretrained(a.model, trust_remote_code=True) 438 prefix = detect_prefix(tk) if a.prefix is None else a.prefix -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/prepare_dsv41.py line 116
- Likely real
- Probably noise, 17% confidence
Unsafe Hugging Face Hub download without revision pinning in from_pretrained()
115 from transformers import AutoTokenizer 116 tokenizer = AutoTokenizer.from_pretrained(str(args.model), trust_remote_code=True) 117 token_map, compressed = build_compressed_token_map(tokenizer) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_qwen38_oracle.py line 57
- Likely real
- Probably noise, 17% confidence
Unsafe Hugging Face Hub download without revision pinning in from_pretrained()
56 try: 57 config = AutoConfig.from_pretrained(model_dir, local_files_only=True) 58 except Exception as exc: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_glm53_tiny.py line 85
- Likely real
- Yes, 95% confidence
Possible hardcoded password: '1'
84 "bos_token_id": 0, 85 "eos_token_id": 1, 86 "tie_word_embeddings": False, 87 } 88 89 90 def runtime_config(version: str, fp8_mlp: bool = False) -> dict[str, object]: 91 text = config_kwargs() 92 text.update({ 93 "model_type": "glm5_next_text", 94 "linear_attn_config": { 95 "num_heads": HEADS, 96 "head_dim": HEAD_DIM, 97 "short_conv_kernel_size": 4, 98 "gate_lower_bound": -5.0, 99 "kda_layers": [0, 1, 2], 100 }, 101 "num_nextn_predict_layers": 0, 102 }) 103 result = { 104 "architectures": ["Glm5NextForConditionalGeneration"], 105 "model_type": "glm5_next", 106 "transformers_version": version, 107 "torch_dtype": "float32", 108 "text_config": text, 109 } 110 if fp8_mlp: 111 result["quantization_config"] = { 112 "quant_method": "fp8", 113 "fmt": "e4m3", 114 "activation_scheme": "dynamic", 115 "weight_block_size": [128, 128], 116 } 117 return result 118 119 120 def production_layout(torch, model, head) -> OrderedDict[str, object]: 121 """Recreate the official checkpoint's pre-Transformers disk layout.""" 122 output: OrderedDict[str, object] = OrderedDict() 123 for name, tensor in model.state_dict().items(): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_glm53_multimodal_tiny.py line 87
- Likely real
- Yes, 95% confidence
Possible hardcoded password: '1'
86 "bos_token_id": 0, 87 "eos_token_id": 1, 88 "tie_word_embeddings": False, 89 "linear_attn_config": { 90 "num_heads": 4, "head_dim": 32, "short_conv_kernel_size": 4, 91 "gate_lower_bound": -5.0, "kda_layers": [0, 1, 2], 92 }, 93 "num_nextn_predict_layers": 0, 94 } 95 96 # 8 posizioni, 4 delle quali sono l'immagine, e non all'inizio: se il motore 97 # sbagliasse allineamento con un offset costante, un blocco in testa lo 98 # nasconderebbe. 99 PROMPT_TEXT_BEFORE = "gu" # due byte prima dell'immagine 100 PROMPT_TEXT_AFTER = "xy" # due byte dopo, per vedere se l'allineamento slitta 101 GREEDY_STEPS = 4 102 103 104 @contextmanager 105 def tie_watch(torch, length, select_k): 106 """Segnala se l'indexer ha scelto i pool con un pareggio sul bordo. 107 108 Intercetta le chiamate a topk sui punteggi dei pool per l'ultima posizione, 109 che e' quella che decide il token successivo. Se il k-esimo punteggio e il 110 (k+1)-esimo sono identici, quale pool entri non lo decide il modello.""" 111 tied = [False] 112 original = torch.Tensor.topk 113 114 def watched(self, k, *args, **kwargs): 115 if (self.dim() == 3 and self.shape[0] == 1 and self.shape[1] == length 116 and self.shape[2] <= 2 * select_k + 4): 117 row = sorted((float(v) for v in self[0, length - 1]), reverse=True) 118 if len(row) > select_k and row[select_k - 1] == row[select_k]: 119 tied[0] = True 120 return original(self, k, *args, **kwargs) 121 122 torch.Tensor.topk = watched 123 try: 124 yield tied 125 finally: 126 torch.Tensor.topk = original 127 128 129 def to_checkpoint_names(tensors, torch): 130 """state_dict di transformers -> nomi del checkpoint pubblicato. 131 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_deepseek_v4_oracle.py line 62
- Likely real
- Yes, 95% confidence
Possible hardcoded password: 'exact'
61 "comparison": { 62 "top1_token": "exact", 63 "logits": "max abs error may be reported by future tooling", 64 }, 65 "prompt_ids": prompt_ids, 66 "full_ids": full, -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/doctor.py line 723
- Likely real
- Yes, 95% confidence
Possible hardcoded password: 'ok'
722 def format_doctor(report): 723 icons = {"pass": "ok", "warn": "warn", "fail": "fail", "skip": "skip"} 724 # model is null in the JSON when none was given (#724); say that rather than "None" -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/mw_ur3_raw_adapter.py line 62
- Likely real
- Yes, 95% confidence
Possible hardcoded password: '240'
61 "options": 80, 62 "token_position": 240, 63 "summed_score": 56, 64 "prefix_swallowed": 24, 65 "option_argmax_input": 80, 66 "item_argmax": 20, 67 "register": 420, 68 } 69 BOUNDARY = 2.624e-05 70 AUTHORITY_SHA256 = { 71 "corpus": "d750ab07d611a140836f70ccba31fe28e586630d365131c4ce52e63120a07b6e", 72 "comparisons": "b4c73d22a0d5f7e595f7833f8b31c4669bafbc928fa21192b585df74455f3476", -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_kimi_k3_tiny.py line 131
- Likely real
- Yes, 65% confidence
Possible hardcoded password: '0'
130 }, 131 "bos_token_id": 0, 132 "eos_token_id": EOS_ID, 133 } 134 135 ST_DTYPE = {np.dtype("float32"): "F32", np.dtype("uint8"): "U8"} 136 137 138 def build_tensors(rng): 139 """Every weight of the tiny model, in emission order.""" 140 proj = KDA_HEADS * KDA_HD 141 qk_head = QK_NOPE + QK_ROPE 142 shared_inter = MOE_INTER * SHARED 143 tensors = {} 144 145 def put(name, arr): 146 assert name not in tensors, name 147 tensors[name] = np.ascontiguousarray(arr) 148 149 def normal(*shape, s=0.02): 150 return (rng.standard_normal(shape) * s).astype(np.float32) 151 152 def ones(n): 153 return np.ones(n, dtype=np.float32) 154 155 def mxfp4(rows, cols): 156 """One packed MXFP4 matrix. All 16 e2m1 codes are finite, so any 157 nibble pattern is legal; exponents stay near 127 (2^0) to keep the 158 dequantized magnitudes tame and never hit the 0xFF NaN code.""" 159 packed = rng.integers(0, 256, size=(rows, cols // 2), dtype=np.uint8) 160 scale = rng.integers(124, 131, size=(rows, cols // 32), dtype=np.uint8) 161 return packed, scale 162 163 embed = normal(VOCAB, HIDDEN, s=0.13) 164 put("model.embed_tokens.weight", embed) 165 put("model.norm.weight", ones(HIDDEN)) 166 put("model.output_attn_res_norm.weight", ones(HIDDEN)) 167 put("model.output_attn_res_proj.weight", normal(1, HIDDEN, s=0.1)) 168 # A scaled cyclic shift of the embedding: token t points firmly at 169 # (t+1) % VOCAB, so greedy argmax never rides a near-tie between random 170 # rows. EOS is deliberately unattractive (zero row) so every 171 # fixed-length regression can detect early truncation. 172 lm_head = np.roll(embed, -1, axis=0) * 4.0 173 lm_head[EOS_ID] = 0.0 174 put("lm_head.weight", lm_head) 175 176 for i in range(LAYERS): 177 p = f"model.layers.{i}." 178 put(p + "input_layernorm.weight", ones(HIDDEN)) 179 put(p + "post_attention_layernorm.weight", ones(HIDDEN)) 180 put(p + "self_attention_res_norm.weight", ones(HIDDEN)) 181 put(p + "self_attention_res_proj.weight", normal(1, HIDDEN, s=0.1)) 182 put(p + "mlp_res_norm.weight", ones(HIDDEN)) 183 put(p + "mlp_res_proj.weight", normal(1, HIDDEN, s=0.1)) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_glm53_tiny.py line 84
- Likely real
- Yes, 65% confidence
Possible hardcoded password: '0'
83 "pad_token_id": None, 84 "bos_token_id": 0, 85 "eos_token_id": 1, 86 "tie_word_embeddings": False, 87 } 88 89 90 def runtime_config(version: str, fp8_mlp: bool = False) -> dict[str, object]: 91 text = config_kwargs() 92 text.update({ 93 "model_type": "glm5_next_text", 94 "linear_attn_config": { 95 "num_heads": HEADS, 96 "head_dim": HEAD_DIM, 97 "short_conv_kernel_size": 4, 98 "gate_lower_bound": -5.0, 99 "kda_layers": [0, 1, 2], 100 }, 101 "num_nextn_predict_layers": 0, 102 }) 103 result = { 104 "architectures": ["Glm5NextForConditionalGeneration"], 105 "model_type": "glm5_next", 106 "transformers_version": version, 107 "torch_dtype": "float32", 108 "text_config": text, 109 } 110 if fp8_mlp: 111 result["quantization_config"] = { 112 "quant_method": "fp8", 113 "fmt": "e4m3", 114 "activation_scheme": "dynamic", 115 "weight_block_size": [128, 128], 116 } 117 return result 118 119 120 def production_layout(torch, model, head) -> OrderedDict[str, object]: 121 """Recreate the official checkpoint's pre-Transformers disk layout.""" 122 output: OrderedDict[str, object] = OrderedDict() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_glm53_multimodal_tiny.py line 86
- Likely real
- Yes, 65% confidence
Possible hardcoded password: '0'
85 "pad_token_id": None, # il default della classe cade fuori da VOCAB 86 "bos_token_id": 0, 87 "eos_token_id": 1, 88 "tie_word_embeddings": False, 89 "linear_attn_config": { 90 "num_heads": 4, "head_dim": 32, "short_conv_kernel_size": 4, 91 "gate_lower_bound": -5.0, "kda_layers": [0, 1, 2], 92 }, 93 "num_nextn_predict_layers": 0, 94 } 95 96 # 8 posizioni, 4 delle quali sono l'immagine, e non all'inizio: se il motore 97 # sbagliasse allineamento con un offset costante, un blocco in testa lo 98 # nasconderebbe. 99 PROMPT_TEXT_BEFORE = "gu" # due byte prima dell'immagine 100 PROMPT_TEXT_AFTER = "xy" # due byte dopo, per vedere se l'allineamento slitta 101 GREEDY_STEPS = 4 102 103 104 @contextmanager 105 def tie_watch(torch, length, select_k): 106 """Segnala se l'indexer ha scelto i pool con un pareggio sul bordo. 107 108 Intercetta le chiamate a topk sui punteggi dei pool per l'ultima posizione, 109 che e' quella che decide il token successivo. Se il k-esimo punteggio e il 110 (k+1)-esimo sono identici, quale pool entri non lo decide il modello.""" 111 tied = [False] 112 original = torch.Tensor.topk 113 114 def watched(self, k, *args, **kwargs): 115 if (self.dim() == 3 and self.shape[0] == 1 and self.shape[1] == length 116 and self.shape[2] <= 2 * select_k + 4): 117 row = sorted((float(v) for v in self[0, length - 1]), reverse=True) 118 if len(row) > select_k and row[select_k - 1] == row[select_k]: 119 tied[0] = True 120 return original(self, k, *args, **kwargs) 121 122 torch.Tensor.topk = watched 123 try: 124 yield tied 125 finally: 126 torch.Tensor.topk = original 127 128 129 def to_checkpoint_names(tensors, torch): 130 """state_dict di transformers -> nomi del checkpoint pubblicato. -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/mw_ur3_raw_adapter.py line 1356
- Likely real
- Yes, 65% confidence
Possible hardcoded password: '0'
1355 result = analyze(args) 1356 status = {"PASS": 0, "FAIL": 1, "STOP": 3, "UNSUPPORTED": 4}[result["verdict"]] 1357 except EvidenceError as error: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/mw_ur3_raw_adapter.py line 1133
- Likely real
- Yes, 65% confidence
Possible hardcoded password: '0'
1132 # overall PASS. 1133 _VERDICT_RANK = {"PASS": 0, "UNSUPPORTED": 1, "STOP": 2, "FAIL": 3} 1134 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_glm53_tiny.py line 83
- Likely real
- Uncertain, 45% confidence
Possible hardcoded password: 'None'
82 "swiglu_limit": 10.0, 83 "pad_token_id": None, 84 "bos_token_id": 0, 85 "eos_token_id": 1, 86 "tie_word_embeddings": False, 87 } 88 89 90 def runtime_config(version: str, fp8_mlp: bool = False) -> dict[str, object]: 91 text = config_kwargs() 92 text.update({ 93 "model_type": "glm5_next_text", 94 "linear_attn_config": { 95 "num_heads": HEADS, 96 "head_dim": HEAD_DIM, 97 "short_conv_kernel_size": 4, 98 "gate_lower_bound": -5.0, 99 "kda_layers": [0, 1, 2], 100 }, 101 "num_nextn_predict_layers": 0, 102 }) 103 result = { 104 "architectures": ["Glm5NextForConditionalGeneration"], 105 "model_type": "glm5_next", 106 "transformers_version": version, 107 "torch_dtype": "float32", 108 "text_config": text, 109 } 110 if fp8_mlp: 111 result["quantization_config"] = { 112 "quant_method": "fp8", 113 "fmt": "e4m3", 114 "activation_scheme": "dynamic", 115 "weight_block_size": [128, 128], 116 } 117 return result 118 119 120 def production_layout(torch, model, head) -> OrderedDict[str, object]: 121 """Recreate the official checkpoint's pre-Transformers disk layout.""" -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_glm53_multimodal_tiny.py line 85
- Likely real
- Uncertain, 45% confidence
Possible hardcoded password: 'None'
84 "swiglu_limit": 10.0, 85 "pad_token_id": None, # il default della classe cade fuori da VOCAB 86 "bos_token_id": 0, 87 "eos_token_id": 1, 88 "tie_word_embeddings": False, 89 "linear_attn_config": { 90 "num_heads": 4, "head_dim": 32, "short_conv_kernel_size": 4, 91 "gate_lower_bound": -5.0, "kda_layers": [0, 1, 2], 92 }, 93 "num_nextn_predict_layers": 0, 94 } 95 96 # 8 posizioni, 4 delle quali sono l'immagine, e non all'inizio: se il motore 97 # sbagliasse allineamento con un offset costante, un blocco in testa lo 98 # nasconderebbe. 99 PROMPT_TEXT_BEFORE = "gu" # due byte prima dell'immagine 100 PROMPT_TEXT_AFTER = "xy" # due byte dopo, per vedere se l'allineamento slitta 101 GREEDY_STEPS = 4 102 103 104 @contextmanager 105 def tie_watch(torch, length, select_k): 106 """Segnala se l'indexer ha scelto i pool con un pareggio sul bordo. 107 108 Intercetta le chiamate a topk sui punteggi dei pool per l'ultima posizione, 109 che e' quella che decide il token successivo. Se il k-esimo punteggio e il 110 (k+1)-esimo sono identici, quale pool entri non lo decide il modello.""" 111 tied = [False] 112 original = torch.Tensor.topk 113 114 def watched(self, k, *args, **kwargs): 115 if (self.dim() == 3 and self.shape[0] == 1 and self.shape[1] == length 116 and self.shape[2] <= 2 * select_k + 4): 117 row = sorted((float(v) for v in self[0, length - 1]), reverse=True) 118 if len(row) > select_k and row[select_k - 1] == row[select_k]: 119 tied[0] = True 120 return original(self, k, *args, **kwargs) 121 122 torch.Tensor.topk = watched 123 try: 124 yield tied 125 finally: 126 torch.Tensor.topk = original 127 128 129 def to_checkpoint_names(tensors, torch): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_glm53_tokenizer.py line 76
- Likely real
- Uncertain, 44% confidence
Possible hardcoded password: 'None'
75 "trim_offsets": True, "use_regex": True}, 76 "model": {"type": "BPE", "dropout": None, "unk_token": None, 77 "continuing_subword_prefix": None, "end_of_word_suffix": None, 78 "fuse_unk": False, "byte_fallback": True, 79 "vocab": vocab, "merges": []}, 80 } -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/k3_tokenizer.py line 119
- Likely real
- Uncertain, 44% confidence
Possible hardcoded password: 'None'
118 "model": { 119 "type": "BPE", "dropout": None, "unk_token": None, 120 "continuing_subword_prefix": None, "end_of_word_suffix": None, 121 "fuse_unk": False, "byte_fallback": False, "ignore_merges": True, 122 "vocab": vocab, "merges": merges, 123 }, 124 } 125 with open(out, "w", encoding="utf-8") as f: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_deepseek_v4_tiny.py line 449
- Likely real
- Uncertain, 44% confidence
Possible hardcoded password: 'None'
448 "dropout": None, 449 "unk_token": None, 450 "continuing_subword_prefix": "", 451 "end_of_word_suffix": "", 452 "fuse_unk": False, 453 "byte_fallback": False, 454 "ignore_merges": True, 455 "vocab": {"x": VOCAB - 1}, 456 "merges": [], 457 }, 458 } 459 460 461 def greedy_reference(torch, model, prompt: list[int], max_new: int) -> tuple[list[int], list[int]]: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_dsv41_tiny.py line 191
- Likely real
- Uncertain, 44% confidence
Possible hardcoded password: 'None'
190 "trim_offsets": True, "use_regex": True}, 191 "model": {"type": "BPE", "dropout": None, "unk_token": None, 192 "continuing_subword_prefix": "", "end_of_word_suffix": "", 193 "fuse_unk": False, "byte_fallback": False, "ignore_merges": True, 194 "vocab": vocab, "merges": []}, 195 } -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_edge_tiny_tokenizer.py line 63
- Likely real
- Uncertain, 44% confidence
Possible hardcoded password: 'None'
62 "model": { 63 "type": "BPE", "dropout": None, "unk_token": None, 64 "continuing_subword_prefix": "", "end_of_word_suffix": "", 65 "fuse_unk": False, "byte_fallback": False, 66 "ignore_merges": True, "vocab": vocab, "merges": [], 67 }, 68 } 69 output = args.model_dir / "tokenizer.json" -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_glm53_tiny.py line 289
- Likely real
- Uncertain, 44% confidence
Possible hardcoded password: 'None'
288 "post_processor": None, "decoder": None, 289 "model": {"type": "BPE", "dropout": None, "unk_token": None, 290 "continuing_subword_prefix": "", "end_of_word_suffix": "", 291 "fuse_unk": False, "byte_fallback": False, 292 "ignore_merges": True, "vocab": {"x": VOCAB - 1}, "merges": []}, 293 } -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/fetch_benchmarks.py line 86
- Likely real
- Probably noise, 28% confidence
Try, Except, Continue detected.
85 rows.append({"ctx": ctx, "choices": choices, "gold": gold}); n += 1 86 except Exception: continue 87 if n >= a.limit: break -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_glm53.py line 175
- Likely real
- Probably noise, 14% confidence
Consider possible security implications associated with the subprocess module.
174 un'ora di download perche' la rete ha rallentato.""" 175 import subprocess 176 os.makedirs(dest_dir, exist_ok=True) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_glm53.py line 236
- Likely real
- Probably noise, 14% confidence
Consider possible security implications associated with the subprocess module.
235 NEMMENO un byte: un link che oscilla continua, un link morto no.""" 236 import subprocess 237 os.makedirs(dest_dir, exist_ok=True) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/diag_harness.py line 30
- Likely real
- Probably noise, 14% confidence
Consider possible security implications associated with the subprocess module.
29 """ 30 import os, sys, re, json, time, argparse, subprocess, signal, traceback 31 from datetime import datetime -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/eval_glm.py line 25
- Likely real
- Probably noise, 14% confidence
Consider possible security implications associated with the subprocess module.
24 """ 25 import os, sys, subprocess, argparse, random, json, tempfile, time, threading 26 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/k3_tokenizer.py line 151
- Likely real
- Probably noise, 14% confidence
Consider possible security implications associated with the subprocess module.
150 import struct as _st 151 import subprocess 152 try: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/benchmark_cuda_fixture.py line 8
- Likely real
- Probably noise, 14% confidence
Consider possible security implications associated with the subprocess module.
7 import statistics 8 import subprocess 9 from pathlib import Path -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/efficiency.py line 26
- Likely real
- Probably noise, 14% confidence
Consider possible security implications associated with the subprocess module.
25 import re 26 import subprocess 27 from pathlib import Path -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 10
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
9 import statistics 10 import subprocess 11 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/autotune.py line 18
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
17 import statistics 18 import subprocess 19 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/doctor.py line 8
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
7 import re 8 import subprocess 9 from pathlib import Path -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/download_fp8.py line 8
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
7 """ 8 import os, time, threading, argparse, subprocess 9 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/blocksweep.py line 27
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
26 import statistics 27 import subprocess 28 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/datapoint.py line 37
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
36 import statistics 37 import subprocess 38 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/openai_server.py line 17
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
16 import socket 17 import subprocess 18 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/benchmark_continuous_batch.py line 8
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
7 import statistics 8 import subprocess 9 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/benchmark_kv_prefix.py line 7
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
6 import os 7 import subprocess 8 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/benchmark_serving_interference.py line 8
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
7 import statistics 8 import subprocess 9 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_deepseek_v4_oracle.py line 23
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
22 import os 23 import subprocess 24 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/run_tests.py line 9
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
8 import os 9 import subprocess 10 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 799
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
798 try: 799 result = subprocess.run(["lscpu", "-p=socket"], text=True, 800 capture_output=True, check=True, timeout=5) 801 sockets = {int(line) for line in result.stdout.splitlines() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/doctor.py line 501
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
500 try: 501 result = subprocess.run(["ldd", str(engine)], capture_output=True, text=True, 502 timeout=3, check=False) 503 except (OSError, subprocess.SubprocessError): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 745
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
744 # count -- the opposite of the fix). 745 result = subprocess.run(["lscpu", "-p=core,socket"], text=True, 746 capture_output=True, check=True, timeout=5) 747 cores = set() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/datapoint.py line 79
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
78 if sys.platform == "darwin": 79 info["cpu"] = subprocess.run(["sysctl", "-n", "machdep.cpu.brand_string"], 80 capture_output=True, text=True).stdout.strip() 81 mem = subprocess.run(["sysctl", "-n", "hw.memsize"], -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/datapoint.py line 81
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
80 capture_output=True, text=True).stdout.strip() 81 mem = subprocess.run(["sysctl", "-n", "hw.memsize"], 82 capture_output=True, text=True).stdout.strip() 83 info["ram"] = f"{int(mem) / 1073741824:.0f} GB" -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/datapoint.py line 163
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
162 if sys.platform == "darwin": 163 r = subprocess.run(["purge"], capture_output=True) 164 if r.returncode == 0: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 725
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
724 try: 725 result = subprocess.run(["sysctl", "-n", "hw.physicalcpu"], text=True, 726 capture_output=True, check=True, timeout=5) 727 cores = int(result.stdout.strip()) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 717
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
716 try: 717 result = subprocess.run(["sysctl", "-n", "hw.perflevel0.logicalcpu"], 718 text=True, capture_output=True, check=True, timeout=5) 719 cores = int(result.stdout.strip()) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 325
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
324 try: 325 total = subprocess.run(["sysctl", "-n", "hw.memsize"], text=True, 326 capture_output=True, timeout=5).stdout.strip() 327 if total: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 312
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
311 try: 312 out = subprocess.run(["vm_stat"], text=True, capture_output=True, timeout=5).stdout 313 page_match = re.search(r"page size of (\d+) bytes", out) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/doctor.py line 440
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
439 try: 440 result = subprocess.run(["ldd", str(engine)], capture_output=True, text=True, 441 timeout=3, check=False) 442 except (OSError, subprocess.SubprocessError): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/doctor.py line 440
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
439 try: 440 result = subprocess.run(["ldd", str(engine)], capture_output=True, text=True, 441 timeout=3, check=False) 442 except (OSError, subprocess.SubprocessError): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/run_tests.py line 14
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
13 for binary in sys.argv[1:]: 14 rc = subprocess.call([os.path.normpath(binary)]) 15 if rc != 0: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_deepseek_v4_oracle.py line 77
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
76 merged.update(env) 77 return subprocess.run(cmd, check=False, env=merged) 78 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/k3_tokenizer.py line 176
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
175 f.write(_st.pack("<I", len(b)) + b) 176 r = subprocess.run([a.ctest, out, cases], capture_output=True, text=True) 177 finally: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/eval_glm.py line 158
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
157 t0 = time.time() 158 proc = subprocess.Popen(cmd, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE, 159 text=True, bufsize=1) # line-buffered 160 lp = [None] * len(reqs) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/efficiency.py line 412
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
411 412 proc = subprocess.run( 413 [engine, str(cap), str(ebits), str(dbits)], 414 env=env, capture_output=True, text=True, timeout=timeout, 415 ) 416 telemetry = parse_run(proc.stdout, proc.stderr) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/diag_harness.py line 495
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
494 with open(log_path, "w", encoding="utf-8") as logf: 495 proc = subprocess.run(cmd, env=env, capture_output=True, text=True, timeout=self.args.timeout*3, 496 encoding="utf-8", errors="replace") 497 logf.write(proc.stdout); logf.write("\n--- STDERR ---\n"); logf.write(proc.stderr) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/diag_harness.py line 207
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
206 try: 207 proc = subprocess.Popen(cmd, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE, 208 text=True, encoding="utf-8", errors="replace") 209 try: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/datapoint.py line 510
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
509 def run_iobench(iobench, shard, mode): 510 proc = subprocess.run([iobench, shard, "19", "64", "8", str(mode)], 511 capture_output=True, text=True) 512 m = IOBENCH_RE.search(proc.stdout) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/autotune.py line 385
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
384 command = [sys.executable, *command] 385 return subprocess.run(command, env=env, text=True, capture_output=True, timeout=timeout) 386 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/benchmark_cuda_fixture.py line 48
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
47 def execute(engine: str, env: dict[str, str]) -> tuple[float, list[float], list[float]]: 48 run = subprocess.run( 49 [engine, "4", "4", "4"], env=env, text=True, capture_output=True, check=True 50 ) 51 speed, profile = parse_output(run.stdout, run.stderr) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/benchmark_continuous_batch.py line 120
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
119 ) 120 proc = subprocess.Popen( 121 [args.engine, "8", "4", "4"], 122 stdin=subprocess.PIPE, 123 stdout=subprocess.PIPE, 124 stderr=subprocess.PIPE, 125 env=env, 126 ) 127 stderr_lines = [] -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 799
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
798 try: 799 result = subprocess.run(["lscpu", "-p=socket"], text=True, 800 capture_output=True, check=True, timeout=5) 801 sockets = {int(line) for line in result.stdout.splitlines() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 745
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
744 # count -- the opposite of the fix). 745 result = subprocess.run(["lscpu", "-p=core,socket"], text=True, 746 capture_output=True, check=True, timeout=5) 747 cores = set() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 725
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
724 try: 725 result = subprocess.run(["sysctl", "-n", "hw.physicalcpu"], text=True, 726 capture_output=True, check=True, timeout=5) 727 cores = int(result.stdout.strip()) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 717
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
716 try: 717 result = subprocess.run(["sysctl", "-n", "hw.perflevel0.logicalcpu"], 718 text=True, capture_output=True, check=True, timeout=5) 719 cores = int(result.stdout.strip()) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 606
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
605 try: 606 result = subprocess.run(command, text=True, capture_output=True, check=True, timeout=5) 607 except (OSError, subprocess.SubprocessError): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 587
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
586 try: 587 result = subprocess.run([str(hipinfo)], text=True, capture_output=True, 588 check=True, timeout=10) 589 except (OSError, subprocess.SubprocessError): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 442
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
441 try: 442 result = subprocess.run(command, text=True, capture_output=True, check=True, timeout=5) 443 except (OSError, subprocess.SubprocessError): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 325
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
324 try: 325 total = subprocess.run(["sysctl", "-n", "hw.memsize"], text=True, 326 capture_output=True, timeout=5).stdout.strip() 327 if total: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/resource_plan.py line 312
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
311 try: 312 out = subprocess.run(["vm_stat"], text=True, capture_output=True, timeout=5).stdout 313 page_match = re.search(r"page size of (\d+) bytes", out) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/openai_server.py line 2944
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
2943 child_env.pop("COLI_PLAN_CAP", None) 2944 self.process = subprocess.Popen( 2945 [str(executable), str(resolved_cap)], env=child_env, 2946 stdin=subprocess.PIPE, stdout=subprocess.PIPE, bufsize=0, 2947 ) 2948 # Keep the job handle on the instance: KILL_ON_JOB_CLOSE fires when the -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/download_fp8.py line 80
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
79 "-o", partpath, "-H", "User-Agent: colibri-download/1.0", url] 80 subprocess.run(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) 81 if os.path.exists(partpath) and os.path.getsize(partpath) >= expected_size: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/doctor.py line 501
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
500 try: 501 result = subprocess.run(["ldd", str(engine)], capture_output=True, text=True, 502 timeout=3, check=False) 503 except (OSError, subprocess.SubprocessError): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/benchmark_serving_interference.py line 55
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
54 ) 55 proc = subprocess.Popen( 56 [args.engine, "8", "4", "4"], 57 stdin=subprocess.PIPE, 58 stdout=subprocess.PIPE, 59 stderr=subprocess.PIPE, 60 env=env, 61 ) 62 stderr_lines = [] -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/datapoint.py line 163
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
162 if sys.platform == "darwin": 163 r = subprocess.run(["purge"], capture_output=True) 164 if r.returncode == 0: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/datapoint.py line 81
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
80 capture_output=True, text=True).stdout.strip() 81 mem = subprocess.run(["sysctl", "-n", "hw.memsize"], 82 capture_output=True, text=True).stdout.strip() 83 info["ram"] = f"{int(mem) / 1073741824:.0f} GB" -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/datapoint.py line 79
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
78 if sys.platform == "darwin": 79 info["cpu"] = subprocess.run(["sysctl", "-n", "machdep.cpu.brand_string"], 80 capture_output=True, text=True).stdout.strip() 81 mem = subprocess.run(["sysctl", "-n", "hw.memsize"], -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_glm53.py line 257
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
256 with open(path, "ab") as sink: 257 subprocess.run(command, stdout=sink, check=False) 258 grown = (os.path.getsize(path) if os.path.exists(path) else 0) - have -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_glm53.py line 201
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
200 return target 201 child = subprocess.Popen([sys.executable, "-c", code, repo, filename, dest_dir], 202 env=environment, 203 stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) 204 last_bytes, last_move = _partial_bytes(dest_dir), time.time() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/blocksweep.py line 37
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
36 def run(iobench, shard, blk, reads, threads, direct): 37 p = subprocess.run([iobench, shard, str(blk), str(reads), str(threads), str(direct)], 38 capture_output=True, text=True) 39 m = GBS.search(p.stdout) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/benchmark_kv_prefix.py line 93
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
92 ) 93 proc = subprocess.Popen( 94 [args.engine, "8", "4", "4"], 95 stdin=subprocess.PIPE, 96 stdout=subprocess.PIPE, 97 stderr=subprocess.PIPE, 98 env=env, 99 ) 100 stderr_lines = [] -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/datapoint.py line 461
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
460 try: 461 proc = subprocess.run(cmd, input=stdin_input, capture_output=True, 462 text=True, env=env) 463 finally: -
- Engine
- Dependency checker · CVEs, typosquats and risky installs
- Counts towards
- Supply chain
- File
- pyproject.toml
- Likely real
- Probably noise, 2% confidence
Loose version constraint: 'transformers>=4.40' — attacker could push malicious update
transformers>=4.40 -
- Engine
- Dependency checker · CVEs, typosquats and risky installs
- Counts towards
- Supply chain
- File
- pyproject.toml
- Likely real
- Probably noise, 2% confidence
Loose version constraint: 'torch>=2.0' — attacker could push malicious update
torch>=2.0 -
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/tools/convert_fp8_to_int4.py
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/tools/make_kimi_k3_ref.py
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/coli
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/tools/try_tool_calling.py
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/tools/repair_mtp_int8.py
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/download_fp8.py
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /c/cluster.py
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fp8_to_int4.py line 321
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
320 # invece di corrompere silenziosamente ogni tensore. EN: guard modelopt-vs-CT. 321 assert float(gscale) < 1.0, ( 322 f"{name}: weight_scale_2={float(gscale):.4g} >= 1 sembra il reciproco " 323 "(compressed-tensors, che DIVIDE); questo path assume modelopt (MOLTIPLICA)") 324 # Il layout deve essere lo scale per-blocco piatto di modelopt: una colonna ogni -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_inkling_int4.py line 321
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
320 got = deinterleave(fused, 0) 321 assert torch.equal(got[:6], g) and torch.equal(got[6:], u) 322 # 2) int4 pack/unpack round-trip against the C engine's convention -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_inkling_int4.py line 318
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
317 fused = interleave(torch.cat([g, u]), 0) 318 assert torch.equal(fused[0], g[0]) and torch.equal(fused[1], u[0]), \ 319 "interleave: row 0 must be gate0, row 1 up0" 320 got = deinterleave(fused, 0) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_inkling_int4.py line 56
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
55 O, I = w.shape 56 assert I % 2 == 0 57 s = np.abs(w).max(axis=1, keepdims=True) / 7.0 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fp8_to_int4.py line 976
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
975 return _download_single(url, fn, out, part, expected) 976 assert sum(done) == expected 977 if os.path.exists(side): os.remove(side) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fp8_to_int4.py line 676
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
675 f"(atteso ~0.17; {'OK' if rel < 0.30 else 'ANOMALO'})") 676 assert rel < 0.30, f"requant rel err {rel:.3f} troppo alto: dequant probabilmente corrotto" 677 print("[nvfp4] SELFTEST OK") -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fp8_to_int4.py line 662
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
661 f"({'OK' if maxerr < 1e-9 else 'FAIL'})") 662 assert maxerr < 1e-9 663 # 3) requant colibri int4 su valori dequantati -> errore piccolo atteso -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fp8_to_int4.py line 625
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
624 expect = [0.0,0.5,1.0,1.5,2.0,3.0,4.0,6.0,-0.0,-0.5,-1.0,-1.5,-2.0,-3.0,-4.0,-6.0] 625 assert lut.tolist() == expect, "LUT e2m1 errata" 626 print("[nvfp4] LUT e2m1: 16/16 codici OK") -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fp8_to_int4.py line 328
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
327 nb = (I + GS - 1) // GS 328 assert bscale.shape[1] == nb, ( 329 f"{name}: weight_scale ha {bscale.shape[1]} colonne, attese {nb} = ceil({I}/{GS}); " 330 "layout scale inatteso (swizzled/paddato?), rifiuto per non corrompere") 331 lut = torch.tensor(_E2M1, dtype=torch.float32) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_inkling_int4.py line 332
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
331 ref = np.clip(np.rint(w / s[:, None]), -8, 7) * s[:, None] 332 assert np.array_equal(deq, ref), "int4 round-trip mismatch" 333 # 3) name mapping spot checks -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fmt4_to_fmt2.py line 287
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
286 want, got = expected_size(items), os.path.getsize(p) 287 assert want == got, f"expected_size {want} != real {got} (case {k})" 288 print("[selftest] expected_size == save_file size on 10/10 cases OK") -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fmt4_to_fmt2.py line 271
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
270 q2, s2 = convert_fmt4_to_fmt2(q4, s4, 1, 64) 271 assert q2[0] == 0x1F, (f"nibble order wrong: byte {q2[0]:#06x} != 0x1f " 272 "(low nibble must be the even element)") 273 print("[selftest] nibble order: low nibble = even element OK") -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fmt4_to_fmt2.py line 269
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
268 q4, s4 = quant_int4_grouped(w1, 4, GS) # q = [+7, -7, ...] -> byte 0x1F 269 assert q4[0] == 0x1F, f"fmt=4 fixture byte {q4[0]:#06x} != 0x1f" 270 q2, s2 = convert_fmt4_to_fmt2(q4, s4, 1, 64) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fmt4_to_fmt2.py line 264
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
263 f"({'OK' if rel < 0.10 else 'FAIL'})") 264 assert rel < 0.10, f"round-trip rel err {rel:.3f} too high" 265 # 2) nibble order through the whole path: even element -> LOW nibble -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fmt4_to_fmt2.py line 254
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
253 assert q2.shape == (O * I // 2,), q2.shape 254 assert s2.shape == (O,), f".qs must have exactly O floats, got {s2.shape}" 255 ref = dequant_fmt4(q4, s4, O, I) # dequant of the fmt=4 source -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fmt4_to_fmt2.py line 253
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
252 q2, s2 = convert_fmt4_to_fmt2(q4, s4, O, I) 253 assert q2.shape == (O * I // 2,), q2.shape 254 assert s2.shape == (O,), f".qs must have exactly O floats, got {s2.shape}" -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_fmt4_to_fmt2.py line 251
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
250 q4, s4 = quant_int4_grouped(w, 4, GS) 251 assert q4.shape == (O * I // 2,) and s4.shape == (O * I // GS,) 252 q2, s2 = convert_fmt4_to_fmt2(q4, s4, O, I) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/repair_mtp_int8.py line 211
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
210 w = src.fetch_f32(nm) 211 assert w.shape == (O, I), f"{nm}: source shape {w.shape} != container {O}x{I}" 212 q, s = quant_int8(w) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_kimi_k3_ref.py line 152
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
151 assert cu_seqlens is None, "packed sequences not expected here" 152 assert initial_state is None, "cache-free reference only" 153 if use_qk_l2norm_in_kernel: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_kimi_k3_ref.py line 181
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
180 chunk_indices=None, **_ignored): 181 assert mask is None and cache is None and cu_seqlens is None 182 assert not output_final_state, "cache-free reference only" -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_kimi_k3_ref.py line 182
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
181 assert mask is None and cache is None and cu_seqlens is None 182 assert not output_final_state, "cache-free reference only" 183 length = x.shape[1] -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_kimi_k3_ref.py line 202
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
201 residual_in_fp32=False): 202 assert residual is None and not prenorm 203 xf = x.float() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_kimi_k3_tiny.py line 146
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
145 def put(name, arr): 146 assert name not in tensors, name 147 tensors[name] = np.ascontiguousarray(arr) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/quant_ablation.py line 148
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
147 K = orig[-1] 148 assert K % 256 == 0, "iq3 needs multiples of 256 along the input dim" 149 xb = x.reshape(-1, 256) # super-blocks -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/rans_format.py line 81
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
80 total = hist.sum() 81 assert total > 0 82 n_present = int(np.count_nonzero(hist)) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/rans_format.py line 112
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
111 i += 1 112 assert freq.sum() == m, (freq.sum(), m) 113 return freq.astype(np.uint32) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/make_kimi_k3_ref.py line 151
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
150 # our reference forward is single-sequence, cache-free 151 assert cu_seqlens is None, "packed sequences not expected here" 152 assert initial_state is None, "cache-free reference only" -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/k3_repack.py line 213
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
212 da, db = vh[name]["data_offsets"] 213 assert sb - sa == db - da, name 214 fs.seek(data_start + sa) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/k3_ref.py line 327
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
326 B = np.fromfile(a.b, dtype=np.float32).reshape(-1, a.layers, a.dim) 327 assert A.shape == B.shape, (A.shape, B.shape) 328 worst = 0.0 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/dsv4_vllm_reference.py line 46
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
45 46 assert output is not None 47 print(f"VLLM_REFERENCE tokens={made} elapsed={elapsed:.6f}s speed={made / elapsed:.4f} tok/s") -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/dsv41_ref.py line 124
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
123 rows, cols = w.shape 124 assert cols % group == 0 125 grouped = w.reshape(rows, cols // group, group) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/dsv41_ref.py line 93
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
92 rows, cols = w.shape 93 assert cols % group == 0 and group % 2 == 0, (cols, group) 94 grouped = w.reshape(rows, cols // group, group) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/dsv41_ref.py line 63
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
62 rows, cols = w.shape 63 assert rows % block == 0 and cols % block == 0, (rows, cols, block) 64 tiles = w.reshape(rows // block, block, cols // block, block).permute(0, 2, 1, 3) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /c/tools/convert_inkling_int4.py line 352
- Likely real
- Probably noise, 0% confidence
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
351 got = map_name(src) 352 assert got == want, f"map_name({src}) = {got}, want {want}" 353 print("SELFTEST OK")
No findings match these filters.