Skip to content

Add suggestion flows to socket scan create#345

Merged
jdalton merged 4 commits intomainfrom
scan_suggestion_flow
Feb 28, 2025
Merged

Add suggestion flows to socket scan create#345
jdalton merged 4 commits intomainfrom
scan_suggestion_flow

Conversation

@pvdz
Copy link
Contributor

@pvdz pvdz commented Feb 28, 2025

This PR updates the socket scan create command in a few ways

  • Most importantly it adds a suggestion flow
    • When certain flags or args are missing it will use the Socket API to try and make reasonable suggestions
    • When the target is missing it will ask to confirm the target to be the current working directory
    • It will still fail "early" if any of these values are missing after the suggestion flow
  • Adds a --read-only flag, which is similar to the --dry-run flag except it will make REST API calls that only read (eg. no permanent changes)
  • Alphabetically orders the function args/params
  • Pushes up the error bailout if no api token is present, allowing to better separate the command file logic from the rest
  • Fixes spinner.success to call spinner.successAndStop instead

Here's an example with just running socket scan create on the cli folder itself:

image

image

image

image

image

@pvdz pvdz requested a review from jdalton February 28, 2025 16:17
@jdalton
Copy link
Contributor

jdalton commented Feb 28, 2025

I love these enhancements!

@jdalton jdalton enabled auto-merge (squash) February 28, 2025 16:25
@jdalton jdalton merged commit 606a73a into main Feb 28, 2025
14 of 15 checks passed
@jdalton jdalton deleted the scan_suggestion_flow branch February 28, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants