AI code reviews
Have the Pentesys AI agent review a repository's source code for security weaknesses, including private repositories on GitHub and GitLab.
When to use a code review#
A code review finds weaknesses that are hard to reach from outside: missing access checks, unsafe input handling, weak cryptography, hard-coded secrets and risky dependencies. Book it alone, or alongside a web application test of the same service for the best coverage. One band covers up to 50,000 lines of code.
Booking a review#
- In Validate → New assessment, choose the AI Code Reviews card, or add Code review / SAST under bespoke scoping.
- Under Assets & access, enter the Repository URL, for example
https://github.com/acme/payments-api. - Complete commercials and readiness and submit, as for any booking.
Public and private repositories#
| Repository | What Pentesys needs |
|---|---|
| Public, on github.com or gitlab.com | Nothing: it is read without credentials. |
| Private, on GitHub | An active GitHub connection for the organisation that owns the repository, with a fine-grained token that has Contents: read. |
| Private, on GitLab | An active GitLab connection for the group that owns the repository, with a group token that has read_api and read_repository. |
What happens during the review#
- When the review starts, Pentesys downloads a copy of the repository into an isolated workspace. The AI agent never sees your token.
- The agent maps the code (languages, frameworks, entry points) and reviews the security-relevant parts: input handling, authentication and access control, cryptography, secrets, configuration and dependencies.
- Each issue becomes a finding naming the file and line, with the code that shows it. A leaked secret is reported by location only, never by value.
- The copy of your code is deleted when the review finishes.
The agent only reads code. It never runs it and never contacts systems the code refers to.
Example finding#
| Field | Value |
|---|---|
| Title | Missing ownership check on invoice download |
| Severity | High · CWE-639 |
| Location | app/Http/Controllers/InvoiceController.php, line 48 |
| Remediation | Check that the invoice belongs to the signed-in customer before returning it, and add a test for another customer's invoice ID. |