Imported configuration JSON is not validated — malformed data causes silent failures or crashes #12
Labels
No labels
blocked:lint-failed
blocked:needs-decision
blocked:no-changes
blocked:verify-failed
bug
feature-request
quickfix
security/high
security/medium
test-coverage
triage-approved
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/GSD2_agent#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Medium
File:
src/hooks/useWizard.tsxlines 234-246Issue: The
importConfigfunction performs no validation of the imported JSON structure beyond checking for astatekey. If the imported data contains incorrect types, malformed nested objects, or arbitrary extra keys, the state will silently accept malformed data. This can lead to crashes when UI components expect certain types.Recommendation: Use Zod schema validation to validate the imported JSON against the WizardState type before applying it.
Fixed in commit. Closing.