Microsoft GH-200 Practice Test Questions and Exam Dumps Part4 Q61-80

View Full Microsoft GH-200 Exam Dumps and Practice Test Dumps

 

Question 61

Which GitHub feature provides temporary cloud credentials through OIDC?

  1. OpenID Connect
  2. GitHub Wiki
  3. Repository Topics
  4. Issue Templates

Correct Answer: 1

Explanation:

GitHub Actions can use OpenID Connect (OIDC) to obtain short-lived credentials from supported cloud providers without storing long-lived cloud secrets in GitHub. A workflow requests an OIDC token, and the configured cloud identity provider validates that token before issuing temporary credentials. This approach can reduce the exposure associated with persistent access keys. Trust conditions can restrict which repositories, branches, environments, or workflows may request credentials. OIDC is particularly useful for deployment automation because permissions can be granted dynamically for the duration of a workflow rather than relying on permanently stored cloud credentials.

Question 62

Which permission allows a workflow to read repository contents?

  1. actions: write
  2. contents: read
  3. packages: write
  4. issues: write

Correct Answer: 2

Explanation:

The contents: read permission allows a GitHub Actions workflow to read repository contents. GitHub Actions supports granular GITHUB_TOKEN permissions, allowing workflow authors to grant only the access required by automation. Restricting permissions can reduce the impact of an accidental or compromised workflow. Other permissions serve different purposes, such as publishing packages, modifying issues, or managing actions. A workflow that only needs to inspect source files generally does not require write access to repository contents. Explicitly configuring permissions is therefore an important part of designing controlled GitHub Actions automation.

Question 63

Which GitHub capability automatically updates vulnerable dependencies?

  1. Code Owners
  2. GitHub Pages
  3. Dependabot
  4. Discussions

Correct Answer: 3

Explanation:

Dependabot can monitor project dependencies and create pull requests to update them when newer versions are available. It can also help address known security vulnerabilities by proposing dependency updates. Configuration is typically managed through a dependabot.yml file, where update schedules and package ecosystems can be specified. Dependabot supports many common package managers and can create separate update pull requests according to repository configuration. Teams can then review, test, and merge those changes using their normal pull request process. This provides an automated way to keep dependencies maintained without manually tracking every available update.

Question 64

Which GitHub security feature identifies vulnerabilities in source code?

  1. GitHub Discussions
  2. GitHub Pages
  3. GitHub Projects
  4. Code scanning

Correct Answer: 4

Explanation:

GitHub code scanning analyzes repository source code to identify potential security vulnerabilities and coding problems. Code scanning can use CodeQL or compatible third-party analysis tools. Findings are presented as alerts that developers can review and address. Code scanning is different from secret scanning, which focuses on exposed credentials and other sensitive tokens, and dependency review, which examines dependency-related risks. Integrating code scanning into pull request workflows can help identify issues before changes reach production. Organizations can configure scanning schedules and supported languages according to their security and development requirements.

Question 65

Which GitHub feature detects exposed credentials in repositories?

  1. Secret scanning
  2. Branch visualization
  3. Project boards
  4. Release notes

Correct Answer: 1

Explanation:

GitHub secret scanning helps identify credentials and other sensitive information that may have been committed to repositories. Depending on the available features and configuration, detected secrets can generate alerts and may support push protection to prevent certain secrets from being committed in the first place. Secret scanning serves a different purpose from code scanning, which analyzes source code for vulnerabilities. It is also distinct from dependency scanning, which focuses on vulnerable software packages. Organizations can use these security capabilities together to reduce different classes of risks throughout the software development lifecycle.

Question 66

Which file configures Dependabot update behavior?

  1. .github/security.yml
  2. .github/dependabot.yml
  3. .github/packages.yml
  4. .github/updates.yml

Correct Answer: 2

Explanation:

Dependabot configuration is defined in .github/dependabot.yml. The file specifies package ecosystems, directories, update schedules, and optional settings that control how Dependabot creates update pull requests. A repository can define multiple package ecosystems when different dependency managers are used. Keeping this configuration in the repository makes dependency-update behavior version-controlled and visible to the development team. The file is separate from GitHub Actions workflow files, which are normally stored under .github/workflows. Correct configuration helps teams automate dependency maintenance while controlling the frequency and scope of generated update pull requests.

Question 67

Which GitHub mechanism assigns required reviewers to code changes?

  1. Labels
  2. Milestones
  3. CODEOWNERS
  4. Discussions

