pub enum AttestAction {
Scan {
path: Option<PathBuf>,
strict: bool,
extra_paths: Vec<PathBuf>,
format: AttestScanFormat,
output: Option<PathBuf>,
},
Run {
contract: Option<PathBuf>,
emit_run_evidence: Option<PathBuf>,
audit_trail: Option<PathBuf>,
allow_command_override: bool,
sign_run_evidence: bool,
no_sign: bool,
command: Vec<String>,
},
Verify {
evidence: PathBuf,
pubkey: Option<String>,
},
Key {
action: AttestKeyAction,
},
}Expand description
Attestation subcommands — Phases 3 and 4 of the algol→tsafe migration.
scan(Phase 3) — secret + env-authority scanner.run(Phase 4) — env-injection enforcement harness; emits RunEvidence + CloudEvents audit trail.
Variants§
Scan
Scan a repo for committed secrets and env-authority signals.
Defaults to scanning the current directory. The scanner is the Phase 3 port of the algol Phase 2.1 scanner; see crate docs for the full provenance trail.
Scanner P/R on synthetic N=100 corpus: 1.000 / 1.000. Real-world
rates may differ. See
ecosystem-catalog/portfolio-algol-tsafe-phase2-1-precision-recovery-2026-05-21.md
for the verdict.
Fields
strict: boolExit with code 2 if any secret-class finding is present.
Secret-class kinds: ENV_FILE, HARDCODED_SECRET, PRIVATE_KEY.
SECRET_PLACEHOLDER (Phase 2.1 — placeholder/comment context)
is NOT counted as a secret finding.
extra_paths: Vec<PathBuf>Additional paths to scan (repeatable). Findings from all paths are merged into a single report.
format: AttestScanFormatOutput format.
Run
Run a command under env-injection enforcement.
Loads an AttestContract, strips the parent env, injects declared
variables from the configured sources, spawns the command, and
emits a RunEvidence artifact + CloudEvents audit-trail entry.
Phase 4 wire formats: tsafe.run.v1 RunEvidence,
tsafe.audit_event.v1 audit events, BLAKE3 fingerprints.
Legacy algol.* schemas + SHA-256 hashes are accepted on parse
during the v1.x compat window.
Fields
contract: Option<PathBuf>Path to the AttestContract to enforce. Defaults to
tsafe.contract.yaml in the current directory.
emit_run_evidence: Option<PathBuf>Path to write the RunEvidence artifact. Defaults to
tsafe-run.json in the current directory.
audit_trail: Option<PathBuf>Path to the audit-trail NDJSON log. Each line is a CloudEvents
envelope. Defaults to tsafe-audit-events.ndjson.
allow_command_override: boolAllow the supplied command to differ from the contract’s
command field. Disabled by default; useful only for testing.
sign_run_evidence: boolPhase 5: sign the emitted RunEvidence with the per-profile
Ed25519 keyring entry. Default is ON — if no key is
provisioned, one is auto-generated on first use with a stderr
warning (tsafe attest key generate is the explicit form).
Use --no-sign to opt out.
Verify
Verify the Ed25519 signature on a RunEvidence artifact.
Phase 5 (this version) emits artifacts with a signature field
carrying an Ed25519 signature over the canonical encoding of every
other field. verify re-derives the canonical bytes, prepends
the tsafe.run_evidence.v1 domain tag, and checks the signature.
Without --pubkey, the embedded pubkey on the artifact is used
(TOFU); a stderr warning is emitted reminding the operator to pin
the pubkey out of band. With --pubkey <base64url>, the supplied
key takes precedence.
Exit codes:
0— signature is valid5— artifact has nosignaturefield6— signature verification failed (tampered or wrong key)- other — internal error
Fields
Key
Manage the tsafe-attest Ed25519 signing key for a profile.
The key lives in the OS credential store under the per-profile
tsafe-attest-signing-key account name. tsafe attest run
signs emitted RunEvidence artifacts with this key by default;
tsafe attest verify can use the embedded pubkey or an
operator-supplied one.
Fields
action: AttestKeyActionTrait Implementations§
Source§impl FromArgMatches for AttestAction
impl FromArgMatches for AttestAction
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<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for AttestAction
impl Subcommand for AttestAction
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for AttestAction
impl RefUnwindSafe for AttestAction
impl Send for AttestAction
impl Sync for AttestAction
impl Unpin for AttestAction
impl UnsafeUnpin for AttestAction
impl UnwindSafe for AttestAction
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