Lists the security scan records of a repository
const url = 'https://gitea.example.com/api/v1/repos/example/example/security/scans?type=dependencies&status=running&page=1';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://gitea.example.com/api/v1/repos/example/example/security/scans?type=dependencies&status=running&page=1' \ --header 'Authorization: Basic <credentials>'Gitea Enterprise only. This endpoint is not part of the community edition.
One record per attempt to scan a branch with one scanner, newest first. The newest twenty attempts of every branch and scanner are kept, the older ones are pruned by the daily rescan of the instance.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Name of the owner
Name of the repository
Query Parameters
Section titled “Query Parameters”Branch name to filter the records
Name of the scanner to filter the records
Type of finding to filter the records, repeatable or comma separated, empty means every type
How the scans ended
Read the newest attempt of every branch and scanner instead of every attempt, which the repository settings page shows
Page number of results to return (1-based)
Number of items per page
Responses
Section titled “Responses”ScanRunList
ScanRunInfo is one attempt to scan one branch of a repository with one scanner. The scans of a branch and scanner are kept, newest first, see the repository settings page.
object
Findings it opened
Branch the scan read
Commit the scan read
What a scan that failed failed with
Findings it closed as fixed
Findings the scan reported
Id of the record
Name of the scanner that ran
How the scan ended
type: string
Type of finding the scanner reports
type: string dependencies FindingTypeDependencies is reported by the dependency scanner secrets FindingTypeSecrets is reported by a secret scanner code_scanning FindingTypeCodeScanning is reported by a code scanning scanner
Example
[ { "status": "running", "type": "dependencies" }]APIValidationError is error format response related to input validation