Run security scan
Scans the app for security problems and returns the findings.
The response is the same shape as Get security scan, and which of two things you get depends on whether Base44 already has a current answer:
- If the last scan still matches the app, you get it straight back with
statusset toup_to_date, and theX-Scan-Sourceresponse header set tocache. Nothing is re-scanned. - Otherwise a scan starts in the background and you get
statusset toscanningwith the previous findings still inresult, andX-Scan-Sourceset toasync. Poll Get security scan whilestatusispendingorscanning, since both mean a scan is still going to settle.
So a 200 here does not mean a scan ran, and it does not mean the findings in the body are current. Read status and the X-Scan-Source header to tell the two apart.
A real scan reads the app’s code and runs a language model over it, which takes a while and is why it runs in the background rather than on your connection. This endpoint is limited to 5 requests per minute.
out_of_date the app has changed since, so treat the findings as a previous snapshot and run a new scan before acting on them.Authorizations
Personal API key.
Path Parameters
ID of the app to scan.
Query Parameters
Language to return generated text in, as a lowercase two-letter code. An unsupported value is rejected with a 422.
en, ja, de, es, fr, pt Response
The findings, or the state of the scan that just started.
The state of an app's security scan, and its findings when it has any.
Where the scan is. up_to_date means result reflects the app as it is now. out_of_date means the app changed since the last scan, so result is stale or absent. none means the app has never been scanned. pending means a scan is queued and scanning means one is running, and both can carry an earlier result while you wait. scan_failed means the last scan died, so run another.
"up_to_date"
What the scan found, or null when there is nothing to show. It is null on none, and also on out_of_date when the last scan came from a different version of the scanner, in which case only a fresh scan produces findings.
Whether code-reading analysis is switched on for this app (true) or not (false). When it is false, result.static_code_findings comes back as an empty list, so this field is the only way to tell an analysis that found nothing from one that never ran.
true