fix(base): classify +form-submit as high-risk-write#1969
Merged
yballul-bytedance merged 1 commit intoJul 24, 2026
Merged
Conversation
Form submission writes and submits data through a public share link, an irreversible action that should require explicit confirmation. Reclassify the shortcut from write to high-risk-write so the runner's --yes gate fires before execution, matching +form-delete and other high-risk base commands. Update the lark-base skill docs (--yes on all examples, param table, tips) and add tests pinning the confirmation gate (unit) and dry-run structure (e2e).
📝 WalkthroughWalkthroughChangesForm Submit Confirmation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@c352583ab7932211166230214dfc4052b8937b39🧩 Skill updatenpx skills add yballul-bytedance/cli#fix/form-subimit-high-risk -y -g |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/lark-base/references/lark-base-form-submit.md`:
- Line 78: Update the `--yes` entry in the parameter table for the documented
command to state that confirmation is required only for actual execution, while
explicitly exempting `--dry-run`. Keep the existing `confirmation_required`
behavior for high-risk writes without `--yes` and ensure the wording remains
precise and machine-consumable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 581f5ffc-b845-4fc5-bd1f-d3cf665c401c
📒 Files selected for processing (5)
shortcuts/base/base_form_submit.goshortcuts/base/base_shortcuts_test.goskills/lark-base/SKILL.mdskills/lark-base/references/lark-base-form-submit.mdtests/cli_e2e/base/base_form_submit_dryrun_test.go
zhouyue-bytedance
approved these changes
Jul 20, 2026
kiraWangRuilong
pushed a commit
that referenced
this pull request
Jul 24, 2026
Form submission writes and submits data through a public share link, an irreversible action that should require explicit confirmation. Reclassify the shortcut from write to high-risk-write so the runner's --yes gate fires before execution, matching +form-delete and other high-risk base commands. Update the lark-base skill docs (--yes on all examples, param table, tips) and add tests pinning the confirmation gate (unit) and dry-run structure (e2e). Co-authored-by: yballul-bytedance <273011618+yballul-bytedance@users.noreply.github.com>
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
base +form-submitfills and submits data through a public form share link — an outward-facing, irreversible write. It was classified aswrite, so it ran without confirmation. This PR reclassifies it ashigh-risk-writeso the runner's--yesconfirmation gate fires before execution, consistent with+form-deleteand other high-risk base commands.Changes
shortcuts/base/base_form_submit.go:Riskwrite→high-risk-write; addbaseHighRiskYesTipto Tips. The runner auto-registers--yesand returnsconfirmation_required(exit 10) when it is missing.skills/lark-base/references/lark-base-form-submit.md: high-risk warning banner,--yeson all examples,--yesrow in the param table, and a tip note.skills/lark-base/SKILL.md: note+form-submitrequires--yesin the high-risk list and form-details section.TestFormSubmitRequiresConfirmationunit test pins the typedconfirmation_requiredgate; existing execute-path tests pass--yes; newtests/cli_e2e/base/base_form_submit_dryrun_test.godry-run E2E.Test Plan
go test ./shortcuts/base/)go test ./tests/cli_e2e/base/)gofmt -l,go vet,go mod tidycleanRelated Issues
Summary by CodeRabbit
New Features
Bug Fixes
--yesconfirmation flag before execution.Documentation