nerdexam
Microsoft

GH-500 · Question #64

Which of the following options are code scanning application programming interface (API) endpoints? Each answer presents part of the solution. (Choose two.)

The correct answer is C. Modify the severity of an open code scanning alert. D. Get a single code scanning alert. The GitHub Code Scanning REST API includes a GET endpoint to retrieve a single alert by its number (GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}) and a PATCH endpoint to update alert properties including severity (PATCH…

Code Scanning

Question

Which of the following options are code scanning application programming interface (API) endpoints? Each answer presents part of the solution. (Choose two.)

Options

  • ADelete all open code scanning alerts.
  • BList all open code scanning alerts for the default branch.
  • CModify the severity of an open code scanning alert.
  • DGet a single code scanning alert.

How the community answered

(40 responses)
  • A
    5% (2)
  • B
    8% (3)
  • C
    88% (35)

Explanation

The GitHub Code Scanning REST API includes a GET endpoint to retrieve a single alert by its number (GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}) and a PATCH endpoint to update alert properties including severity (PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}). There is no API endpoint to 'delete all open alerts' (alerts cannot be bulk-deleted) and no endpoint named specifically 'list alerts for the default branch' - the list endpoint covers all branches with optional filtering.

Topics

#Code Scanning#API Endpoints#Alerts Management#GitHub Advanced Security

Community Discussion

No community discussion yet for this question.

Full GH-500 Practice