GOVERNACT

A real review

This is what one review of our demonstration service returned. You ask in plain words; the agent reads the code and reports each problem with its severity, where it is and why it matters.

  • 3 findings

    1 critical, 2 high

  • 94 seconds

    From the request to the report

  • 1.6 credits

    With the larger model

  • “Review this repository.”

    All that was asked

  1. Critical

    OS command injection in POST /api/exports

    server.js, line 12 · CWE-78

    Why it matters
    The folder name from the request is joined into a shell command. Anyone who can call the route can run commands on the server.
    Evidence
    The review shows the request field and the command line it becomes, with the line of code where they meet.
  2. High

    SQL injection in GET /api/customers/:id

    server.js, line 8 · CWE-89

    Why it matters
    The id from the address is put straight into the text of the database query. A caller can read data the route was never meant to return, such as other customers' emails and billing addresses.
    Evidence
    The review shows the query as the database receives it when the id is not an id, and marks the line that builds it.
    Proposed fix
    database.query("SELECT id, email, billing_address FROM customers WHERE id = $1", [request.params.id])
  3. High

    Missing ownership/tenant check (IDOR) on GET /api/customers/:id

    server.js, lines 7 to 9 · CWE-639

    Why it matters
    A customer is looked up by the id alone. Any signed-in user can read another tenant's email and billing address by changing the id.
    Evidence
    The review points to the service's own read-me, which says these routes must check ownership, and to the query, which has no such check.

Read from the code. Nothing was run against the service. This is one run, on a small service we wrote with three known flaws. Your code will differ.

Then you ask it to fix them

It writes the change and opens a pull request in your repository. You review it and decide whether to merge.

Start your 7-day free trial

7 days free on Launch and Growth. $0 today, then from $34 a month. Cancel anytime.