Schema: reject unknown keys in workflow_call/dispatch input definitions#35788
Conversation
|
Hey A few things to address before this is ready for review:
When you're ready to move forward, you can use this prompt with your coding agent:
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Hardens three input/secret subschemas in main_workflow_schema.json to reject unknown keys (e.g., typos like requird) by setting additionalProperties: false, aligning them with the strict pattern already used by workflow_dispatch inputs.
Changes:
- Add
additionalProperties: falsetoon.workflow_call.inputs.<id>,on.workflow_call.secrets.<id>, andsafe-outputs.dispatch_repository.<tool>.inputs.<id>. - Add a schema-structure test verifying all three paths set
additionalProperties: false. - Extend location/validation tests with typo cases and a valid control case.
Show a summary per file
| File | Description |
|---|---|
| pkg/parser/schemas/main_workflow_schema.json | Adds additionalProperties: false to the three input/secret definition subschemas. |
| pkg/parser/schema_test.go | New structural test asserting the strict flag at each path. |
| pkg/parser/schema_location_test.go | New validation cases for typos and a valid control case. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 0
Three input-definition subschemas in
main_workflow_schema.jsonaccepted misspelled keys silently because they definedpropertieswithoutadditionalProperties: false. This updates those subschemas so typos (for examplerequird) fail schema validation instead of compiling through.Schema hardening
additionalProperties: falseto:on.workflow_call.inputs.<id>on.workflow_call.secrets.<id>safe-outputs.dispatch_repository.<tool>.inputs.<id>Regression coverage
additionalProperties: false.requird) for each affected path and one valid control case to preserve expected success behavior.Example of the enforced shape