[Security] Parse recipe booleans strictly#240
Open
fettpl wants to merge 3 commits into
Open
Conversation
fettpl
force-pushed
the
issue-224-strict-recipe-booleans
branch
from
July 17, 2026 22:43
5914ff9 to
c9c488d
Compare
Author
|
@0xSero This ready/non-draft fork PR now points to independently reviewed exact head 74b9e51. Its focused tests, full repository check, intact pre-push quality/build hook, production desktop packaging, installed signature, and live health validation passed. Current-head workflows are waiting at GitHub’s fork approval gate: CI run 29731322982 and Security run 29731322859. Please approve these runs when convenient. |
fettpl
marked this pull request as ready for review
July 18, 2026 04:59
fettpl
force-pushed
the
issue-224-strict-recipe-booleans
branch
from
July 20, 2026 09:24
7c55180 to
74b9e51
Compare
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.
Summary
Decodes
trust_remote_codeandenable_auto_tool_choiceas strict optional JSON booleans. Explicitfalseis preserved, defaults apply only when a field is omitted, and malformed values fail before recipe persistence.Closes #224
Dependency
Depends on #244. The branch is stacked on its release-gating repair so the repository's current quality gate remains green.
Root cause
Recipe parsing used JavaScript truthiness for security- and behavior-sensitive flags. Values such as the string
"false"becametrue, and the coercion erased the original invalid type before the final recipe schema could reject it.Solution design
Schema.optional(Schema.Boolean).undefined.Acceptance criteria
trueandfalseremain unchanged for both fields.Validation
74b9e5146cfe44f76323b45d6079f3a84477d97b.recipe-serializer.ts90.00% functions / 92.21% lines;recipe-routes.ts57.14% functions / 46.77% lines.npm run check: passed on the exact reviewed head./api/desktop-healthHTTP 200: passed for the exact stacked branch.Current
maindoes not definenpm run test:integrationor a genericnpm --prefix frontend run testscript, so those unavailable commands are not represented as passing.UI changes
None. This change has no visual or interaction impact.
Risks and rollout
mainif GitHub does not remove the stacked prerequisite automatically.