A repository owner wants agent-assisted changes to remain scoped to octo-org/customer-api. The team uses an issue template for Copilot tasks and a validation workflow that fails if the workflow is run from another repository. Evaluate the following statements. 1. The issue template helps make the intended repository explicit. 2. The workflow prevents validation from succeeding in a copied repository. 3. The template alone prevents Copilot from reading any other repository.
# .github/ISSUE_TEMPLATE/copilot-task.yml
name: Copilot repository-scoped task
description: Request Copilot work for customer-api only
body:
- type: input
id: target_repository
attributes:
label: Target repository
value: octo-org/customer-api
validations:
required: true
- type: textarea
id: task_scope
attributes:
label: Approved task scope
description: Describe files, tests, and constraints for this repository only.
validations:
required: true
name: validate-agent-repository-scope
on:
pull_request:
branches:
- main
permissions:
contents: read
pull-requests: read
jobs:
scope-check:
runs-on: ubuntu-latest
steps:
- name: Check repository
run: |
test "${{ github.repository }}" = "octo-org/customer-api"Choose an answer
Tap an option to check your answer.
Correct answer: 1=Yes 2=Yes 3=No.
Why this is the answer
Statement 1 is correct because the issue template explicitly defines targetrepository with a default value of octo-org/customer-api, making the intended repository clear for any Copilot task initiated through this template. Statement 2 is correct because the scope-check job in the workflow explicitly tests if github.repository is exactly octo-org/customer-api. If the workflow is run in any other repository, this test will fail, preventing validation from succeeding. Statement 3 is incorrect. The issue template only provides instructions and context; it does not inherently restrict Copilot's access or ability to read other repositories. Copilot's access is governed by its configuration and permissions, not by an issue template.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed