nerdexam
Microsoft

GH-500 · Question #120

You are creating an application that will utilize the code scanning application programming interface (API) to export a repository's alerts into a comma separated values (CSV) file. What scope needs…

The correct answer is B. security_events. The security_events scope grants read and write access to security events, which includes code scanning alerts. This is the required OAuth scope for any application interacting with GitHub's code scanning API to read, write, or export alert data. The other scopes serve…

Code Scanning

Question

You are creating an application that will utilize the code scanning application programming interface (API) to export a repository’s alerts into a comma separated values (CSV) file. What scope needs to be included in the GitHub token?

Options

  • Aworkflow
  • Bsecurity_events
  • Cadmin:org
  • Dread:user

How the community answered

(42 responses)
  • A
    7% (3)
  • B
    88% (37)
  • C
    2% (1)
  • D
    2% (1)

Explanation

The security_events scope grants read and write access to security events, which includes code scanning alerts. This is the required OAuth scope for any application interacting with GitHub's code scanning API to read, write, or export alert data. The other scopes serve unrelated purposes: workflow manages GitHub Actions workflows, admin:org handles organization-level administration, and read:user reads public and private user profile data - none of which are needed for code scanning alert access.

Topics

#Code Scanning API#GitHub Token Scopes#Security Events

Community Discussion

No community discussion yet for this question.

Full GH-500 Practice