Repository navigation
Conversation
jek
added this pull request to stack #8969
October 21, 2026 00:00
app security check
`securityCheck` now returns what it did instead of rendering it: the listed files, the finished scan with its `--blocking` outcome, or a cancellation when the user declines to scan without app configuration. It still records the telemetry. The command passes the outcome to a presenter in security-check/, which renders the gathering warnings and the report, offers and delivers the coding-agent instructions, and sets exit code 1 when `--blocking` is breached. The tip that repeats a prompted selection is still shown before the scan, through a callback that the command passes in. `resolveAppSecuritySelection` returns declining to scan without app configuration as an outcome instead of aborting, so that `--json` can report it. In the terminal the presenter aborts with the same error as before. The text output, prompts and exit codes don't change.
Copying the coding-agent instructions is the last step of `check`, after the scan finished and its report is shown. A clipboard that isn't available aborted the command, so the exit code no longer reported the scan. `check` now warns with the clipboard tool's message and suggests `--print-instructions` instead, and the exit code follows `--blocking`. `instructions --copy` still fails, because copying is all it does.
jek
force-pushed
the
app-security/support-json-schema-check
branch
from
October 21, 2026 00:46
5bc0499 to
d42f50b
Compare
`--json` prints one result for the scan: the app, the results directory and the two files that the scan replaced, its scope and scan directories, the number of agent checks, and whether `--blocking` passed. A breach still exits 1, after the result is printed. The result holds no findings: `review --json` shows them. Paths are absolute, with native separators. In a terminal the instructions prompt is still offered, on stderr, with choices to include the instructions in the result, and to copy them as well by default. `--print-instructions` includes them without asking. A failed copy warns on stderr and reports `copied: false`. `--list-files` lists the gathered files with absolute paths. Declining to scan without app configuration prints a cancelled result and exits 0. Gathering warnings and the tip to skip the prompts are events on stderr. `check` was the last app security command without typed JSON output, so the exceptions list drops its app security section.
jek
force-pushed
the
app-security/support-json-schema-check
branch
from
October 21, 2026 01:11
d42f50b to
b9edbe4
Compare
jek
marked this pull request as ready for review
October 21, 2026 13:58
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?
app security checkis the last app security command without--json. Its service also rendered output, prompted and set the exit code partway through, so a JSON mode couldn't be added without separating those.WHAT is this pull request doing?
Adds
--jsontoapp security check. A scan returns:{"status": "success", "valid": true, "app": {…}, "resultsDirectory": "…", "deterministicFindingsPath": "…/deterministic-findings.json", "agentChecksPath": "…/agent-checks.json", "scope": {"includeDirs": [], "excludes": [], "noGitIgnore": false}, "scanDirectories": [{"directory": "…", "origin": "app-directory"}], "agentCheckCount": 36, "blocking": {"level": "none", "blockedCheckCount": 0}, "instructions": {"content": "<Markdown>", "copied": true}}review --jsonis the one place findings are reported.validandblockedCheckCountfollow--blocking, with the same rule and exit codes as today.--json, on stderr. Its choices say that the instructions go into the result.--print-instructionsincludes them without asking. With--skip-instructions, "Nothing", or--no-input,instructionsis left out.--list-files --jsonreturns{status, app, scope, scanDirectories, files: [{path}]}with absolute paths.{"status": "cancelled"}and exits 0. Text mode still exits 1 with the same error.Commits:
securityCheckreturns alisted,scannedorcancelledoutcome, and a presenter insecurity-check/result.tsrenders it, prompts for instructions and sets the exit code. Declining is an outcome of the selection rather than an error. No behaviour change.checkwarns instead of failing: the scan has finished, so the exit code still follows--blocking. It has its own patch changeset, which also narrows the clipboard changeset from earlier in the stack.--json, and remove the App Security section from the JSON output lint exceptions.How to manually test your changes?
Build once and run the local CLI directly, so nothing else reaches stdout:
Run these in a real terminal with stdout redirected, so the prompts show while the result goes to the file:
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add