Get security scan
Returns the app’s latest security scan: what it found, and whether it still reflects the app.
Read status before result. The two are independent, so a result can be present on a status that says it is stale, and absent on one that says a scan is in progress.
The findings are grouped by what the scan looked at. rls_recommendations cover entities whose row-level security is too open, hardcoded_secrets and backend_functions cover the app’s own code and functions, dependency_vulnerabilities cover its npm packages, static_code_findings come from reading the code, and header_recommendations cover the published app’s HTTP headers.
Two of those groups depend on what is switched on for the app rather than on what the scan found. static_code_findings comes back empty unless static_code_enabled is true, and dependency_vulnerabilities is empty for a caller outside that rollout. Both are empty lists rather than absent, so an empty group is not evidence that there is nothing to find, and static_code_enabled is what tells the two apart.
This read never starts a scan. Use Run security scan for that, then poll here while status is pending or scanning. Both mean a scan will settle on its own, so treating only scanning as in progress stops the poll early on a queued scan and reads whatever findings the previous one left.
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.
Response
The scan's state and its findings.
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