Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Code Security Scanner

Find injection, weak crypto and leaked keys in your own code — nothing is uploaded.

Free preview, no sign-upIncluded in your pass Pro tool Pro pass: ₹179 / $5.99 for 30 days On this device: nothing is sent
+3 +1 more details No uploadWorks offline once opened Security

Free preview: counts by severity and CWE with the first 3 findings in full; every finding, your own rules, baselines and the SARIF, HTML and CSV reports unlock with a pass. Locked until you unlock it: download.

Pro pass ₹179 for 30 days or ₹79 for 1 week, one‑time. Pro pass $5.99 for 30 days or $2.99 for 1 week, one‑time. How to unlock

Try before you buy.

  • Free preview: counts by severity and CWE with the first 3 findings in full; every finding, your own rules, baselines and the SARIF, HTML and CSV reports unlock with a pass.
  • Locked until you unlock it: download.
  • Unlock: Pro pass, ₹179 for 30 days or ₹79 for 1 week, a one-time payment that never renews. Unlock: Pro pass, $5.99 for 30 days or $2.99 for 1 week, a one-time payment that never renews.

Ways to unlock shows how to get the full result.

See passes (opens in a new tab)

Printing this result is locked in the free preview.

Code to scan

The code is read in your browser and never uploaded. Pattern checks find common mistakes; they miss logic flaws and can raise false alarms, so review each finding.

Your own rules

A regular expression looked for in every file it applies to, comments included. Rules are kept in this browser (up to 50).

New rule

