
Loophalt is a static security scanner that ships as one Python file with zero dependencies. Point it at a codebase and it finds hardcoded secrets, injection flaws, XSS and more — then ranks every finding by priority score and tells you why each one matters and how to fix it.
DOGFOODED — LOOPHALT SCANS ITS OWN CODEBASE CLEAN · GITHUB ACTION VERIFIED IN CI · SARIF → GITHUB SECURITY TAB
Loophalt follows user input from source to sink — req.query.cmd → cmd → exec — so findings are real, reachable flows instead of keyword noise.
Every finding carries a priority score (0–100) and a band — P1 to P4 — built from its severity, whether taint tracking verified the flow, and the weakness class. Reports come out sorted fix-first, so the worst holes are always on top.
Each result explains the risk in plain English and ships the concrete fix. No cryptic rule codes that send you to a wiki — the answer is in the output.
No SaaS onboarding, no required config, no telemetry, no API keys. If Python 3 runs — laptop, CI runner, air-gapped box — Loophalt runs. Offline, in seconds.
Every check Loophalt runs, explained the way you'd explain it to a friend. Big plain name first — the technical code stays small, for those who want it. All 112 run together in every scan; nothing to select or configure.
The #1 problem in AI-built apps — secrets typed straight into the code.
API keys and tokens typed directly into your files — visible to anyone who ever sees the project.
A real password sitting in a file instead of a private settings area.
The master key file of your server, included in the code folder itself.
Amazon/AWS access keys hardcoded — someone could run up cloud bills in your name.
Random-looking strings that behave exactly like passwords, even if nobody labelled them.
Passwords or tokens written into log files, where they quietly stay forever.
Ways a visitor can steal, change or delete your data through normal-looking forms.
Typed input slips into database commands — the classic way entire customer lists get stolen. Covers JavaScript, Python, Go and PHP.
The same trick aimed at MongoDB-style databases — login forms are the favourite target.
Company directory lookups built from typed input can be twisted to bypass logins.
XML searches built from typed input — attackers can pull out data the query was never meant to return.
C# queries built from typed input — string-built SQL in SqlCommand lets an attacker rewrite the query and read or change your data.
Rust queries built from typed input — string-built SQL via format! or tainted variables in sqlx and rusqlite lets an attacker rewrite the query and read or change your data.
Code that lets a visitor run things on your site or server they should never touch.
Comments and reviews shown without cleaning, so attackers can hide scripts in them. Four patterns covered.
User input written straight to the page with Response.Write — no encoding, so a crafted value runs as script in every visitor's browser.
Visitor input turned into server commands — the attacker ends up driving your machine.
User input routed through cmd.exe or PowerShell via Process.Start — the attacker appends commands that run with the app's privileges.
User input routed through a shell via Command::new("sh").arg("-c") — the attacker appends commands that run with the app's privileges.
eval() and friends running text as code — if any of that text comes from a visitor, game over.
A module name built from visitor input gets imported and run — any installed module becomes the attacker's code.
Visitor input handed to Node's vm module (runInContext, Script, compileFunction) runs as code inside your server process — the sandbox that was never a sandbox.
Your server tricked into calling internal addresses it should never reveal or reach.
A JavaScript flaw where attackers quietly rewrite how your whole app behaves.
Uploaded XML files that make your server hand over its own private files.
A pattern so tangled that one crafted input can freeze your site for everyone.
A Go handler reads the whole request body with io.ReadAll and no size limit — one oversized upload can exhaust the server's memory. Bounded reads with LimitReader stay silent.
A Go server started with ListenAndServe and no read/write timeouts — a slow client can hold a connection open forever (Slowloris). Servers with timeouts set stay silent.
User input used as the template itself — Jinja2, EJS, Pug, Go templates or Twig — lets an attacker run code on your server.
User-influenced values written into response headers can smuggle extra headers — or a whole fake response — into the reply.
libxmljs parsers with entity expansion switched on can be fed documents that blow up memory or reach local files.
insertAdjacentHTML, Vue v-html and Angular bypassSecurityTrust* render raw HTML — the same hole as innerHTML, in framework clothing.
Anything your app opens, unzips or accepts from a visitor.
Tricks like "../" that let visitors read files outside the folder they were allowed into.
A booby-trapped ZIP that writes files anywhere on your server when opened.
Upload boxes that never check what kind of file arrived — a favourite break-in route.
Saved-data formats (pickle, unserialize) that execute whatever an attacker packed inside.
jsonpickle.decode and v8.deserialize rebuild objects from attacker data — code execution hiding in a saved file.
BinaryFormatter.Deserialize on attacker-controlled bytes — the classic .NET gadget-chain route to code execution.
The quiet switches that decide whether your logins and settings actually protect you.
JWT tokens read but never actually checked — a forged token sails straight in.
Settings that accept unsigned tokens, or secrets so short anyone can guess them.
Authentication shortcuts that look fine and fail quietly under attack.
Without it, a malicious page can make your logged-in visitors act without knowing.
Your app answering data requests from literally any website on the internet.
Links on your own trusted domain that silently bounce visitors to scam sites.
Standard browser protections (CSP, frame guards) simply never switched on.
Developer debug screens still active in the live app — they leak how everything works.
Full technical error messages handed to strangers — a map for attackers.
Session cookies set without HttpOnly can be stolen by any script that slips onto the page.
Echoing back any request Origin — or pairing credentials with a wildcard — lets any site act as your user.
Comparing tokens with == leaks timing hints, and PHP type juggling can turn a wrong secret into a match.
JavaScript that sends visitors to a URL taken from the page — a phishing link wearing your domain.
How passwords are stored and how data travels.
Passwords hashed with MD5 — crackable in seconds with free tools.
SHA-1 is retired for passwords for a reason — nearly as fast to crack as MD5.
Encryption methods from another era, broken by modern computers.
Encryption done with a fixed starting value, or ECB mode that leaks patterns in your data.
Fast hashes are built for speed — exactly what makes passwords crackable. Passwords need a slow hash like bcrypt or Argon2.
TLS verification disabled — your app will happily talk to a fake server.
Old connection protocols (TLS 1.0/1.1) that browsers and attackers both left behind.
"Random" codes and tokens an attacker can guess — session IDs, reset links, OTPs.
PHP rand(), mt_rand() and uniqid() are predictable — fine for shuffling a list, fatal for tokens and OTPs.
Certificate checks disabled at the SSL layer — ssl.CERT_NONE, unverified contexts, or NODE_TLS_REJECT_UNAUTHORIZED=0 — let a fake server in.
C# code that accepts any server certificate — ServerCertificateCustomValidationCallback returning true, or RemoteCertificateValidationCallback switched off — lets a fake server in.
Your code is only half the attack surface — Loophalt also reads the Terraform, Kubernetes and Docker files that run it.
S3 buckets left public, security groups open to the whole internet (0.0.0.0/0), databases with encryption switched off, and IAM policies that allow everything — caught in your .tf files before they ship.
Privileged containers, privilege escalation left on, pods sharing the host namespaces, and unpinned :latest images — the settings that turn one container into the whole cluster.
Containers running as root, secrets baked into the image, remote scripts piped straight into a shell, and sudo installed in production images.
Scanning code is only half the job. Loophalt Server Guard watches your live web and SSH logs, scores every suspicious IP, rings the alarm — terminal, email, Telegram or webhook — and auto-bans repeat offenders at the firewall, whitelist-protected and dry-run by default. It even runs Loophalt's own scans on the server's code on a schedule, so code holes and live attacks land in one dashboard.
Server Guard tails Apache/Nginx access logs and SSH/auth logs in real time — and listens on decoy honeypot ports for anyone poking around.
Probes for /.env and /wp-admin, SQL injection, XSS, traversal, scanner tools and SSH brute force all add points — LOW 5 · MEDIUM 10 · HIGH 25 · CRITICAL 50.
Cross the warn line (40) and an alert goes out; cross the alarm line (75) and it gets louder — always with the attacker's IP and what they tried.
At 100, the IP is banned at the firewall — iptables, nft or ufw — with an expiry. Your own IPs sit on a whitelist that can never be banned.
Every incident is stored in SQLite, and a local dashboard shows top attackers, active bans and recent incidents. The fake SSH server, fake WordPress and phpMyAdmin logins and fake .env catch probers red-handed — any touch of a decoy is a HIGH incident. And because it's Loophalt, Server Guard runs the same 112 code checks against the server's code on a schedule: new critical or high findings raise the same alarm and the same alerts.
# see it work in 10 seconds — built-in web + SSH attack demo, dry-run ban python3 sitealarm.py demo # one-shot analysis of an existing log python3 sitealarm.py scan-log /var/log/nginx/access.log # run Loophalt's code checks against the server's code, right now python3 sitealarm.py codescan # daemon — watch logs + honeypot + scheduled code scans python3 sitealarm.py --config sitealarm.json run # live dashboard — top attackers, active bans, incidents python3 sitealarm.py dashboard
Each channel is independent and stdlib-only. An alert carries the IP, its score, the rules it hit and sample requests.
A fake OpenSSH banner, fake WordPress and phpMyAdmin logins, a fake .env and .git/config — touch one and you're scored.
Whitelisted IPs and CIDRs can never be banned, and dry-run logs the exact firewall command it would run — until you switch it off.
Incidents, scores and bans persist in SQLite, so attackers, incidents and stats stay queryable across restarts.
Totals, counts by rule and source, top attacker IPs, active bans and recent incidents — plus the Loophalt code-security section.
An install script and systemd unit are included, and everything — sources, thresholds, channels, firewall — is one JSON config.
Clone it, run it. Machine-readable output for pipelines, human output for people, and --fix-dry prints ready-made fix suggestions as diffs for 16 rules — it never touches your files uninvited.
# clone — that's the entire install git clone https://github.com/loophalt/loophalt cd loophalt # scan a project python3 loophalt.py scan ./your-project # only criticals and highs, specific folder python3 loophalt.py scan ./src \ --severity critical,high # preview fixes as diffs (dry run) python3 loophalt.py scan . --fix-dry
# JSON for your own tooling python3 loophalt.py scan . --json # SARIF 2.1.0 for code scanning UIs python3 loophalt.py scan . --sarif # exit code 1 on critical/high findings, # so CI fails the build exactly when it should python3 loophalt.py scan . ; echo $?
The official Action runs Loophalt on every push and pull request and uploads SARIF results to your repository's Security tab — findings show up where your team already reviews code.
name: Security scan on: [push, pull_request] permissions: security-events: write jobs: loophalt: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: loophalt/loophalt@v1
| Input | What it does |
|---|---|
| path | Directory to scan (default: repo root) |
| severity | Minimum severity to report |
| upload-sarif | Publish results to code scanning |
| fail-on-findings | Fail the workflow on critical/high |
PINNED AS @v1 · SELF-TESTED IN CI ON EVERY PUSH
Loophalt is a free, open-source static security scanner that ships as a single Python file with zero dependencies. It scans JavaScript/TypeScript, Python, Go, PHP, Ruby, C# and Rust codebases — plus Terraform, Kubernetes manifests and Dockerfiles — with 112 checks: hardcoded secrets, SQL injection, XSS, command injection, weak crypto and more. It uses taint tracking, gives every finding a priority score (P1–P4) so you fix the worst holes first, and explains why each finding matters and how to fix it.
Every finding carries a priority score from 0 to 100 and a band — P1 (fix now) through P4 — calculated from the finding's severity, whether taint tracking verified the data flow, and the class of weakness. Reports are sorted fix-first, and the score and band travel with the finding in JSON and SARIF output, so the most dangerous holes are always worked first.
There is nothing to install: clone the GitHub repository and run python3 loophalt.py scan ./your-project. If Python 3.8+ runs — laptop, CI runner or air-gapped box — Loophalt runs, fully offline, in seconds.
No. Loophalt runs entirely on your own machine: no accounts, no telemetry, no API keys and no network calls. Your code never leaves the box you scan it on.
Use the official GitHub Action, loophalt/loophalt@v1: it scans on every push and pull request and uploads SARIF results to your repository's Security tab. From the CLI, Loophalt exits with code 1 on critical/high findings, so any pipeline can fail the build exactly when it should.
Server Guard is Loophalt's runtime companion. It watches live web (Apache/Nginx) and SSH/auth logs, scores every suspicious IP, and alerts you — terminal, email, Telegram or webhook — with the attacker's IP. Repeat offenders are auto-banned at the firewall (iptables, nft or ufw), whitelist-protected and dry-run by default, and decoy honeypot ports catch anyone poking around. It also runs Loophalt's code scans on a schedule, so code holes and live attacks appear in one dashboard.
Yes. Loophalt and Server Guard are MIT-licensed open source on GitHub — free for personal and commercial use, with no paid tier, no sign-up and no usage limits.
Loophalt is MIT-licensed and maintained in public. A new rule is one focused function plus fixtures — the codebase is a single readable file, so your first contribution is an afternoon, not a week.
Also from the loophalt org: MergeGate — free, open-source PR triage (AI-slop scoring and duplicate-PR detection) for maintainers.