task: document the new sensor taskings, and fix two broken examples - #351
Open
maximelb wants to merge 1 commit into
Open
task: document the new sensor taskings, and fix two broken examples#351maximelb wants to merge 1 commit into
maximelb wants to merge 1 commit into
Conversation
The CLI does not parse or validate the task string -- it forwards it to the backend verbatim -- so dir_find, file_grep, container_list and artifact_get --root-dir already work today. This is documentation only. Add them to the 'task send' command menu, which also feeds --ai-help via the explain registry, and note the budget convention: a bounded search stops at the first budget reached and says so in SCAN_IS_TRUNCATED and SCAN_STOPPED_REASON, so an empty result is not necessarily a clean host. Point the reader at the backend reference for the full flag set rather than inlining ~15 flags per command, since this menu has never carried flags and the backend is the authority on them. Two pre-existing bugs in the same lines, both verified against the actual Click options: - The incident-response cheatsheet told users to pass --args to 'task send', which accepts only --sid, --task and --investigation-id. Both examples errored out. Rewritten as task strings, matching the form the reference documentation uses. - doc/cli/sensor-management.md used 'task send --command'. 'send' takes --task; --command belongs to 'request' and 'reliable-send'. Verified: 4005 passed, 5 skipped.
Contributor
Author
|
/lc-review |
lcbill
approved these changes
Sep 2, 2026
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
Documentation only — no functional change, and none is needed.
The CLI does not parse or validate the task string.
task sendforwards it to the backend verbatim (commands/task.py:127→sdk/sensor.py:118), and the backend generates its own help from the command parser's argument definitions. Sodir_find,file_grep,container_listandartifact_get --root-diralready work against the current CLI:What was missing is discoverability. This adds them to the
task sendcommand menu, which also feeds--ai-helpthrough the explain registry.I also noted the budget convention once: a bounded search stops at the first budget reached and reports it in
SCAN_IS_TRUNCATED/SCAN_STOPPED_REASON, so an empty result is not necessarily a clean host.Rather than inline ~15 flags per command — this menu has never carried flags for any command — the text points at the backend reference, which is the authority on them.
Two pre-existing bugs, same lines
Both verified against the actual Click options rather than assumed:
incident-responsecheatsheet (help_topics.py) told users to pass--argstotask send, which accepts only--sid,--taskand--investigation-id. Both examples errored out on copy-paste. Rewritten as task strings, matching the form the reference documentation uses.doc/cli/sensor-management.mdusedtask send --command.sendtakes--task;--commandbelongs torequestandreliable-send.Context
repo_listandusb_list_devicesare also absent from this menu — this list has drifted from the backend for a while. I did not add them here to keep the change scoped, but they are worth a follow-up.Validation
pytest— 4005 passed, 5 skipped--ai-helptext and cheatsheet output, not just the source