pub struct ScanArgs {
pub common: GlobalArgs,
pub batch_size: usize,
pub apply: bool,
pub prune: bool,
pub sync: bool,
pub all_releases: bool,
pub vex: VexEmbedArgs,
}Fields§
§common: GlobalArgs§batch_size: usizeNumber of packages to query per API request.
apply: boolDownload and apply selected patches in JSON mode (non-interactive).
Without this flag, scan --json is read-only — it lists available
patches plus an updates array but does not mutate the manifest.
Designed for unattended workflows (cron jobs, bots that open PRs);
pair with --yes for clarity though --json already implies non-
interactive confirmation. No effect outside --json mode (the
non-JSON path always prompts the user).
prune: boolGarbage-collect after the scan: prune manifest entries for
packages no longer present in the crawl, then delete orphan
blob, diff, and package-archive files from .socket/. Off by
default to preserve manifest state across temporary uninstalls;
pair with --apply (or use --sync) for the auto-update
workflow.
sync: boolConvenience flag for the auto-update workflow: implies both
--apply and --prune. Designed so a cron job or CI workflow
can run socket-patch scan --json --sync --yes and end up in a
fully-reconciled state in one invocation.
all_releases: boolDownload patches for every release/distribution variant of a
matched package, not just the one(s) matching the locally-
installed distribution. Affects ecosystems with per-release
variants — PyPI (wheel/sdist via artifact_id), RubyGems
(platform), and Maven (classifier). Off by default: narrow
scans store only the patch(es) for the installed dist, keeping
.socket/ small; --all-releases makes the manifest portable
across environments (e.g. cross-platform CI caches).
vex: VexEmbedArgsOn a successful scan, also generate an OpenVEX 0.2.0 document.
--vex <path> is the trigger; the --vex-* knobs mirror the
standalone vex command. The document is built from the manifest
as it stands after the scan (including any --apply/--sync
writes) and verified against on-disk state. A requested-but-failed
VEX makes the command exit non-zero.
Trait Implementations§
Source§impl Args for ScanArgs
impl Args for ScanArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for ScanArgs
impl FromArgMatches for ScanArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for ScanArgs
impl RefUnwindSafe for ScanArgs
impl Send for ScanArgs
impl Sync for ScanArgs
impl Unpin for ScanArgs
impl UnsafeUnpin for ScanArgs
impl UnwindSafe for ScanArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more