KernelGuard is a rule-based GPU kernel hack detector for Python. It scans CUDA and HIP kernel source for suspicious patterns indicative of potential exploits or malicious modifications. Version 0.2.2 is current, with weekly releases.
pip install kernelguardNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic scan with custom rule.
with open('kernel.cu') as f: source = f.read()scanner = KernelScanner(); scanner.add_rule(rule)
from kernelguard import RuleSeverity; rule = Rule(..., severity=RuleSeverity.HIGH)
Use r"pattern" instead of "pattern".
No dependency data recorded yet.