Question 20
A workflow review for a county IT support organization identifies a specific risk: A privileged labeling workflow uses pull_request_target and checks out an external contributor's head commit before running its build script. Which diagnostic inspection should happen first?
- Inspect the event type and printed sanitized ref metadata from the run.
- Check the strategy fail-fast setting and the canceled job conclusions.
- Inspect the triggering event and the exact ref supplied to checkout.
- Inspect the service logs, health status and test connection endpoint.
Explanation
Correct Answer
C:Checking this first at a county IT support organization narrows the fault without prematurely changing settings. The subsequent correction is: Keep the privileged event on trusted base code and separate any untrusted checkout into an isolated read-only workflow.
Incorrect Answers
A:The proposed check assumes a separate Ref vs head ref failure. To narrow this case first: Inspect the triggering event and the exact ref supplied to checkout.
B:Investigating Matrix failfast triage would delay diagnosis of the condition at a county IT support organization; the direct first check is: Inspect the triggering event and the exact ref supplied to checkout.
D:The proposed check assumes a separate PostgreSQL service container failure. To narrow this case first: Inspect the triggering event and the exact ref supplied to checkout.
Question 21
During an accessibility release check at a county IT support organization, engineers observe the following: A privileged labeling workflow uses pull_request_target and checks out an external contributor's head commit before running its build script. What condition should govern whether this change may proceed?
- Untrusted branch names must be sanitized before use in shell commands.
- Any untrusted code must run in a context without privileged credentials.
- Deployment must never bypass the required verification job.
- The exported URL must be non-sensitive and must come from the called run.
Explanation
Correct Answer
B:Applying the boundary prevents the workflow from taking an unsafe shortcut while the remedy is implemented: Keep the privileged event on trusted base code and separate any untrusted checkout into an isolated read-only workflow.
Incorrect Answers
A:The constraint around Ref vs head ref is not the governing gate for a county IT support organization. The original defect makes this condition decisive: Any untrusted code must run in a context without privileged credentials.
C:The boundary may be necessary for a separate Job needs dependency workflow, not the primary risk here. The relevant constraint is: Any untrusted code must run in a context without privileged credentials.
D:The constraint around Reusable output plumbing is not the governing gate for a county IT support organization. The original defect makes this condition decisive: Any untrusted code must run in a context without privileged credentials.
Question 22
Engineers supporting a payment services company are investigating this situation: Operators enter free-form deployment destinations into workflow_dispatch, causing typos and accidental production targeting. What is the best focused remediation?
- Key the cache to the operating system and dependency lockfile hash, with safe fallback behavior.
- Define constrained dispatch inputs with appropriate types and validate allowed destinations before deployment.
- Apply a release-specific concurrency group and a deliberate cancel-in-progress policy.
- Map the step output to a job output and then to a workflow_call output in the called workflow.
Explanation
Correct Answer
B:The targeted change is appropriate because unvalidated manual inputs are treated as trusted environment selectors. It leads directly to a checkable outcome: Invalid destination values are rejected and approved values map to the intended protected environment.
Incorrect Answers
A:This adjustment addresses Dependency cache key instead. For a payment services company, the reported problem is caused by: Unvalidated manual inputs are treated as trusted environment selectors.
C:The proposal may suit Workflow concurrency group, but it does not resolve the mechanism visible at a payment services company: Unvalidated manual inputs are treated as trusted environment selectors.
D:This adjustment addresses Reusable output plumbing instead. For a payment services company, the reported problem is caused by: Unvalidated manual inputs are treated as trusted environment selectors.
Question 23
In preparation for a regulated software review, engineers supporting a payment services company notice: Operators enter free-form deployment destinations into workflow_dispatch, causing typos and accidental production targeting. Which underlying mismatch most directly causes the behavior?
- A duplicated mapping was edited independently instead of reusing the anchor consistently.
- The reusable workflow does not export the internal value through all required output layers.
- The default success requirement prevents the summary job from running after an upstream failure.
- Unvalidated manual inputs are treated as trusted environment selectors.
Explanation
Correct Answer
D:The reported symptoms follow from this specific mechanism: Unvalidated manual inputs are treated as trusted environment selectors. A focused corrective action would be: Define constrained dispatch inputs with appropriate types and validate allowed destinations before deployment.
Incorrect Answers
A:Although relevant to YAML anchor reuse, this diagnosis does not match the described failure. The actual causal link is: Unvalidated manual inputs are treated as trusted environment selectors.
B:This relates to Reusable output plumbing; it would call for different acceptance evidence. For this case, the root cause is: Unvalidated manual inputs are treated as trusted environment selectors.
C:That explanation predicts a separate Conditional job status problem. The condition reported by a payment services company instead follows from: Unvalidated manual inputs are treated as trusted environment selectors.
Question 24
An automation change at a payment services company exposes this failure: Operators enter free-form deployment destinations into workflow_dispatch, causing typos and accidental production targeting. What acceptance evidence should the team require?
- Invalid destination values are rejected and approved values map to the intended protected environment.
- Matching branch plus matching file change starts the workflow while a mismatch on either filter does not.
- Commits on feature branches skip release packaging while approved release-branch commits start it.
- The caller's needs output contains the intended deployment URL after a successful call.
Explanation
Correct Answer
A:The proposed result demonstrates that the original technical gap is closed: Unvalidated manual inputs are treated as trusted environment selectors.
Incorrect Answers
B:That result could verify Path filter combination, but not the failure reported at a payment services company. The relevant acceptance result is: Invalid destination values are rejected and approved values map to the intended protected environment.
C:The proposed signal checks a different behavior involving Branch filtered push. Here evidence must instead demonstrate: Invalid destination values are rejected and approved values map to the intended protected environment.
D:The metric relates to Reusable output plumbing and would leave the actual gap untested. A valid check is: Invalid destination values are rejected and approved values map to the intended protected environment.
Question 25
A workflow review for a payment services company identifies a specific risk: Operators enter free-form deployment destinations into workflow_dispatch, causing typos and accidental production targeting. Which design rule most directly governs this situation?
- Container network topology determines service discovery and port addresses.
- Concurrency groups are coordination controls for shared deployment targets.
- GITHUB_TOKEN privilege should match each job's operations rather than a broad default.
- Human-triggered automation still requires input validation and authorization.
Explanation
Correct Answer
D:This principle governs the problem at a payment services company. Applying it leads to the targeted change: Define constrained dispatch inputs with appropriate types and validate allowed destinations before deployment.
Incorrect Answers
A:This rule governs Container job networking, not the constraint described by a payment services company. The applicable rule is: Human-triggered automation still requires input validation and authorization.
B:That concept may matter in a different Workflow concurrency group design. Here the operational boundary is explained by: Human-triggered automation still requires input validation and authorization.
C:This principle does not account for the observed behavior; it belongs to Job scoped token permissions. The relevant one is: Human-triggered automation still requires input validation and authorization.
Question 26
A workflow review for an insurance systems operator identifies a specific risk: Operators enter free-form deployment destinations into workflow_dispatch, causing typos and accidental production targeting. What ongoing guardrail best prevents recurrence?
- Validate output mappings in reusable workflow contract tests.
- Test context handling for push and pull request events separately.
- Review dispatch input contracts whenever environments are added or renamed.
- Include network-address checks when moving jobs between VM and container execution.
Explanation
Correct Answer
C:The failure it prevents is: Unvalidated manual inputs are treated as trusted environment selectors.
Incorrect Answers
A:The proposed routine targets Reusable output plumbing. At an insurance systems operator, recurrence is more directly prevented by: Review dispatch input contracts whenever environments are added or renamed.
B:This safeguard protects a different workflow involving Ref vs head ref; the actual root cause requires: Review dispatch input contracts whenever environments are added or renamed.
D:The proposed routine targets Container job networking. At an insurance systems operator, recurrence is more directly prevented by: Review dispatch input contracts whenever environments are added or renamed.
Question 27
During a policy-enforcement rehearsal at an insurance systems operator, engineers observe the following: Operators enter free-form deployment destinations into workflow_dispatch, causing typos and accidental production targeting. What should be checked before modifying the workflow?
- Check the strategy fail-fast setting and the canceled job conclusions.
- Inspect the upload/download artifact names and the job dependency graph.
- Inspect the workflow_dispatch input types, defaults and input consumption.
- Inspect workflow- and job-level permissions and the operation that needs authentication.
Explanation
Correct Answer
C:If confirmed, the appropriate response is: Define constrained dispatch inputs with appropriate types and validate allowed destinations before deployment.
Incorrect Answers
A:Investigating Matrix failfast triage would delay diagnosis of the condition at an insurance systems operator; the direct first check is: Inspect the workflow_dispatch input types, defaults and input consumption.
B:This inspection is useful when investigating Cross job artifact handoff, but it is not the first discriminator here. Inspect instead: Inspect the workflow_dispatch input types, defaults and input consumption.
D:Investigating Job scoped token permissions would delay diagnosis of the condition at an insurance systems operator; the direct first check is: Inspect the workflow_dispatch input types, defaults and input consumption.
Question 28
A review for an insurance systems operator during a policy-enforcement rehearsal records this problem: Operators enter free-form deployment destinations into workflow_dispatch, causing typos and accidental production targeting. Which release or execution constraint matters most here?
- Required checks must be designed so skipped workflows do not strand protected merges.
- Only non-sensitive results and approved artifact links should be displayed.
- A production destination requires its separate environment protection controls.
- Failure reporting must not grant permission to deploy a failed build.
Explanation
Correct Answer
C:This condition protects the relevant trust or execution boundary at an insurance systems operator. Ignoring it would recreate the defect: Unvalidated manual inputs are treated as trusted environment selectors.
Incorrect Answers
A:This constraint addresses Path filter combination, whereas the described change must first satisfy: A production destination requires its separate environment protection controls.
B:The boundary may be necessary for a separate Job summary publication workflow, not the primary risk here. The relevant constraint is: A production destination requires its separate environment protection controls.
D:This constraint addresses Conditional job status, whereas the described change must first satisfy: A production destination requires its separate environment protection controls.
Question 29
In preparation for a student services application launch, engineers supporting a public university notice: A caller passes a region string to a reusable workflow, but the callee lacks a matching workflow_call input declaration. Which change is the most direct correction for this problem?
- Apply a release-specific concurrency group and a deliberate cancel-in-progress policy.
- Declare the typed workflow_call input in the called workflow and map it from the caller's with values.
- Map the step output to a job output and then to a workflow_call output in the called workflow.
- Write the SDK path into GITHUB_ENV for subsequent steps in the same job.
Explanation
Correct Answer
B:For a public university, this addresses the governing failure: The reusable workflow interface omits an input required by its caller. Success would be demonstrated by: A controlled caller run resolves the declared input and deploys to the intended nonproduction region.
Incorrect Answers
A:That work belongs to a different failure involving Workflow concurrency group. The described workflow needs the narrower change because the reusable workflow interface omits an input required by its caller.
C:This adjustment addresses Reusable output plumbing instead. For a public university, the reported problem is caused by: The reusable workflow interface omits an input required by its caller.
D:That work belongs to a different failure involving Environment variable propagation. The described workflow needs the narrower change because the reusable workflow interface omits an input required by its caller.
Question 30
An automation change at a public university exposes this failure: A caller passes a region string to a reusable workflow, but the callee lacks a matching workflow_call input declaration. What technical cause best explains the reported failure?
- The workflow never publishes the computed results through its job-summary channel.
- The reusable workflow interface omits an input required by its caller.
- The push event has no branch filter, so ordinary feature commits satisfy its trigger.
- The reusable workflow does not export the internal value through all required output layers.
Explanation
Correct Answer
B:The root mismatch connects the observed symptom to the missing configuration or trust boundary: The reusable workflow interface omits an input required by its caller. It can be tested using this evidence: A controlled caller run resolves the declared input and deploys to the intended nonproduction region.
Incorrect Answers
A:This relates to Job summary publication; it would call for different acceptance evidence. For this case, the root cause is: The reusable workflow interface omits an input required by its caller.
C:Although relevant to Branch filtered push, this diagnosis does not match the described failure. The actual causal link is: The reusable workflow interface omits an input required by its caller.
D:This relates to Reusable output plumbing; it would call for different acceptance evidence. For this case, the root cause is: The reusable workflow interface omits an input required by its caller.
GitHub Actions (GH-200) Practice Tests