Empty for every file.

    Next steps Done. What next?

    Start over

    A Pro pass unlocks the full result. See passes

    All security & privacy tools

    About the Code Security Scanner

    Paste code, or open a project folder or a ZIP of it, and the scanner looks for the mistakes behind most security bugs: SQL and shell commands built from strings or from request data, eval and code built at run time, HTML written from values, file paths taken from the request, unsafe deserialisation, XML parsers that load external entities, weak hashes and ciphers, predictable random tokens, certificate checks turned off, open CORS with credentials, debug modes left on, and keys, tokens and passwords written into the code.

    JavaScript, TypeScript and Python are read as syntax trees; PHP, Java, Go, C#, Ruby, SQL scripts and settings files are checked with MySmartCoPilot’s pattern rules; and every text file goes through the Secret Scanner’s rules. Each finding shows the file and line, the CWE entry it maps to, why it is risky and a safer version. With a Pro pass you see every finding, add your own regular-expression rules, save a baseline that hides accepted findings next time, and download SARIF 2.1.0, HTML and CSV reports. The code is read in a background worker in your browser and never uploaded. Pattern checks find common mistakes; they miss logic flaws and can raise false alarms, so review what they report.

    How to use it

    1. Paste code (pick its language or leave Auto), or choose files, a folder or a ZIP of your project, up to 50 MB. Dependency and build folders (node_modules, vendor, dist …), lock files, binaries and minified files are left out.
    2. Press Scan. The counts by severity, CWE and language appear; the free preview shows the first 3 findings in full.
    3. Open a finding to read why it is risky and a safer version, fix the code, and scan again.
    4. With a pass: save a baseline of findings you have accepted (open it with the next scan to hide them), add your own rules, and download the SARIF report for GitHub code scanning or the SARIF Viewer in Visual Studio Code, an HTML report or a CSV.

    Examples

    An Express route
    Input
    db.query('SELECT * FROM users WHERE id = ' + req.query.id);
    Result
    Critical · SQL built from request data (CWE-89), line 1. A safer version: db.query("SELECT * FROM users WHERE id = ?", [req.query.id]);
    A PHP script
    Input
    <?php system('ping -c 1 ' . $_GET['host']);
    Result
    Critical · Shell command built from request data (CWE-78). Pass the arguments without a shell, and check the host against an allowlist first.
    Java encryption
    Input
    Cipher c = Cipher.getInstance("AES");
    Result
    Medium · Broken or risky cipher (CWE-327): "AES" alone uses ECB mode, which shows patterns in the data. Use "AES/GCM/NoPadding".

    Common uses

    • Checking your own project before a release, a code review or a security questionnaire.
    • Finding the SQL, shell and eval calls in old code that you have inherited.
    • Making sure no key, token or password was committed with the code.
    • Adding a SARIF report to GitHub code scanning from a build that has no scanner of its own.

    What it checks

    • Injection: SQL built from strings or request data (CWE-89), shell commands (CWE-78), eval and code built at run time (CWE-95, CWE-94), HTML written from values (CWE-79), file paths from the request (CWE-22), request data that picks the class or method to call (CWE-470), regular expressions that can backtrack catastrophically (CWE-1333).
    • Cryptography: passwords hashed with fast hashes (CWE-916), MD5 and SHA-1 (CWE-328), DES, RC4 and ECB mode (CWE-327), predictable random numbers for tokens (CWE-338), secrets compared with == (CWE-208).
    • Parsing and transport: certificate checks turned off (CWE-295), XML parsers that resolve external entities (CWE-611), unsafe deserialisation such as pickle, unserialize, BinaryFormatter and ObjectInputStream (CWE-502).
    • Settings: any origin allowed together with credentials (CWE-942), debug modes and debug endpoints (CWE-489), detailed error pages (CWE-200) — also in .env, web.config and Spring application files.
    • Secrets: keys, tokens and passwords written into code or settings (CWE-798), with the Secret Scanner’s rules.

    The names of the weaknesses are those of MITRE’s CWE list; each finding links to its entry.

    How the code is read

    JavaScript and TypeScript (with JSX) and Python are parsed into syntax trees with the parsers of the site’s code editors, so the checks see calls and their arguments, not just text: a fixed string is fine, a value built from strings or taken from the request is not. PHP, Java (also JSP), Go, C# (also Razor views), Ruby (also ERB templates) and SQL scripts are checked with pattern rules after comments are removed; string literals are read with each language’s own quoting. Data from the request is followed one step: a variable assigned straight from the request, or a parameter marked as request data (@RequestParam, [FromQuery]), counts as request data where it is used.

    Reports, baselines and your own rules

    • SARIF 2.1.0: each rule has its CWE tag and a security-severity score, and each result its file, line, column, snippet and a fingerprint, as GitHub code scanning reads them; upload it with the github/codeql-action/upload-sarif action (GitHub Docs), or open it in the SARIF Viewer extension for Visual Studio Code. File paths start inside the folder you chose (or the ZIP’s top folder, such as the repo-main/ of a ZIP downloaded from GitHub), the way the repository names its files — so scan the repository’s own folder for a report GitHub can match to its files.
    • Baseline: a file listing the findings you have accepted. A finding’s fingerprint comes from its rule, its file and the text of its line, so it stays the same when code above it changes. A SARIF report from this scanner works as a baseline too.
    • Your own rules: a regular expression with the flags i, m, s or u, the files it applies to (*.php, src/**), a severity, a CWE number and a message. A pattern that could backtrack catastrophically, or that matches an empty text, is refused so the scan cannot freeze.

    Limitations

    • Pattern checks find common mistakes; they miss logic flaws (broken access control, business-logic errors, race conditions) and can raise false alarms. Review each finding, and never take a clean result as proof that the code is safe.
    • Request data is followed one step only; values passed through functions or other files are not followed.
    • It does not run the code or check your dependencies for known vulnerabilities.
    • Files over 2 MB, binaries and minified files are skipped, and one scan reads up to 50 MB. Password-protected ZIPs cannot be opened: choose the folder instead.
    • The free preview shows the counts and the first 3 findings in full.

    Privacy

    On this device: nothing is sent

    Your code is read in a background worker in this tab and never uploaded, stored or logged. Your own rules are kept in this browser so they are there next time.

    Frequently asked questions

    What do I get without a pass?

    Without a pass, Code Security Scanner shows counts by severity and CWE with the first 3 findings in full; every finding, your own rules, baselines and the SARIF, HTML and CSV reports unlock with a pass. Until you unlock it, the result can’t be downloaded. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.

    Is my code uploaded anywhere?

    No. Files, folders and ZIPs are read in a background worker in your browser, and nothing is sent; once the page has loaded, the scan works offline too.

    Which languages does it check?

    JavaScript and TypeScript (with JSX), Python, PHP, Java and JSP, Go, C# and Razor views, Ruby and ERB, and SQL scripts, plus .env, web.config and Spring application files. Every other text file is checked for secrets only.

    How do I get the results into GitHub?

    Download the SARIF report and upload it with the github/codeql-action/upload-sarif action or GitHub’s code scanning API. For private repositories, GitHub says code scanning is available when its Code Security features are enabled.

    It flagged code that is safe. What now?

    Pattern checks cannot see every safeguard, for example a value checked in another function. If you are sure, add the finding to a baseline so the next scan hides it, and keep the baseline with your code.

    What is a CWE?

    The Common Weakness Enumeration is MITRE’s list of kinds of software weaknesses. Each finding names its CWE entry and links to it, so you can read more and match the finding to your own checklists.

    Quick answers and tool search

    Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.