← All Tools

Code Security Sanitizer Formatter🔒 100% local

Audit for secrets. Privacy-first, no server uploads, no tracking.

Related Tools

Border Radius PreviewBox Shadow GeneratorCode Heatmap

Scans pasted code line by line against 17 rules for known-unsafe constructs - eval and the Function constructor, innerHTML assignment, document.write, shell execution, SQL built by concatenation, hard-coded secrets, prototype pollution, wildcard CORS, disabled TLS verification, weak ciphers and more - then deducts 40 points per critical finding, 20 per high, 8 per medium and 3 per low from a starting score of 100. Each hit is reported with its line number, the reason and a concrete fix, grouped by severity. One finding per line is kept so a single bad line does not drown the report.

How to use it

  1. Paste the function, file or diff you want checked.
  2. Press Process.
  3. Read the score and grade, then clear the CRITICAL and HIGH blocks before looking at anything in medium.

Worked example

eval("alert(1)") document.write(name)becomesSecurity score: 40/100 (grade D) Findings: 2 — 1 critical, 1 high, 0 medium, 0 low Analysed: 2 lines, 37 chars CRITICAL (1) line 1 eval() executes arbitrary strings as code → Replace with JSON.parse for data, or a lookup map for branching. eval("alert(1)") HIGH (1) line 2 document.write can inject markup and blocks parsing → Build DOM nodes with createElement/append. document.write(name) Priority: fix every CRITICAL and HIGH before this code ships. They are all remotely exploitable given the right input. Limits of a pattern scan: • It cannot see data flow (whether the tainted value really reaches the sink). • It cannot audit dependencies — run npm audit / pip-audit for that. • Add a real SAST tool (CodeQL, Semgrep) to CI for depth.

A critical (40 points) and a high (20 points) leave a score of 40, which grades as D. The rule ids are not shown; each block gives the line, the reason, the fix and the matched line.

When to use it

What it does not do