triton-operator-precision-eval
Warn
Audited by Gen Agent Trust Hub on Sep 20, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: The script
examples/generate_layer_norm_report.pyand the utility filescripts/test_common.pyutilize theeval()function to dynamically resolve PyTorch data types from strings (e.g.,eval('torch.' + dtype)). While the current implementation checks thedtypevariable against a whitelist of supported strings before execution, the use ofeval()for dynamic property access is a risky coding pattern that could allow for arbitrary code execution if the validation logic is bypassed or if malicious strings are introduced into the variable. - [INDIRECT_PROMPT_INJECTION]: The
generate_reportfunction inexamples/generate_layer_norm_report.pycaptures and writes raw exception messages to the generated report file (specificallyresult['error'][:100]). Because these error messages can originate from hardware operations or kernel failures that might be influenced by external data or manipulated operators, this creates an injection surface. If an agent subsequently reads these reports, it could be exposed to malicious instructions embedded within the captured error output. - Ingestion points: Exception messages captured during the execution of
triton_layer_normandtorch_layer_norminexamples/generate_layer_norm_report.py. - Boundary markers: None; error messages are written directly into the text blocks of the report.
- Capability inventory: File writing (
openwith 'w' mode), execution of Triton kernels viatriton.jit, and PyTorch operations on NPU hardware. - Sanitization: None; the error message is simply truncated to 100 characters before being written to the report.
Audit Metadata