跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support

Lists the security scan records of a repository

GET
/repos/{owner}/{repo}/security/scans
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.

owner
required
string

Name of the owner

repo
required
string

Name of the repository

branch
string

Branch name to filter the records

scanner
string

Name of the scanner to filter the records

type
string
Allowed values: dependencies secrets code_scanning

Type of finding to filter the records, repeatable or comma separated, empty means every type

status
string
Allowed values: running success failed

How the scans ended

latest
boolean

Read the newest attempt of every branch and scanner instead of every attempt, which the repository settings page shows

page
integer
default: 1 >= 1

Page number of results to return (1-based)

limit
integer

Number of items per page

ScanRunList

Media typeapplication/json
Array<object>

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
added

Findings it opened

integer format: int64
branch_name

Branch the scan read

string
commit_id

Commit the scan read

string
error

What a scan that failed failed with

string
finished_at
string format: date-time
fixed

Findings it closed as fixed

integer format: int64
found

Findings the scan reported

integer format: int64
id

Id of the record

integer format: int64
scanner

Name of the scanner that ran

string
started_at
string format: date-time
status

How the scan ended

type: string

string
Allowed values: running success failed
type

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

string
Allowed values: dependencies secrets code_scanning
Example
[
{
"status": "running",
"type": "dependencies"
}
]

APIValidationError is error format response related to input validation

message
string
url
string