Correct Answer: 3

Explanation:

The CODEOWNERS mechanism identifies individuals or teams responsible for reviewing changes to specified files or directories. A CODEOWNERS file can define ownership patterns, and GitHub can request reviews from the relevant owners when matching files are modified. This is useful for repositories with specialized components where particular teams should review changes. CODEOWNERS can also work with branch protection and repository rules to require reviews from designated owners before merging. Keeping ownership definitions current is important because outdated entries may result in inappropriate reviewers being requested or important areas receiving insufficient review.

Question 68

Which GitHub control can require reviews before merging into a branch?

  1. Repository topics
  2. Branch protection rules
  3. Issue templates
  4. Git tags

Correct Answer: 2

Explanation:

Branch protection rules can require pull request reviews before changes are merged into protected branches. They can also enforce other requirements, such as required status checks, conversation resolution, or restrictions on who may push directly. These controls help establish consistent repository governance around important branches. Rules can be configured according to the repository’s development process and security requirements. For more advanced organization-wide controls, GitHub also provides repository rulesets. The specific protection requirements should be selected based on how the project handles reviews, testing, deployment, and branch management.

Question 69

Which GitHub feature provides organization-wide repository policy controls?

  1. Repository rulesets
  2. Commit messages
  3. Issue labels
  4. Release assets

Correct Answer: 1

Explanation:

Repository rulesets provide centralized controls for repositories and can enforce rules for branches or tags. They can be configured with conditions and enforcement requirements that apply across repositories within supported organizational scopes. Rulesets can help standardize requirements such as pull request reviews, status checks, and restrictions on branch or tag operations. Compared with managing isolated branch protection settings individually, centralized rules can make governance easier to maintain across many repositories. Administrators should design rulesets carefully so that required protections match the organization’s development workflows without unnecessarily blocking legitimate repository operations.

Question 70

Which GitHub Actions command writes a message to the workflow log?

  1. echo
  2. git log
  3. printf-log
  4. workflow-print

Correct Answer: 1

Explanation:

A shell command such as echo can write ordinary text to the GitHub Actions workflow log. This is useful for displaying progress messages, diagnostic information, or calculated values during execution. GitHub Actions also provides workflow command syntax for special logging behavior, such as annotations and grouping. Developers should avoid printing secrets or other sensitive information because workflow logs can expose information to people with appropriate repository access. Clear logging can make troubleshooting easier by showing which stages have executed and what non-sensitive values were produced during the workflow.

Question 71

Which GitHub Actions feature groups related log output together?

  1. Job matrix
  2. Log groups
  3. Deployment environments
  4. Runner labels

Correct Answer: 2

Explanation:

GitHub Actions workflow commands can create collapsible log groups, allowing related output to be visually organized within workflow logs. Grouping diagnostic messages can make long workflow logs easier to navigate, especially when builds contain many commands or repeated processing stages. A workflow can start a group, write relevant output, and then close the group. This organization does not change the underlying execution order or job dependencies. It is primarily a logging and troubleshooting aid. Effective log organization is especially useful for complex CI pipelines where developers need to quickly locate information from specific processing stages.

Question 72

Which GitHub Actions feature lets a workflow cancel older runs?

  1. Matrix expansion
  2. Concurrency
  3. Job outputs
  4. Artifact retention

Correct Answer: 2

Explanation:

GitHub Actions concurrency controls can limit how many workflow runs or jobs execute simultaneously within a defined concurrency group. With appropriate configuration, a newer run can cancel an older in-progress run. This is useful for workflows where only the latest change needs to be processed, such as deployments from a rapidly changing branch. Concurrency settings can help prevent unnecessary runner consumption and reduce conflicting deployments. The concurrency group should be designed carefully because canceling an older run may not be appropriate for every workflow, particularly operations that must complete once started.

Question 73

Which GitHub Actions context contains results from required jobs?

  1. needs
  2. runner
  3. matrix
  4. env

Correct Answer: 1

Explanation:

The needs context provides information about jobs that the current job depends on. It can expose the result of a prerequisite job and any outputs that the prerequisite makes available. This allows downstream jobs to make decisions based on earlier processing. For example, a deployment job can inspect whether a testing job succeeded before continuing. The needs context is available when job dependencies are explicitly declared. It differs from steps, which contains information about steps within the same job. Understanding this distinction is important when passing information between separate GitHub Actions jobs.

