ascendc-operator-project-init
Audited by Socket on Apr 3, 2026
3 alerts found:
Anomalyx3This module fragment is a thin wrapper that derives a local on-disk path from __file__ and immediately loads a packaged native library (`lib/libascend_kernel.so`) via `torch.ops.load_library`. The Python code itself shows no overt malicious logic, but the design creates a high-impact supply-chain trust boundary: if the shipped `.so` is tampered with or malicious, it will execute arbitrary native code within the importing process. Verify package/artifact integrity and inspect/sign the native binary for provenance and behavior.
No direct evidence of classic malware (no network exfiltration, credential theft, or explicit backdoor behavior) is present in this fragment. The main security concern is supply-chain execution risk: the code dynamically loads and invokes symbols from native shared libraries (libopapi.so/libcust_opapi.so) resolved at runtime without path/signature hardening. In the right threat model (loader search path hijack), this could allow execution of a malicious shared object. Additional context (how these libraries are packaged/loaded and what CalcHashId/AddParamToBuf do) would be needed for higher-confidence assessment.
This appears to be a legitimate build/packaging orchestration script, but it contains notable build-time supply-chain risk: it dynamically sources set_env.sh based on a toolkit path read from a system file, and it executes python setup.py during wheel creation (any repository tampering would execute code). It also conditionally fetches wheel from the network if missing. No direct malware behavior (exfiltration/backdoor/credential theft) is evidenced in this snippet alone; however, the trust boundaries around set_env.sh and setup.py should be treated as critical for integrity verification and build hardening.