Check a change for security problems

Look at a change for injection, leaked secrets and missing permission checks.

Engineering · Software · When you ask · Updated

Works with

  • Slack
  • Email

How do you run a security code review with AI?

To run a security code review with AI, mention Maito in Slack with the branch name. It reads the changed files and their callers, checks for injection, leaked secrets and missing permission checks, then replies with findings ranked by severity, the line for each, and a suggested patch you can review.

How it's done today

Security review happens only for big releases.

What Maito does

  1. Read the change
  2. Check for common security mistakes
  3. Report what's risky and how to fix it

Example

security
Alex 1:12 PM

@Maito security-review the new file upload endpoint on branch feat/uploads before Thursday's release.

Maito APP 1:31 PM

One high, one medium. Everything else in the diff (auth check, size limit, signed URLs) looks right. High: routes/uploads.ts line 37 trusts the Content-Type header. An .html file sent as image/png is stored and served from app.northstar.example, so a script inside it runs with a logged-in user's session. Medium: the original filename goes into the storage key unchanged, so a name like ../../avatars/ceo.png can overwrite another file. Suggested fix: check the real file type from its first bytes, store under a generated ID, serve uploads from a separate domain. Attached: uploads-fix.patch (not applied). I read the changed files and their callers only. Worth a look from your security lead before release. Want me to apply the patch on a branch and open a PR?

Example complete

How to set it up

When you ask Check a change for security problems
Set up

Nothing to set up. Ask in Slack or by email whenever you need it.

What it won't do

It reads the diff and its callers, not the whole system, so problems that depend on infrastructure or other services can go unseen. A person on your team still signs off on the release.

Questions

More engineering workflows

See all workflows

Put your AI teammate to work.

Set it up in minutes. Start with this one, and let it earn the next one.