Question 74

Which GitHub Actions setting prevents a job from running on every matrix combination?

  1. exclude
  2. remove
  3. skip-combinations
  4. omit-matrix

Correct Answer: 1

Explanation:

The exclude option in a matrix strategy removes specific combinations from the generated job set. This is useful when most combinations should run but particular operating-system, runtime, or configuration combinations are unnecessary or unsupported. For example, a matrix may test several operating systems and language versions while excluding one incompatible pairing. Matrix configuration can also use include to add or augment selected combinations. Thoughtful use of include and exclude allows teams to maintain broad automated coverage without creating redundant or invalid workflow executions.

Question 75

Which GitHub Actions option adds custom combinations to a matrix?

  1. append
  2. include
  3. extend
  4. expand-only

Correct Answer: 2

Explanation:

The include option allows additional matrix configurations to be added or existing combinations to receive extra values. This provides flexibility when a standard matrix does not fully represent the required testing or deployment scenarios. For example, a workflow can add a specific configuration containing an additional environment value or special setting. include works together with exclude, which removes selected combinations. Matrix customization is useful when workflows need broad coverage while also supporting special cases. Correctly structuring matrix data can reduce duplicated YAML and keep complex CI configurations manageable.

Question 76

Which GitHub CLI command creates a pull request?

  1. gh repo pr
  2. gh pull create
  3. gh pr create
  4. gh request open

Correct Answer: 3

Explanation:

The GitHub CLI uses gh pr create to create a pull request from the command line. The command can be used with options for specifying the title, body, base branch, head branch, and other pull request information. This enables developers and automation scripts to interact with GitHub without relying exclusively on the web interface. The GitHub CLI also provides commands for viewing, checking, merging, and managing pull requests. When used in automation, appropriate authentication and repository permissions should be configured to ensure that the command can perform the intended operation securely.

Question 77

Which GitHub CLI command displays repository information?

  1. gh repo view
  2. gh repository show
  3. gh project info
  4. gh source inspect

Correct Answer: 1

Explanation:

The gh repo view command displays information about a GitHub repository through the GitHub CLI. It can show repository details and can be used with additional options to inspect specific information or open the repository in a browser. The GitHub CLI provides separate command groups for repositories, pull requests, issues, releases, workflows, and other GitHub resources. Using the CLI can simplify repetitive administrative tasks and integrate GitHub operations into scripts. Authentication determines which private repository information or operations are available to the current CLI user.

Question 78

Which GitHub Actions trigger runs when another workflow completes?

  1. workflow_start
  2. workflow_call
  3. workflow_run
  4. workflow_finish

Correct Answer: 3

Explanation:

The workflow_run event can trigger a workflow when another workflow is requested, in progress, or completed, depending on the configured activity types. It is useful for creating chained automation where one workflow performs a build and another performs follow-up processing. The triggering workflow can be identified and its result examined through available event information. This differs from workflow_call, which is used when one workflow intentionally invokes a reusable workflow. Understanding these triggers helps developers design multi-stage automation without placing every operation into one large workflow definition.

Question 79

Which GitHub Actions event allows another workflow to invoke a reusable workflow?

  1. workflow_call
  2. workflow_link
  3. workflow_invoke
  4. workflow_connect

Correct Answer: 1

Explanation:

The workflow_call trigger makes a workflow reusable by allowing another workflow to call it. A reusable workflow can define inputs, secrets, and outputs that form an interface between the caller and the called workflow. This allows common automation to be centralized while still supporting configurable behavior. Reusable workflows are particularly helpful when several repositories need the same build, testing, or deployment process. They differ from ordinary workflow chaining through workflow_run, because workflow_call is explicitly designed for direct reuse and parameterized workflow execution.

Question 80

Which GitHub feature stores container images and software packages?

  1. GitHub Discussions
  2. GitHub Packages
  3. GitHub Projects
  4. GitHub Codespaces

Correct Answer: 2

Explanation:

GitHub Packages provides package hosting for supported software package ecosystems and container images. It integrates with GitHub repositories and can be used in development and CI/CD workflows. GitHub Actions can authenticate to package registries and publish or retrieve packages as part of automated processes. Access permissions determine who can publish or consume private packages. GitHub Packages is different from GitHub Releases, which are primarily used to distribute release versions and associated assets. Using an integrated package registry can simplify dependency distribution and deployment workflows for applications developed within GitHub.