Files
html/api/secret-scanner-api.php
2026-04-12 22:57:03 +02:00

8 lines
431 B
PHP

<?php
header("Content-Type: application/json");
$rf="/opt/weval-security/scan-results.json";
$a=$_GET["action"]??"results";
if($a==="results"&&file_exists($rf)){echo file_get_contents($rf);exit;}
if($a==="scan"){exec("sudo python3 /opt/weval-security/secret-scanner.py &");echo json_encode(["ok"=>true]);exit;}
echo json_encode(["service"=>"secret-scanner","tools"=>["trufflehog","detect-secrets","dorking","keyhacks","shhgit"]]);