Repository navigation
Conversation
The clean result's JSON codec and presenter will live in security-clean/, beside its schema, as for dev clean. The text output doesn't change.
`--json` prints the removed results directories and the app they belong to. With `--all`, only the app directory is known, so `app` holds only `directory`. The shared app-security JSON module starts with the app projection that the other app security commands will reuse. `--all` now lists the removed directories sorted, so the order no longer depends on the filesystem, in text and JSON alike. A missing results directory aborts with the `results-directory-not-found` code, so callers can tell it apart without parsing the message.
jek
added this pull request to stack #8969
October 21, 2026 00:00
app security clean
jek
marked this pull request as ready for review
October 21, 2026 13:50
This branch has not been deployed
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?
The
shopify app securitycommands have no--jsonoutput: they're listed as exceptions in the JSON output lint rule. Coding agents and scripts that drive the app security workflow have to read terminal boxes instead. This stack adds typed JSON output to each command, one PR per command, and then switches the agent workflow to it.WHAT is this pull request doing?
Adds
--jsontoapp security clean. The result says whether anything was removed, and lists the removed results directories as absolute paths:{"status": "success", "changed": true, "app": {"directory": "/path/to/app", "configurationPath": "/path/to/app/shopify.app.toml", "clientId": "1234"}, "resultsDirectories": ["/path/to/app/.shopify/app-security/shopify.app"]}--all, only the app directory is known, soappholds onlydirectory. Nothing to remove giveschanged: falseand an empty list.results-directory-not-found, whichrecordandreviewshare.app-security-json-output.tsholds the definitions that the other app security commands reuse, starting withapp.The first commit moves the terminal presenter to
security-clean/result.tswithout changing behaviour.How to manually test your changes?
Build once and run the local CLI directly, so nothing else reaches stdout:
In an app directory:
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add