Skip to content

Scan a file for vulnerabilities.

POST
/api/v4/projects/{id}/security_scans/sast/{sast_endpoint}
id
required
One of:
string

The ID or URL-encoded path of the project

sast_endpoint
required
Media type application/json
object
file_path
required

The project relative path of the file to scan

string
nullable
content
required

The content of the file to scan

string
nullable
Example generated
{
"file_path": "example",
"content": "example"
}

OK

Bad request

Unauthorized

Not Found