SAST in plain words

What is SAST?

SAST stands for static application security testing: a tool reads your source code and flags security bugs without running the program. Think of it as a spell checker for vulnerabilities. It runs early, often on every commit or pull request, and points to the exact file and line where untrusted input reaches something it should not.

Updated

A short example

Here is a Python handler that builds a SQL query from a request parameter:

user_id = request.args["id"]
cursor.execute("SELECT * FROM users WHERE id = " + user_id)

A SAST tool sees that request.args comes from the user and reaches cursor.execute as part of the query text, and reports a SQL injection on that line. The fix is to pass the value as a parameter instead:

cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))

Where SAST runs

What to ask a SAST tool

Where pokayoke fits

pokayoke answers the last two questions its own way. It is a GitHub App that reviews every push and pull request, runs exploits to prove what it can, and marks each finding proven or not. When it proves one, the fix is the one that stopped the exploit on a hardened copy of your code, and on paid plans it sends that fix privately, as a pull request or a draft security advisory.