First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
A workflow run by an autonomous agent only needs to read repository contents. Which configuration grants the least privilege to the automatic token?
- Omit the permissions key and inherit the repository default.
- permissions:
contents: read Correct answer.
- permissions:
contents: write
- permissions: write-all
Explanation
An explicit permissions map replaces the default scopes, and contents: read grants only the access the job needs. Narrow scopes limit what a compromised or misbehaving agent can change.
Question 2Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Which branch protection rule stops an agent from committing directly to the default branch?
- Require a pull request before merging Correct answer.
- Require linear history
- Require conversation resolution
- Require signed commits
Explanation
Requiring a pull request before merging blocks direct pushes to the protected branch, so every agent change must travel through a reviewable pull request. The other rules improve hygiene but still permit direct pushes.
Question 3Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Which repository mechanism automatically requests review from the team that owns the directories an agent modified?
- Dependabot alerts
- Required status checks
- Protected tags
- A CODEOWNERS file combined with 'Require review from Code Owners' Correct answer.
Explanation
CODEOWNERS maps paths to teams or users, and enabling the code-owner review requirement makes that ownership binding on protected branches. This routes agent-generated changes to the right reviewers automatically.
Question 4Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
A deployment job must pause until a human approves. Which configuration implements that gate?
- Environment secrets scoped to production
- Required reviewers on a protected environment Correct answer.
- A required status check on the default branch
- A concurrency group on the deployment job
Explanation
Environment protection rules can require named reviewers, and the job waits until an approval is recorded. Secrets alone control access but do not pause the run for human sign-off.
Question 5Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent writes a file containing a live cloud key and pushes it. Which control blocks the push before the secret is written to history?
- Secret scanning push protection Correct answer.
- CODEOWNERS review requirements
- Dependabot version updates
- A branch protection rule requiring linear history
Explanation
Push protection inspects pushes for supported secret patterns and rejects them before the objects land in the repository. Review-based controls act later and cannot undo history already written.
Question 6Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Why is a short-lived, narrowly scoped fine-grained personal access token preferred over a classic token for an agent calling the REST API?
- It limits the scope and lifetime of the damage if the credential leaks. Correct answer.
- It removes all API rate limits for the token.
- It never needs to be rotated or revoked.
- It grants organization-wide administration by default.
Explanation
Fine-grained tokens can be limited to specific repositories and permissions and set to expire, shrinking the blast radius of a leak. Rate limits and administration rights are not improved by narrowing scope.
Question 7Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Which setting keeps the logs and artifacts needed to audit an agent's actions several weeks after the run?
- Disabling organization audit log streaming
- Turning off check run creation
- Deleting workflow runs as soon as they succeed
- Configuring artifact and log retention periods Correct answer.
Explanation
Artifact and log retention periods determine how long run evidence remains downloadable for later review. Removing runs or suppressing records destroys the audit trail.
Question 8Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Which branch strategy is appropriate for an autonomous agent making code changes?
- Reuse one long-lived branch for all agents and all tasks.
- Create a short-lived branch per task and open a pull request. Correct answer.
- Force-push to release branches when tests fail as a shortcut.
- Commit directly to the default branch to reduce merge conflicts.
Explanation
A branch per task keeps changes isolated, reviewable, and easy to discard, and the pull request supplies the review and check gates. Shared or default branches let one bad run contaminate unrelated work.
Question 9Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Two runs of an agent workflow can start for the same issue and both push commits. Which setting serializes them?
- An extra required reviewer on the environment
- Enabling Dependabot security updates
- A concurrency group keyed on the issue, with cancel-in-progress disabled Correct answer.
- A longer timeout-minutes value on the job
Explanation
A concurrency group allows only one run per key at a time, and disabling cancel-in-progress makes the second run wait rather than abort the first. Keying on the issue ties the lock to the unit of work being handled.
Question 10Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent workflow needs to call a cloud provider. Which approach avoids storing long-lived cloud credentials in GitHub?
- Store the credentials in encrypted repository variables.
- Use OIDC federation scoped to the repository and branch. Correct answer.
- Paste the credentials into the workflow file as environment values.
- Commit the credentials to a private repository so only the team can read them.
Explanation
OpenID Connect lets the workflow exchange a short-lived identity token for cloud credentials under a trust policy you control. No static secret exists to leak, and the trust policy can restrict which repository and branch may assume the role.
Question 11Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Why enable 'Require branches to be up to date before merging' on a repository where agents open many pull requests?
- It merges pull requests automatically once a draft is opened.
- It lets agents skip CI when the change looks small and isolated.
- It removes the need for human review on agent pull requests entirely.
- It re-runs checks against the current base so conflicts surface early. Correct answer.
Explanation
The requirement forces the head branch to include the latest base before checks count, so two independently green agent pull requests cannot merge into a broken combination. It adds strictness and never removes review or testing.
Question 12Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Several agent pull requests pass CI individually but break the default branch when merged together. Which GitHub feature addresses this?
- Required linear history
- Draft pull requests
- CODEOWNERS review rules
- A merge queue Correct answer.
Explanation
A merge queue builds and tests each pull request against the latest base plus the pull requests ahead of it, so integration failures are caught before merge. It targets exactly the pairwise-green, jointly-broken case.
Question 13Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent job occasionally loops and burns runner minutes before anyone notices. Which built-in control bounds its runtime?
- Longer artifact retention
- timeout-minutes set on the job Correct answer.
- A concurrency group with cancel-in-progress enabled
- Required reviewers on the environment
Explanation
A job-level timeout terminates the run after the configured duration and reports a failure, capping cost from runaway loops. Concurrency only limits overlap between runs, not the length of one run.
Question 14Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Why should untrusted agent jobs run on ephemeral self-hosted runners that are destroyed after each job?
- They let one runner execute unlimited parallel jobs at the same time.
- They disable the organization audit log so run details stay private.
- They are always cheaper than GitHub-hosted runners regardless of the workload size.
- They keep credentials and tampered tooling from persisting between jobs. Correct answer.
Explanation
A fresh runner per job means nothing written to disk, cached, or installed can influence the next job. This contains an agent that is compromised or that intentionally leaves artifacts behind.
Question 15Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Which practice gives supervisors a durable, queryable record of agent-driven changes to repository settings and organization membership?
- Relying on pull request comment threads
- Streaming the organization audit log to a SIEM Correct answer.
- Enabling Dependabot alerts on each repository
- Reading check run annotations after each run
Explanation
The audit log records administrative events such as permission, membership, and repository setting changes, and streaming it preserves that record independently of the repository. Pull request discussion and check output do not capture these events.
Question 16Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent opens a pull request that adds a dependency with a known critical vulnerability. Which gate blocks the merge?
- A CODEOWNERS file
- Secret scanning alerts
- Dependency review action set as a required check Correct answer.
- Required linear history
Explanation
Dependency review inspects the manifest diff of a pull request and fails when it introduces a vulnerability at or above the configured severity. Wiring it as a required status check makes a failing result prevent merging.
Question 17Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An external policy service must veto agent pull requests that touch protected directories. How does it act as a merge gate?
- It rewrites the CODEOWNERS file after the pull request opens.
- It leaves a comment asking the agent to stop pushing.
- It posts a failing check run included in required status checks. Correct answer.
- It sends email to the maintainers' mailing list.
Explanation
Branch protection honors required status checks by name, so a check run with a failing conclusion blocks the merge until it passes. Comments and notifications are advisory and enforceable only by people reading them.
Question 18Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
A merged agent pull request causes a regression in production. Which rollback approach keeps history intact and auditable?
- Amend the agent's commit and force-push the branch.
- Open a revert pull request through the normal review process. Correct answer.
- Delete and re-create the default branch from a tag.
- Force-push the default branch back to an earlier commit.
Explanation
A revert pull request records the reversal as a new reviewed change, so the audit trail shows both the original merge and the correction. Rewriting shared history destroys the evidence supervisors rely on.
Question 19Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent's API call times out after the server may already have processed it. Which design avoids duplicate side effects?
- Retry immediately in a tight loop until a response arrives.
- Retry with backoff using an idempotency key. Correct answer.
- Escalate to an administrator on every timeout.
- Ignore the failure and continue with the next step.
Explanation
An idempotency key lets the server recognize a repeated request and return the original result instead of acting twice, while backoff avoids amplifying load. Tight retries increase duplicate risk and pressure on the API.
Question 20Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
How should agent-initiated changes be attributed so that audit logs and reviews identify the automation?
- Use an anonymous token that is rotated nightly.
- Reuse a human developer's personal access token.
- Authenticate as a dedicated GitHub App installation or bot account. Correct answer.
- Share one organization owner's credentials across all agents.
Explanation
A dedicated app or bot identity makes automated actions distinguishable in audit logs, commit authorship, and reviews. Borrowing a person's credentials makes automated and human activity indistinguishable.
Question 21Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent workflow pushes a commit with the repository's automatic GITHUB_TOKEN and expects the CI workflow on that branch to start. What happens?
- No new workflow run is created, which prevents recursive agent loops. Correct answer.
- The push is rejected with a permission error.
- All matching workflows start normally, as with a human push.
- Only workflows defined in the same file start.
Explanation
Events caused by the automatic token do not create new workflow runs, with the deliberate exceptions of workflow_dispatch and repository_dispatch. This guard stops an agent from triggering an endless chain of runs.
Question 22Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
A workflow uses the pull_request_target event, holds repository secrets, and checks out the head commit of the incoming pull request. Why is this configuration risky?
- It disables dependency caching for every subsequent run.
- It only runs for pull requests opened from forks, so results are unreliable in general.
- It combines base-repository secrets with execution of untrusted pull request code. Correct answer.
- It prevents the workflow from posting comments on the pull request.
Explanation
pull_request_target runs in the base repository context with access to secrets, so checking out and executing the contributor's code lets that code read those secrets. The safe pattern keeps privileged events away from untrusted code or requires approval before running it.
Question 23Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Supervisors must distinguish commits produced by the agent from commits produced by people. Which control is the most direct?
- Require signed commits and sign agent commits with a dedicated key. Correct answer.
- Enable Dependabot security updates.
- Require linear history on the default branch.
- Require status checks to pass before merging.
Explanation
Signature verification ties each commit to a specific signing key, so a key reserved for the agent cryptographically separates its commits from human ones. The other controls shape history or gate merges but do not establish commit provenance.
Question 24Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent receives HTTP 403 with a retry-after header and a secondary rate limit message. What is the correct response?
- Retry the request immediately in a loop until it succeeds.
- Wait at least the retry-after period, then retry with backoff. Correct answer.
- Ignore the response and continue with the next step.
- Create additional tokens to multiply the available quota.
Explanation
Secondary rate limits are throttling signals, and the retry-after value states the minimum wait before another attempt is acceptable. Honoring it with backoff avoids escalation to longer blocks; parallel tokens and tight loops make the throttling worse.
Question 25Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent authenticates with a GitHub App installation access token. What must the agent's credential handling account for?
- The token is valid for 30 days and must be rotated monthly.
- The token never expires until it is manually revoked.
- The token can only be used for a single API request.
- The token expires after about an hour, so the agent must mint a new one. Correct answer.
Explanation
Installation access tokens are deliberately short-lived, so long-running agents must refresh them from the App's private key before expiry rather than caching one value indefinitely. Handling the refresh path prevents mid-run authentication failures.
Question 26Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
A workflow used by an autonomous agent omits the top-level `permissions` key. What determines the scopes available to the job's `GITHUB_TOKEN`?
- The permissions of the user who most recently edited the workflow file in the repository.
- Full administrative access, because workflows execute with the identity of the repository owner.
- The repository or organization default for `GITHUB_TOKEN`, which may grant write access. Correct answer.
- Read-only access to every scope, because GitHub Actions always starts each run from a baseline of zero granted permissions.
Explanation
When a workflow does not declare `permissions`, the token inherits whatever default the repository or organization has configured, and that default is frequently read/write for legacy repositories. Because the granted scopes are not visible in the workflow file, supervisors cannot audit them from the code alone. The reliable practice is to declare the minimal `permissions` block explicitly in every agent workflow.
Question 27Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Supervisors want a human-readable digest of what an autonomous agent did to appear on the workflow run page. Which mechanism should the agent use?
- Committing the digest to a dedicated branch named after the workflow run identifier.
- Setting the digest as a job output so that a separate downstream workflow can print it when it runs.
- Emitting the digest as a workflow command using the `::debug::` prefix so it appears in the log.
- Appending markdown to the file named by the `GITHUB_STEP_SUMMARY` environment variable. Correct answer.
Explanation
Each job exposes a per-step summary file through `GITHUB_STEP_SUMMARY`; markdown appended to it is rendered on the run page and retained with the run. This makes the agent's own account of its actions reviewable without downloading logs. Debug commands and job outputs serve entirely different purposes.
Question 28Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent's workflow deploys to production after its tests pass. Supervisors want a named human to approve each deployment without changing the workflow's triggers. Which configuration accomplishes this?
- Attaching a protected environment with required reviewers to the deployment job. Correct answer.
- Restricting the deployment workflow so that it only runs on the default branch of the repository.
- Adding the supervisor as a repository administrator with full access to all settings.
- Adding a required status check named after the supervisor's team so that merges wait for them.
Explanation
Protected environments support required reviewers, so a job that references the environment pauses and waits for an approval from the designated people before it continues. The gate applies per deployment and does not require rewriting the trigger logic of the workflow. Repository roles and branch restrictions do not create a per-deployment approval step.
Question 29Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent begins behaving erratically and supervisors must stop new agent runs immediately, without deleting the workflow definition or losing run history. Which action achieves this?
- Setting the workflow's `timeout-minutes` to 1 so that any running job stops almost immediately after it starts.
- Removing all repository collaborators except the organization owner until the incident is over.
- Deleting the workflow file from the default branch so that no further runs can be started for that repository.
- Disabling the workflow, so new runs stop while its definition and history are kept. Correct answer.
Explanation
Disabling a workflow in Actions (or through the API) marks it as manually disabled, which prevents new runs from starting while preserving the workflow file, its past runs, and its logs. It is therefore the fastest reversible kill switch during an incident. Deleting the file is destructive and removes the audit trail that supervisors need afterwards.
Question 30Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Agents frequently open pull requests. Supervisors want changes to infrastructure directories to always require review from the platform team, even when an agent authored the change. Which combination enforces this?
- An environment secret that is visible only to workflows the platform team maintains.
- A CODEOWNERS entry for those paths and a rule requiring code owner review. Correct answer.
- A concurrency group named after the platform team that serializes those pull requests.
- A workflow that adds a platform-team label to any pull request touching those paths.
Explanation
CODEOWNERS assigns owners to paths, and branch protection with 'Require review from Code Owners' turns those assignments into an enforceable approval requirement. The two features must be combined, because CODEOWNERS alone only requests reviewers. Labels and concurrency settings do not block a merge.
Question 31Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent job only analyses code, but `actions/checkout` leaves the token in the local git configuration, so a command the agent runs could push. Which change removes that exposure?
- Setting `persist-credentials: false` on checkout and granting only `contents: read`. Correct answer.
- Setting `fetch-depth: 0` so that the full history is available to the agent during analysis.
- Adding `permissions: contents: write` so that the token is scoped to this repository only.
- Running the job on a self-hosted runner labelled analysis so the token stays on that host.
Explanation
By default the checkout step stores the credential in the runner's local git configuration, so any git command the agent executes authenticates automatically. Setting `persist-credentials: false` prevents that storage, and reducing the workflow's permissions to `contents: read` means a leaked token could not push anyway. The two controls together address both exposure and blast radius.
Question 32Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Each new comment on an issue starts an agent run, and older runs keep working on stale instructions. What concurrency configuration makes the newest run supersede earlier ones?
- Removing concurrency entirely and relying on the default queue order of the runner pool.
- A separate concurrency group for each job in the workflow so jobs do not overlap.
- A concurrency group keyed on the issue number with `cancel-in-progress` set to false.
- A concurrency group keyed on the issue number with `cancel-in-progress: true`. Correct answer.
Explanation
A concurrency group keyed on the issue number ensures that only one run per issue is active, and `cancel-in-progress: true` terminates the older in-flight run when a newer one enters the group. This keeps the agent working from the most recent instructions instead of stale ones. Leaving `cancel-in-progress` false only serializes runs, so obsolete work still completes.
Question 33Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Supervisors need to learn within minutes when an agent workflow fails, rather than discovering it the next morning. Which approach provides timely alerting?
- Enabling 'Require branches to be up to date before merging' on the default branch.
- Adding a job summary step that describes the failure in markdown so that reviewers can read it later on the run page.
- Increasing the artifact retention period for the agent workflow to the maximum allowed.
- A follow-up workflow on `workflow_run` completion that alerts on-call when the conclusion is failure. Correct answer.
Explanation
The `workflow_run` event fires when another workflow completes and exposes its conclusion, so a small alerting workflow can push a notification to the on-call channel as soon as a failure occurs. This is push-based and does not depend on someone opening the run page. Retention settings and summaries only help after a person goes looking.
Question 34Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent prints a verbose debug log that could include a token injected from secrets. Which control keeps that value out of the run log?
- Storing the value in an environment variable whose name ends in `_SECRET` so tooling redacts it.
- Registering the value with `::add-mask::` and never echoing it in shell commands. Correct answer.
- Setting `retention-days` to 1 on the workflow's uploaded artifacts.
- Running the job inside a container image so log lines are isolated from the host runner and cannot be read from the log.
Explanation
GitHub masks exact secret values that it knows about, but values derived from secrets or embedded in longer strings can still appear in logs. Explicit `::add-mask::` commands register additional values to redact, and the primary control is to avoid printing the value at all. Naming conventions and container isolation do not redact log content.
Question 35Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent workflow uses several third-party actions that the agent itself selected. Which supply-chain control limits the damage if one of those actions is compromised?
- Pinning each action to a full-length commit SHA. Correct answer.
- Allowing the workflow to run only on `pull_request` events from the same repository.
- Caching the action's dependencies between runs to reduce download time.
- Referencing actions by a major version tag such as `@v3` so updates arrive automatically.
Explanation
A major version tag is a mutable reference that the action's maintainer can move to new code, so a compromised or rewritten release is picked up automatically. Pinning to a full-length commit SHA makes the executed code immutable and reviewable, and updates then happen only through a deliberate change. Event triggers and caching do not constrain what code an action runs.
Question 36Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent updates its own pull request branch. A human occasionally pushes a fix to the same branch, and the agent's next push silently overwrites it. Which practice prevents this?
- Rebasing onto the default branch before every push so history stays linear.
- Fetching first and then pushing with `--force` so the local branch wins.
- Pushing with `--force-with-lease` so the push fails if the remote branch has moved. Correct answer.
- Opening a new pull request from a fresh branch on every update so the old one is closed.
Explanation
`--force-with-lease` makes the push conditional on the remote ref still matching the value the agent last fetched, so a concurrent human commit causes the push to be rejected instead of overwritten. The agent can then rebase onto the human's commit and retry. Plain `--force` discards whatever the remote holds.
Question 37Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent comments on an issue, and its own comment triggers the workflow again, creating a loop. Which guard stops this?
- Skipping runs whose event sender type is `Bot`, or requiring a maintainer-applied label. Correct answer.
- Setting `cancel-in-progress` to true on the concurrency group for the workflow.
- Adding `timeout-minutes` to the job so that a loop is cut off quickly.
- Restricting the workflow trigger so that it only runs on the default branch.
Explanation
The trigger needs to exclude events that the automation itself produced, which can be done by checking the sender type in a job-level condition or by requiring a human-applied label before the agent may act. Either approach breaks the self-triggering cycle at its source. Runtime limits merely cap how long each iteration of the loop runs.
Question 38Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An untrusted agent job populates the Actions cache, and a separate privileged release workflow restores caches with matching keys. What is the supervisory concern and the correct mitigation?
- Untrusted runs can write caches that privileged workflows restore, so keys should be kept separate. Correct answer.
- Caches can only be restored by the exact workflow that created them, so matching keys are not enough.
- Caches are encrypted per job, so no mitigation is required.
- Caches are deleted whenever a job fails, so only successful runs can poison later jobs.
Explanation
Actions caches are scoped to the repository and branch and can be restored by any workflow whose key matches, which means an untrusted job can plant content that a privileged job later executes or trusts. The defense is to treat the cache as untrusted input: use distinct key namespaces, avoid saving caches from untrusted jobs, and never restore them in privileged workflows. Encryption and failure handling do not create a trust boundary between jobs.
Question 39Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
Three autonomous agents share one GitHub App installation with broad organization permissions. A supervisor wants a compromise of one agent to be containable. Which design is best?
- Rotating the shared installation token every hour for all three agents at once.
- Registering a separate App, or a separate installation with minimal permissions, per agent. Correct answer.
- Storing the shared private key in an environment secret available to every agent workflow in the organization.
- Adding a required reviewer to every pull request that any of the agents opens.
Explanation
Blast radius is determined by credential scope, and sharing one installation means every agent inherits the union of what all of them need. Giving each agent its own App or installation with only the permissions it requires lets a supervisor revoke one credential without disabling the others. Rotation reduces the window but does not separate privileges.
Question 40Operations and supervision of autonomous AI agents in GitHub-driven SDLC workflows
An agent must push commits and open pull requests but must never be able to modify files under `.github/workflows`. Which control enforces this?
- Giving the agent a token without the workflows permission, which rejects those edits. Correct answer.
- Adding the `.github/workflows` directory to `.gitignore` so the agent cannot stage those files.
- Requiring status checks on the default branch so unverified workflow edits cannot merge.
- Adding a CODEOWNERS entry that lists the platform team for the `.github/workflows` path.
Explanation
GitHub refuses to create or update files under `.github/workflows` unless the credential carries the workflows permission (or the `workflow` scope on a personal access token). Issuing the agent a credential that lacks that permission makes the restriction enforceable at the API rather than by convention. Review requirements only add a human check after the change has been authored.
Question 41Configuration of agentic systems
An agent workflow must call a third-party API that requires a key. Which configuration keeps the credential out of version control while still making it available to the agent at runtime?
- Define the key as a plain environment variable in the workflow YAML file
- Store the key as a repository secret and reference it from the workflow Correct answer.
- Commit the key to an encrypted file inside the repository
- Write the key into the agent's instruction file so the model can read it
Explanation
Repository and environment secrets are encrypted at rest and injected only at runtime, so the value never appears in the repository or in run logs. Referencing them through the secrets context keeps the plaintext out of the workflow file itself. Values committed to the repository or written directly into YAML remain visible to anyone with read access.
Question 42Configuration of agentic systems
A workflow step must open a pull request but should not be able to modify repository contents directly. Which workflow key scopes what the job's GITHUB_TOKEN is allowed to do?
- timeout-minutes
- concurrency
- permissions Correct answer.
- env
Explanation
The permissions key sets the maximum access the GITHUB_TOKEN has for that job or workflow, and scopes not listed are set to none when the key is present. Declaring only pull-requests: write gives the step exactly the access it needs. The other keys control runtime values, scheduling, and duration rather than authorization.
Question 43Configuration of agentic systems
Two teams report that the same agent behaves differently against the same repository. Which configuration change most directly makes the agent's behavior reproducible?
- Increase the agent's maximum iteration count
- Keep the system prompt, tool list, and model settings in a tracked config file Correct answer.
- Switch the agent to a larger model
- Grant the agent write access to more repository scopes
Explanation
Behavior differences usually come from configuration that lives outside version control, such as prompts and tool lists edited separately per environment. Keeping those values in a tracked file gives one reviewed source of truth and makes changes diffable and reversible. Larger models, broader permissions, and higher iteration limits alter behavior without making it reproducible.
Question 44Configuration of agentic systems
What is the purpose of declaring an explicit allowlist of tools in an agent's configuration?
- It allows the agent to skip approval checks for those tools
- It reduces the token cost of the initial system prompt to zero
- It guarantees the model will never produce an incorrect or malformed tool call
- It limits the agent to known capabilities, bounding unexpected behavior Correct answer.
Explanation
An allowlist bounds the set of actions the agent can take, so an unexpected or manipulated model output cannot reach tools outside the declared set. It is a containment control rather than a correctness guarantee, since the model can still pick the wrong allowed tool. Approval requirements and prompt cost are configured separately.
Question 45Configuration of agentic systems
Which configuration setting prevents an agent from looping indefinitely between reasoning steps and tool calls?
- A lower sampling temperature
- A larger context window
- A maximum number of reasoning or tool-use iterations Correct answer.
- A longer per-request timeout
Explanation
A step or iteration cap bounds how many model and tool cycles a single task may consume, which terminates runaway loops. Timeouts bound wall-clock duration but can still permit many steps. Temperature and context size affect output style and working memory rather than loop termination.
Question 46Configuration of agentic systems
Which value is appropriate to configure as a plain environment variable rather than a secret?
- The log level for the agent runtime Correct answer.
- The API token for a third-party service
- The private key used to sign commits
- The database password used by a test fixture
Explanation
Log verbosity is non-sensitive operational configuration that can live in plaintext where it is easy to review and change. Credentials such as tokens, passwords, and private keys must be stored as secrets so they are encrypted at rest and masked in logs.
Question 47Configuration of agentic systems
An agent is configured to open pull requests and also to merge them. Which configuration most directly prevents an unreviewed change from reaching the default branch?
- Enabling debug-level logging for the agent
- Requiring a human approval step before the merge tool becomes available Correct answer.
- Adding a second model to the agent's configuration
- Raising the agent's maximum iteration count
Explanation
Gating the merge capability behind an explicit human approval removes the agent's ability to complete that action unattended. The other options change capacity, observability, or reasoning but leave the merge path open. A review gate is what converts the agent's write action into a reviewed one.
Question 48Configuration of agentic systems
An agent must produce stable, repeatable summaries of the same input during regression testing. Which model configuration best supports that goal?
- A broader tool allowlist
- Maximum temperature with a high top-p value
- An increased maximum token budget
- Temperature set to zero Correct answer.
Explanation
Temperature scales sampling randomness; at zero the model selects the highest-probability continuation, which is the closest achievable approximation to deterministic output. Token budgets and tool lists do not reduce run-to-run variance in phrasing. High temperature and high top-p deliberately increase variation.
Question 49Configuration of agentic systems
An agent needs access to a filesystem tool exposed by a Model Context Protocol server. Where should the server's launch command and environment be declared?
- In the agent's configuration as an entry in the MCP server list Correct answer.
- In the commit message of the branch the agent works on
- In the repository's README so contributors can copy it manually
- In the agent's system prompt, phrased as a natural-language instruction
Explanation
MCP clients enumerate servers from a structured configuration entry that specifies the transport, the command or URL, and any environment the server needs. Documentation in a README or a mention in a prompt does not start a process. Commit metadata is not read by the runtime at all.
Question 50Configuration of agentic systems
An agent task sometimes hangs while waiting on a slow external tool. Which configuration combination addresses this most directly?
- Lowering the iteration limit to one
- A per-tool request timeout plus an overall job timeout Correct answer.
- Adding more tools to the allowlist
- Increasing the model's context window and temperature
Explanation
A per-tool timeout bounds a single slow call, while a job-level timeout bounds the whole run, so neither a stuck tool nor an accumulation of slow calls can hang the workflow indefinitely. Context and tool-list changes do not bound latency. Setting the iteration limit to one prevents legitimate multi-step work from completing.