Security tools

AI Code Risk Linter

Paste code, for example from an AI assistant, to spot common insecure patterns with an explanation and a safer alternative. Pattern-based and private: it can be wrong and it never runs your code.

Guide: AI-Generated Code Security: Insecure Patterns to Check

Pattern-based quick check, not a security audit. The tool looks for known risky patterns in the text. It can produce false positives and false negatives, it does not see data flow (where a value came from), and it is not a replacement for a SAST tool such as Semgrep or CodeQL. The code is checked as text on your device. It is never run, uploaded, stored or put in the URL.
Ready. Paste code to check. It is never run.
Rules: available, all rules on

Findings

    Reports

    The reports contain the findings that match the severity filter above.

    Each button fills this box and copies its text. SARIF is shown as JSON text, ready to save as a .sarif file.

    What it does

    Paste code, for example an answer from an AI assistant, and the tool lists lines that match well-known insecure patterns. Each finding shows the line, why the pattern matters, a safer alternative and, where the mapping is certain, a CWE number. You can switch single rules off, filter by severity, copy a Markdown report, or export the findings as SARIF 2.1.0 text.

    What it checks

    • JavaScript and TypeScript: eval and new Function; innerHTML, outerHTML, insertAdjacentHTML and document.write with a non-constant value; dangerouslySetInnerHTML; exec or execSync built from a template string or concatenation; Math.random near words such as token, secret, password, session or id; MD5 or SHA-1 near a password; rejectUnauthorized: false and NODE_TLS_REJECT_UNAUTHORIZED=0; CORS origin * together with credentials; JWT ignoreExpiration and the none algorithm; SQL built with template strings or concatenation; res.redirect with request values; target="_blank" without rel; tokens stored in localStorage.
    • Python: eval and exec; pickle and marshal loading; yaml.load without a safe loader; subprocess with shell=True and os.system with built strings; verify=False and unverified SSL contexts; MD5 or SHA-1 near a password; the random module near secrets; assert used for security checks; DEBUG = True and Flask debug=True; SQL built with f-strings, %, .format() or +; tempfile.mktemp.
    • SQL: UPDATE or DELETE without WHERE, DROP, TRUNCATE and GRANT ALL.
    • Shell: a download piped into a shell, chmod 777, and curl -k or --no-check-certificate.
    • Several languages: passwords, secrets, tokens and API keys written into the code as string values. Obvious placeholders such as changeme are ignored.

    How comments and strings are handled

    Text inside comments and inside string literals is not treated as code, so // eval(x) or 'eval(x)' is not flagged. JavaScript is read with the site's JavaScript lexer. If the lexer cannot read the text (TypeScript types, JSX or unusual syntax can cause this), a simpler scanner is used and a note says so. Python, SQL and shell use a small comment and string scanner. Some rules look inside strings on purpose, for example for SQL text, HTML links or the name of an environment variable. A value counts as constant when it is only string literals; el.innerHTML = '<b>ok</b>' is not flagged.

    What it cannot catch

    • Data flow. The tool does not know where a variable came from. exec(cmd) is not flagged even when cmd holds user input, and a flagged line may in fact use a trusted value.
    • Missing protection. It does not find missing authentication, missing authorization, weak access rules, race conditions, business-logic flaws or vulnerable dependencies.
    • Other languages and frameworks. Only the four languages above are covered, and only the listed patterns. Other APIs that do the same thing are not recognised.
    • Unusual formatting. Code built across files, aliased imports, code generated at run time and heavily minified code can hide a pattern or cause a false alarm.
    • A clean result is not proof that the code is safe. Use a real SAST tool such as Semgrep or CodeQL, code review and tests for anything that matters.

    Limits

    Code up to 1,000,000 characters is checked, in a background Web Worker so the page stays responsive; 200 KB is usually done well under a second. Each rule reports at most 200 matches, at most 2,000 findings are kept in total, and the list shows the first 300 (the reports include all findings that match the filter).

    SARIF and Markdown

    SARIF 2.1.0 is the common format for static-analysis results. The export contains the rules that fired and one result per finding with its line and column, so it can be saved as a .sarif file and loaded into tools that read SARIF. Nothing is uploaded: the JSON is only text in the box.

    Example: six findings in eleven lines

    The built-in example is a small JavaScript login handler. The linter finds 3 high-severity and 3 medium-severity issues, each with a CWE reference, an explanation and a safer alternative:

    • High, CWE-79: innerHTML set from a non-constant value built from req.query.name.
    • High, CWE-89: a SQL query built by concatenating req.query.id.
    • High, CWE-798: an API key written into the code.
    • Medium, CWE-338: Math.random() used to create a token.
    • Medium, CWE-601: res.redirect() with a value from the request.
    • Medium: a token stored in localStorage.

    The same example also contains code that is not reported: eval(userInput) inside a comment, eval(x) inside a string and an innerHTML assignment of a constant string. They are ignored on purpose, which keeps the noise down. 42 rules are available and you can turn rules on or off. Reports can be copied as Markdown or exported as SARIF 2.1.0 for other tools.

    Frequently asked questions

    Does this replace Semgrep, CodeQL or a security review?

    No. The result is a set of pattern matches, not proof of a vulnerability, and there is no data-flow analysis. Use it as a quick first pass on code you pasted from an assistant or a forum.

    Which languages does it check?

    JavaScript, TypeScript and Python. The language is detected automatically, and you can also choose it yourself.

    Can it miss problems?

    Yes. A clean result only means that none of the patterns matched.

    Is my code uploaded?

    No. The code is checked on your device.

    Privacy

    This tool runs entirely in your browser. What you enter is processed on your device and is not sent to a server. The page does not write your input to local storage, cookies or the URL, and the code is never run.

    Share this tool

    Your data is not included in this link.