Code Quality · New

Messy code is
where bugs
hide.

AquilaX Code Quality finds the problems that make code hard to review and easy to break: complexity hotspots, copy-pasted logic, swallowed exceptions and resource leaks. It checks every pull request, scores each repository, and shows you which issues are most likely to turn into a real bug or vulnerability.

Measures
Complexity Duplication Maintainability
Code Quality — billing-service
# billing/discounts.py · line 88 try: apply_coupon(order, code) except Exception: pass # ← failure is silent
Swallowed exception — discounts.py:88 High
Complexity 34 — apply_discounts() Medium
Duplicated block · 3 copies, 1 patched Medium
Resource checks — reports/export.py Running...
Securitron AI — Quality Triage
412 raw issues → 23 worth fixing · ranked by bug risk in changed code
B
repo grade
23
to fix
4
in this PR
57BLines Scanned
·
31M+Vulnerabilities Found
·
93.54%False Positives Eliminated
·
<120sScan Completion
·
32Parallel Scanners
·
153KApps Protected
·
300+Active Developers
·
57BLines Scanned
·
31M+Vulnerabilities Found
·
93.54%False Positives Eliminated
·
<120sScan Completion
·
32Parallel Scanners
·
153KApps Protected
·
300+Active Developers
·

Numbers as of Q1 2026 — updated quarterly.

What It Catches

Quality problems that
become real bugs.

Style nits are easy to find and rarely matter. AquilaX focuses on the patterns that make code break in production or let a vulnerability slip through review.

Complexity Hotspots

Functions with high cyclomatic and cognitive complexity, deep nesting and long parameter lists. These are the places reviewers skim and tests miss.

CC
Cyclomatic
Nesting
Depth

Duplicated Code

Copy-pasted blocks across files and services. When one copy gets a fix and the others don't, you have a bug that's already been fixed once.

Clones
Cross-file
Drift
Uneven fixes

Error Handling Gaps

Swallowed exceptions, catch-all handlers, ignored return values and errors logged but never acted on. Failures that should stop a request let it carry on.

CWE-390
Ignored error
CWE-396
Catch-all

Resource & Null Safety

File handles, sockets and database connections that aren't released on every path, plus null dereferences. Under load these become outages.

CWE-772
Leak
CWE-476
Null deref

Dead & Unreachable Code

Unused functions, unreachable branches and old feature flags. Dead code still ships, still gets scanned, and sometimes still has a route pointing at it.

CWE-561
Dead code
Flags
Stale

Maintainability Grade

An A–E grade for every repository and file, with the trend over time. See whether new code is making things better or worse, not just how big the backlog is.

A–E
Per repo
Trend
Per sprint
In real code

Three quality bugs
with real consequences.

Each of these passes the tests and looks reasonable in review. Then one failure mode later, it lets everyone in, ships an old rule, or takes the service down.

01 · INPUTRepositoryevery push and PR02 · PARSESyntax + call graphfunctions, branches,error paths03 · MEASUREPer functioncomplexity, clones,leaks, dead code04 · RANKBug risk firstchanged code on top,noise dropped05 · RESULTPR comment + gradeA–E per repo,trend per sprint 01 · INPUTRepositoryevery push and PR02 · PARSESyntax + call graphfunctions, branches,error paths03 · MEASUREPer functioncomplexity, clones,leaks, dead code04 · RANKBug risk firstchanged code on top,noise dropped05 · RESULTPR comment + gradeA–E per repo,trend per sprint
Every function gets measured, but only the issues likely to cause a real bug get ranked to the top, with the ones in your pull request first.

A catch-all that fails open

CWE-396CWE-636PythonHigh
Vulnerable · docs/permissions.py
def can_access(user, doc):
    try:
        return acl.check(user.id, doc.id)
    except Exception:
        return True   # don't block users if ACL is down
Why it's exploitable

The comment explains the intent: keep people working if the ACL service hiccups. In practice, any timeout, bug or malformed ID now grants access to every document.

Catch-all handlers hide exactly this kind of decision. The scanner flags broad exception handlers on security-relevant paths, especially ones that return a success value.

The fix
    except AclUnavailable:
        log.warning("ACL check failed for %s", doc.id)
        return False   # fail closed; show a retry message

Copy-pasted validation that drifted

CWE-1041Node.jsMedium
Vulnerable · routes/invite-accept.js
// routes/signup.js
if (!isEmail(body.email)) return bad(res);
if (body.password.length < 12) return bad(res);

// routes/invite-accept.js (copied from signup in 2023)
if (!isEmail(body.email)) return bad(res);
if (body.password.length < 6) return bad(res);
Why it's exploitable

Someone raised the minimum password length to 12 in signup. The invite flow was a copy, so it kept the old rule, and invited users can still pick a 6-character password.

Duplicate detection finds blocks that started identical and then diverged, which is usually a fix applied to only one copy.

The fix
// lib/validate.js: one rule, used by both routes
export function validateCredentials(body) {
  if (!isEmail(body.email)) return false;
  return body.password.length >= PASSWORD_MIN;
}

A connection leaked on the early return

CWE-772JavaHigh
Vulnerable · OrderRepository.java
public List<Order> recent(long userId) throws SQLException {
    Connection c = dataSource.getConnection();
    PreparedStatement ps = c.prepareStatement(
        "SELECT * FROM orders WHERE user_id = ?");
    ps.setLong(1, userId);
    ResultSet rs = ps.executeQuery();
    if (!rs.next()) return List.of();   // c is never closed
    List<Order> out = map(rs);
    c.close();
    return out;
}
Why it's exploitable

Every user with no orders leaks one pooled connection. With a pool of 20, the 21st new customer of the day hangs, and so does everyone after them.

That's a denial of service anyone can trigger by signing up. The scanner follows every exit path of a function and checks that acquired resources are released on all of them.

The fix
try (Connection c = dataSource.getConnection();
     PreparedStatement ps = c.prepareStatement(SQL)) {
    ps.setLong(1, userId);
    try (ResultSet rs = ps.executeQuery()) {
        return map(rs);   // closed on every path
    }
}
How It Works

Judge the change,
not the whole history.

Nobody can fix ten years of debt in one sprint. AquilaX holds new code to the bar and tracks the rest, so quality gets better with every merge.

  1. 1
    Parse

    Read the code

    Builds the syntax tree and call graph for each file in the scan.

    ASTcall graph
  2. 2
    Measure

    Score every function

    Complexity, duplication, error handling and resource use, per function and per file.

    complexityclonesleaks
  3. 3
    Rank

    Focus on what changed

    Securitron AI ranks issues by bug risk and puts the ones in your pull request first.

    412 raw
    23 to fix
  4. 4
    Fix

    Gate new code

    Findings appear on the PR, and the group security policy decides when a build fails.

    PR commentgrade trendfix PR
Built For

Who needs
Code Quality?

Teams that already run SAST and want one place for security and maintainability, instead of a second tool and a second dashboard.

Teams Shipping AI-Written Code

Assistants copy and paste instead of refactoring, and add a new helper instead of reusing the old one. Code Quality catches the duplication and growing complexity before they settle in.

Tech Leads & Architects

See which services are getting harder to change, track the grade per sprint, and make the case for refactoring with numbers instead of gut feeling.

Security Teams

Swallowed errors and leaky resources are often where security bugs start. Seeing them next to SAST findings gives you the full picture in one dashboard.

Code Quality · Available on Premium & Ultimate

Make every merge
a little cleaner.

Connect your GitHub, GitLab or Bitbucket repo. Code Quality runs alongside SAST on every push, with no extra setup.

14-day Premium trial No credit card required Cancel anytime On-premises available