Get Code review runs data
Prisma Cloud Code Security’s Code Reviews table enables you to view the latest code reviews across your integrated VCS and CI/CD repository snapshots. With Code Reviews, you can analyze how many issues were found in each scan, broken down by severity threshold levels, the scan status and the Enforcement settings for different code categories at the time of the scan.
The response includes the following data for each VCS or CI/CD code review:
- Repository: the Git repository to which the scanned item belongs
- Organization: the Git organization to which the scanned item belongs and its VCS type
- defaultBranch: The default branch of the repository
- commitId: Git commit hash for VCS tool code review
- runId: Prisma Cloud Code Security’s run ID, set for CI/CD tool code review
- gitUser: the Git user who has triggered the scan:
- For VCS, this is the commit creator.
- For CI/CD, if detected, this is the user who triggered the scan.
- scanStatus: Failed or Passed, based on Enforcement settings: HARD_FAIL - scan has failed and will break build or block PR SOFT_FAIL - issues at a certain severity threshold were found, but the scan will not break build or block PR PASS - no issues for Hard Fail or Soft Fail were found UNKNOWN - scan was unsuccessful
- SourceType: the VCS the Git repository is hosted on
- Results: Severity breakdown of the detected issues
- lastScanDate: last scan’s time and date
- creationDate: scan’s start time and date
- status - the run status COMPLETED/IN_PROGRESS/FAILED/ARCHIVED
- PR: { title: PR name prNumber: PR ID lastScanDate: scan date fromBranch: source branch intoBranch: target branch enforcementRule: { IAC: Soft Fail and Hard Fail settings IMAGES: Soft Fail and Hard Fail settings OPEN_SOURCE: Soft Fail and Hard Fail settings SECRETS: Soft Fail and Hard Fail settings SUPPLY_CHAIN: Soft Fail and Hard Fail settings } }
Query Parameters
- sortBy string
Possible values: [
resourcesCount
,user
,failedResources
,scanTime
] - search string
- string, optional
- limit double
- number, optional; default value = 1000
- page double
- 200
- 422
Get code review data runs for customer
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
data object[] required
Array [PR object
enforcementRule object
IAC object required
commentsBotThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]hardFailThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]softFailThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]IMAGES object required
commentsBotThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]hardFailThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]softFailThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]OPEN_SOURCE object required
commentsBotThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]hardFailThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]softFailThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]SECRETS object required
commentsBotThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]hardFailThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]softFailThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]SUPPLY_CHAIN object required
commentsBotThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]hardFailThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]softFailThreshold RuleThreshold requiredPossible values: [
OFF
,INFO
,LOW
,MEDIUM
,HIGH
,CRITICAL
]fromBranch stringintoBranch stringlastScanDate date-timeprNumber string requiredtitle string requiredcommitId stringcreationDate date-time requireddefaultBranch stringgitUser string requiredid string requiredlastScanDate date-time requiredorganization string requiredrepository string requiredresults object required
CRITICAL double requiredHIGH double requiredLOW double requiredMEDIUM double requiredrunId doublescanStatus ScanStatus requiredPossible values: [
HARD_FAIL
,SOFT_FAIL
,PASS
,UNKNOWN
]sourceType SourceType requiredPossible values: [
Github
,Bitbucket
,Gitlab
,AzureRepos
,cli
,AWS
,Azure
,GCP
,Docker
,githubEnterprise
,gitlabEnterprise
,bitbucketEnterprise
,terraformCloud
,githubActions
,circleci
,codebuild
,jenkins
,tfcRunTasks
,admissionController
,terraformEnterprise
]status RunStatus requiredPossible values: [
COMPLETED
,IN_PROGRESS
,FAILED
,ARCHIVED
]]- hasNext boolean required
{
"data": [
{
"PR": {
"enforcementRule": {
"IAC": {
"commentsBotThreshold": "OFF",
"hardFailThreshold": "OFF",
"softFailThreshold": "OFF"
},
"IMAGES": {
"commentsBotThreshold": "OFF",
"hardFailThreshold": "OFF",
"softFailThreshold": "OFF"
},
"OPEN_SOURCE": {
"commentsBotThreshold": "OFF",
"hardFailThreshold": "OFF",
"softFailThreshold": "OFF"
},
"SECRETS": {
"commentsBotThreshold": "OFF",
"hardFailThreshold": "OFF",
"softFailThreshold": "OFF"
},
"SUPPLY_CHAIN": {
"commentsBotThreshold": "OFF",
"hardFailThreshold": "OFF",
"softFailThreshold": "OFF"
}
},
"fromBranch": "string",
"intoBranch": "string",
"lastScanDate": "2023-06-02T02:17:57.860Z",
"prNumber": "string",
"title": "string"
},
"commitId": "string",
"creationDate": "2023-06-02T02:17:57.860Z",
"defaultBranch": "string",
"gitUser": "string",
"id": "string",
"lastScanDate": "2023-06-02T02:17:57.860Z",
"organization": "string",
"repository": "string",
"results": {
"CRITICAL": 0,
"HIGH": 0,
"LOW": 0,
"MEDIUM": 0
},
"runId": 0,
"scanStatus": "HARD_FAIL",
"sourceType": "Github",
"status": "COMPLETED"
}
],
"hasNext": true
}
{
"data": [
{
"PR": {
"enforcementRule": {
"IAC": {
"commentsBotThreshold": "HIGH",
"hardFailThreshold": "CRITICAL",
"softFailThreshold": "CRITICAL"
},
"IMAGES": {
"commentsBotThreshold": "HIGH",
"hardFailThreshold": "CRITICAL",
"softFailThreshold": "CRITICAL"
},
"OPEN_SOURCE": {
"commentsBotThreshold": "HIGH",
"hardFailThreshold": "CRITICAL",
"softFailThreshold": "CRITICAL"
},
"SECRETS": {
"commentsBotThreshold": "HIGH",
"hardFailThreshold": "CRITICAL",
"softFailThreshold": "CRITICAL"
},
"SUPPLY_CHAIN": {
"commentsBotThreshold": "LOW",
"hardFailThreshold": "LOW",
"softFailThreshold": "LOW"
}
},
"fromBranch": "feature/mod-aws-node",
"intoBranch": "main",
"prNumber": "5",
"title": "My PR"
},
"commitId": "123456",
"creationDate": "2022-09-18T15:37:25.725Z",
"defaultBranch": "main",
"gitUser": "Michal",
"id": "1",
"lastScanDate": "2022-09-18T15:37:25.725Z",
"repository": "terragoat",
"results": {
"CRITICAL": 10,
"HIGH": 20,
"LOW": 1,
"MEDIUM": 5
},
"runId": 5,
"scanStatus": "HARD_FAIL",
"sourceType": "Github",
"status": "COMPLETED"
}
],
"hasNext": true
}
Request arguments validation error