Repository navigation
App Security: ask which app configuration to scan when none is selected - #8762
Merged
Merged
Conversation
dmerand
approved these changes
Oct 5, 2026
jplhomer
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
In an app with several app configurations, no
shopify.app.tomland noshopify app config usechoice,shopify app security checkaborts withCouldn't find shopify.app.toml in <dir>.It doesn't offer a choice or say what to do next.shopify app security clean --allfails the same way, though it doesn't need a configuration.WHAT is this pull request doing?
checkasks which configuration to scan when--config, a validapp config usechoice andshopify.app.tomldon't select one and there are several. The answer isn't saved:checkprints the command with--configthat skips the question next time. A single configuration is used without asking, and a staleapp config usechoice falls through to the question instead of re-runningapp config use.record,review,cleanandinstructions, abort with<n> app configurations found in <dir>, and none is selected.and list the configurations to pass to--config.--client-idstill overrides the selected configuration's client ID, as ondeploy. With several configurations and none selected, it aborts instead of asking: it can't be combined with--config, so the printed commands couldn't repeat the choice. The error points toshopify app config use <config>.Before



After



clean --allfinds the app directory without selecting or validating a configuration, so it works in these apps and with an invalid TOML. It still refuses a--paththat doesn't exist, so a mistyped path can't walk up and delete another app's results.Other app commands still abort in this case. The question is specific to App Security.
After
How to test your changes?
From an app directory with two or more
shopify.app.<name>.tomlfiles and noshopify.app.toml:pnpm shopify app security check --path <app directory>pnpm shopify app security check --path <app directory> < /dev/nullpnpm shopify app security check --path <app directory> --client-id <client ID> < /dev/nullpnpm shopify app security clean --all --path <app directory>pnpm shopify app security clean --all --path <app directory>/missingChecklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add