Question 340
In preparation for a release readiness rehearsal, engineers supporting a regional hospital technology unit notice: A custom action writes the string set-output to logs and expects the runner to treat it as a new step output. What principle should the team apply when judging solutions?
- JavaScript action compatibility is defined by metadata and packaged runtime expectations.
- A composite action is a step-level reusable component with explicit metadata.
- Private action reuse requires explicit source repository access policy.
- Workflow commands and environment files have defined parser and scope semantics.
Explanation
Correct Answer
D:The principle explains the reported failure: Plain log output is not the supported structured output channel. The acceptance evidence is: The caller reads the emitted value under the documented step output name.
Incorrect Answers
A:This principle does not account for the observed behavior; it belongs to JavaScript action runtime. The relevant one is: Workflow commands and environment files have defined parser and scope semantics.
B:This rule governs Composite action metadata, not the constraint described by a regional hospital technology unit. The applicable rule is: Workflow commands and environment files have defined parser and scope semantics.
C:That concept may matter in a different Private action access design. Here the operational boundary is explained by: Workflow commands and environment files have defined parser and scope semantics.
Question 341
In preparation for an access-control audit, engineers supporting a specialist clinic platform team notice: A custom action writes the string set-output to logs and expects the runner to treat it as a new step output. Which repeatable process control should be adopted?
- Add input-default and override tests to the action release suite.
- Validate action.yml schema in CI for each release.
- Test every published tag from an external consumer workflow.
- Keep action output tests aligned with supported runner interfaces.
Explanation
Correct Answer
D:This control addresses the recurring source of the defect at a specialist clinic platform team: Plain log output is not the supported structured output channel.
Incorrect Answers
A:This control would reduce risk around Action input metadata, but it does not prevent the reported failure from recurring. The fitting safeguard is: Keep action output tests aligned with supported runner interfaces.
B:The proposed routine targets Composite shell declaration. At a specialist clinic platform team, recurrence is more directly prevented by: Keep action output tests aligned with supported runner interfaces.
C:This safeguard protects a different workflow involving Bundled JavaScript dependencies; the actual root cause requires: Keep action output tests aligned with supported runner interfaces.
Question 342
An automation change at a specialist clinic platform team exposes this failure: A custom action writes the string set-output to logs and expects the runner to treat it as a new step output. Which observation most quickly narrows the cause?
- Inspect the target action directory for action.yml and a valid runs block.
- Inspect action.yml fields and the Marketplace release eligibility message.
- Inspect action.yml runs using and the first runtime initialization error.
- Inspect action source for legacy commands and GITHUB_OUTPUT writes.
Explanation
Correct Answer
D:Checking this first at a specialist clinic platform team narrows the fault without prematurely changing settings. The subsequent correction is: Use the supported GITHUB_OUTPUT environment-file mechanism for output exchange.
Incorrect Answers
A:The proposed check assumes a separate Composite action metadata failure. To narrow this case first: Inspect action source for legacy commands and GITHUB_OUTPUT writes.
B:Investigating Marketplace listing metadata would delay diagnosis of the condition at a specialist clinic platform team; the direct first check is: Inspect action source for legacy commands and GITHUB_OUTPUT writes.
C:This inspection is useful when investigating JavaScript action runtime, but it is not the first discriminator here. Inspect instead: Inspect action source for legacy commands and GITHUB_OUTPUT writes.
Question 343
A workflow review for a specialist clinic platform team identifies a specific risk: A custom action writes the string set-output to logs and expects the runner to treat it as a new step output. What constraint must remain true for a safe outcome?
- Docker container actions require a supported container-capable runner environment.
- The action path must be available after checkout in the consuming job.
- Output values must be escaped or encoded safely when they contain multiline data.
- The chosen shell must be available on all supported runner images.
Explanation
Correct Answer
C:Applying the boundary prevents the workflow from taking an unsafe shortcut while the remedy is implemented: Use the supported GITHUB_OUTPUT environment-file mechanism for output exchange.
Incorrect Answers
A:The constraint around Docker action base image is not the governing gate for a specialist clinic platform team. The original defect makes this condition decisive: Output values must be escaped or encoded safely when they contain multiline data.
B:This constraint addresses Composite action metadata, whereas the described change must first satisfy: Output values must be escaped or encoded safely when they contain multiline data.
D:The constraint around Composite shell declaration is not the governing gate for a specialist clinic platform team. The original defect makes this condition decisive: Output values must be escaped or encoded safely when they contain multiline data.
Question 344
A CI/CD readiness check for an online retail marketplace reveals: A local composite action assumes scripts run from its own directory, but a caller starts the workflow from a nested checkout layout. What should the engineer change to resolve the reported behavior?
- Align the Dockerfile entrypoint and action metadata args with the script's argument parser.
- Check out the repository first and reference the action directory with an appropriate local path.
- Supply valid action metadata and complete the Marketplace publishing requirements for the release.
- Resolve script locations using the action's own path rather than the caller's working directory.
Explanation
Correct Answer
D:The targeted change is appropriate because action-relative files were resolved against the repository workspace instead of the action package. It leads directly to a checkable outcome: The action finds its scripts from both standard and nested checkouts.
Incorrect Answers
A:This adjustment addresses Docker entrypoint argument instead. For an online retail marketplace, the reported problem is caused by: Action-relative files were resolved against the repository workspace instead of the action package.
B:That work belongs to a different failure involving Local action relative path. The described workflow needs the narrower change because action-relative files were resolved against the repository workspace instead of the action package.
C:The proposal may suit Marketplace listing metadata, but it does not resolve the mechanism visible at an online retail marketplace: Action-relative files were resolved against the repository workspace instead of the action package.
Question 345
Engineers supporting an online retail marketplace are investigating this situation: A local composite action assumes scripts run from its own directory, but a caller starts the workflow from a nested checkout layout. What explains why the automation behaves this way?
- The image starts correctly but receives none of the intended caller parameters.
- The release artifact lacks packages referenced by its action entry file.
- Action-relative files were resolved against the repository workspace instead of the action package.
- A floating Docker base tag introduced an untested runtime dependency.
Explanation
Correct Answer
C:The reported symptoms follow from this specific mechanism: Action-relative files were resolved against the repository workspace instead of the action package. A focused corrective action would be: Resolve script locations using the action's own path rather than the caller's working directory.
Incorrect Answers
A:Although relevant to Docker entrypoint argument, this diagnosis does not match the described failure. The actual causal link is: Action-relative files were resolved against the repository workspace instead of the action package.
B:This relates to Bundled JavaScript dependencies; it would call for different acceptance evidence. For this case, the root cause is: Action-relative files were resolved against the repository workspace instead of the action package.
D:Although relevant to Docker action base image, this diagnosis does not match the described failure. The actual causal link is: Action-relative files were resolved against the repository workspace instead of the action package.
Question 346
In preparation for a seasonal traffic test, engineers supporting an online retail marketplace notice: A local composite action assumes scripts run from its own directory, but a caller starts the workflow from a nested checkout layout. What would verify that the original condition is resolved?
- The action's metadata validates and its step commands run under the selected shell.
- A workflow run resolves to the reviewed commit even after upstream tags move.
- The action finds its scripts from both standard and nested checkouts.
- The reviewed image digest starts and completes the action on supported Linux runners.
Explanation
Correct Answer
C:The proposed result demonstrates that the original technical gap is closed: Action-relative files were resolved against the repository workspace instead of the action package.
Incorrect Answers
A:The metric relates to Composite shell declaration and would leave the actual gap untested. A valid check is: The action finds its scripts from both standard and nested checkouts.
B:That result could verify Action version tag drift, but not the failure reported at an online retail marketplace. The relevant acceptance result is: The action finds its scripts from both standard and nested checkouts.
D:The metric relates to Docker action base image and would leave the actual gap untested. A valid check is: The action finds its scripts from both standard and nested checkouts.
Question 347
An automation change at an online retail marketplace exposes this failure: A local composite action assumes scripts run from its own directory, but a caller starts the workflow from a nested checkout layout. Which engineering principle should guide this decision?
- Reusable actions should not assume a consumer's working-directory layout.
- JavaScript action compatibility is defined by metadata and packaged runtime expectations.
- Outputs must be declared and mapped across the component interface.
- Custom actions should expose configurable behavior through stable input contracts.
Explanation
Correct Answer
A:This principle governs the problem at an online retail marketplace. Applying it leads to the targeted change: Resolve script locations using the action's own path rather than the caller's working directory.
Incorrect Answers
B:That concept may matter in a different JavaScript action runtime design. Here the operational boundary is explained by: Reusable actions should not assume a consumer's working-directory layout.
C:This principle does not account for the observed behavior; it belongs to Action output declaration. The relevant one is: Reusable actions should not assume a consumer's working-directory layout.
D:This rule governs Action input metadata, not the constraint described by an online retail marketplace. The applicable rule is: Reusable actions should not assume a consumer's working-directory layout.
Question 348
An automation change at a wholesale commerce platform exposes this failure: A local composite action assumes scripts run from its own directory, but a caller starts the workflow from a nested checkout layout. How can the team reduce the chance that this failure returns?
- Test supported runner images when upgrading action runtime versions.
- Test the action with adversarial input strings before release.
- Test local actions with nondefault checkout paths.
- Include local-action path tests in a fresh workflow run.
Explanation
Correct Answer
C:The failure it prevents is: Action-relative files were resolved against the repository workspace instead of the action package.
Incorrect Answers
A:The proposed routine targets JavaScript action runtime. At a wholesale commerce platform, recurrence is more directly prevented by: Test local actions with nondefault checkout paths.
B:This safeguard protects a different workflow involving Untrusted action input; the actual root cause requires: Test local actions with nondefault checkout paths.
D:The proposed routine targets Local action relative path. At a wholesale commerce platform, recurrence is more directly prevented by: Test local actions with nondefault checkout paths.
Question 349
A workflow review for a wholesale commerce platform identifies a specific risk: A local composite action assumes scripts run from its own directory, but a caller starts the workflow from a nested checkout layout. What first investigation step is most appropriate?
- Inspect file paths and the github.action_path context where appropriate.
- Inspect checkout order and the action.yml location relative to workspace.
- Inspect action.yml runs using and the first runtime initialization error.
- Inspect the Dockerfile base reference and failing container startup logs.
Explanation
Correct Answer
A:If confirmed, the appropriate response is: Resolve script locations using the action's own path rather than the caller's working directory.
Incorrect Answers
B:This inspection is useful when investigating Local action relative path, but it is not the first discriminator here. Inspect instead: Inspect file paths and the github.action_path context where appropriate.
C:The proposed check assumes a separate JavaScript action runtime failure. To narrow this case first: Inspect file paths and the github.action_path context where appropriate.
D:Investigating Docker action base image would delay diagnosis of the condition at a wholesale commerce platform; the direct first check is: Inspect file paths and the github.action_path context where appropriate.
Question 350
During a patch deployment review at a wholesale commerce platform, engineers observe the following: A local composite action assumes scripts run from its own directory, but a caller starts the workflow from a nested checkout layout. Which prerequisite or trust boundary must be satisfied?
- The chosen shell must be available on all supported runner images.
- Caller-specific checkout paths must be reflected in the action reference.
- Paths derived from user input must remain inside the intended workspace boundary.
- Runtime changes must include dependency and bundled-code compatibility checks.
Explanation
Correct Answer
C:This condition protects the relevant trust or execution boundary at a wholesale commerce platform. Ignoring it would recreate the defect: Action-relative files were resolved against the repository workspace instead of the action package.
Incorrect Answers
A:This constraint addresses Composite shell declaration, whereas the described change must first satisfy: Paths derived from user input must remain inside the intended workspace boundary.
B:The boundary may be necessary for a separate Local action relative path workflow, not the primary risk here. The relevant constraint is: Paths derived from user input must remain inside the intended workspace boundary.
D:This constraint addresses JavaScript action runtime, whereas the described change must first satisfy: Paths derived from user input must remain inside the intended workspace boundary.
GitHub Actions (GH-200) Practice Tests