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.
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
- In the editor, as you type.
- In the pull request, as a check or a review comment.
- In the CI pipeline, failing the build on serious findings.
- On a schedule, across the whole code base, to catch what new rules recognise.
What to ask a SAST tool
- Which of your languages and frameworks does it understand, not just parse?
- How does it keep false positives down, and can you see why it flagged something?
- Does it report in the pull request, where developers already work?
- Does it suggest a fix, and has the fix been tested?
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.