nerdexam
Microsoft

GH-200 · Question #74

In which scenarios could the GITHUB_TOKEN be used? (Each correct answer presents a complete solution. Choose two.)

The correct answer is D. to publish to GitHub Packages E. to create issues in the repo. [D] To authenticate to a GitHub Packages registry within a GitHub Actions workflow, you can use: -> GITHUB_TOKEN to publish packages associated with the workflow repository. A personal access token (classic) with at least read:packages scope to install packages associated with ot

Implement security for GitHub Actions

Question

In which scenarios could the GITHUB_TOKEN be used? (Each correct answer presents a complete solution. Choose two.)

Options

  • Ato create a repository secret
  • Bto add a member to an organization
  • Cto read from the file system on the runner
  • Dto publish to GitHub Packages
  • Eto create issues in the repo
  • Fto leverage a self-hosted runner

How the community answered

(39 responses)
  • B
    3% (1)
  • C
    3% (1)
  • D
    90% (35)
  • F
    5% (2)

Explanation

[D] To authenticate to a GitHub Packages registry within a GitHub Actions workflow, you can use: *-> GITHUB_TOKEN to publish packages associated with the workflow repository. * A personal access token (classic) with at least read:packages scope to install packages associated with other private repositories (GITHUB_TOKEN can be used if the repository is granted read access to the package. [E] You can use the GITHUB_TOKEN to make authenticated API calls. This example workflow creates an issue using the GitHub REST API: https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages https://docs.github.com/en/actions/tutorials/authenticate-with-github_token

Topics

#GITHUB_TOKEN#Permissions#GitHub Actions security#API authentication

Community Discussion

No community discussion yet for this question.

Full GH-200 Practice