Spaces:
Runtime error
Runtime error
File size: 438 Bytes
2db1727 | 1 2 3 4 5 6 7 8 9 10 | def analyze_code(code):
findings = []
if "eval(" in code:
findings.append("⚠️ Usage of eval() – can lead to code injection.")
if "exec(" in code:
findings.append("⚠️ Usage of exec() – dangerous if input is not sanitized.")
if "password" in code:
findings.append("🔑 Found possible hardcoded password or credentials.")
return "\n".join(findings) or "✅ No critical issues found."
|