#[non_exhaustive]pub enum Kind {
OpenAiApiKey,
AnthropicApiKey,
GoogleApiKey,
AwsAccessKey,
GitHubToken,
GitLabToken,
SlackToken,
StripeKey,
HuggingFaceToken,
JsonWebToken,
PrivateKey,
Assigned,
}Expand description
What kind of secret a SecretMatch is.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OpenAiApiKey
An OpenAI API key: sk-, sk-proj- or sk-svcacct-.
AnthropicApiKey
An Anthropic API key: sk-ant-.
GoogleApiKey
A Google API key: AIza.
AwsAccessKey
An AWS access key id: AKIA or ASIA.
GitHubToken
A GitHub token: ghp_, gho_, ghu_, ghs_, ghr_ or
github_pat_.
GitLabToken
A GitLab personal access token: glpat-.
SlackToken
A Slack token: xoxa-, xoxb-, xoxp-, xoxr- or xoxs-.
StripeKey
A Stripe secret or restricted key: sk_live_, sk_test_,
rk_live_ or rk_test_.
HuggingFaceToken
A Hugging Face access token: hf_.
JsonWebToken
A JSON Web Token, such as an OAuth access or id token: a base64url
header and payload, each a JSON object (eyJ…), and a signature,
joined by .; the signature may be empty.
PrivateKey
A PEM private key block, -----BEGIN … PRIVATE KEY----- through its
end line, or through the end of the text when it has none.
Assigned
A value assigned to a name that says it is secret, NAME=value or
NAME: value: the name in upper snake case and, or ending in,
SECRET, TOKEN, PASSWORD, PASSWD, API_KEY, ACCESS_KEY,
SECRET_KEY or PRIVATE_KEY (so AWS_SECRET_ACCESS_KEY and
GITHUB_TOKEN, not MAX_TOKENS or TOKEN_COUNT). The value runs
to its closing quote when quoted, else to whitespace, a quote, ,,
; or & (the next assignment of a query string); one of at most
7 characters, all digits, starting with $ (a reference such as
$GITHUB_TOKEN), with characters other than printable ASCII (a
placeholder such as ‹SECRET_1›), or REDACTED is not a secret.
Only the value is the secret.
Implementations§
Trait Implementations§
impl Copy for Kind
impl Eq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnsafeUnpin for Kind
impl UnwindSafe for Kind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.