Dewan Ishtiaque Ahmed e93a7c0d26 Update Harness rules to add _ and - in the account ID part. (#1503) il y a 1 an
..
adafruit.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
adobe.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
age.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
airtable.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
algolia.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
alibaba.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
asana.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
atlassian.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
authress.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
aws.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
beamer.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
bitbucket.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
bittrex.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
clojars.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
cloudflare.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
codecov.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
coinbase.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
config.tmpl 8a1ca9ecc9 Added poetry.lock to default allowlist paths (#1474) il y a 2 ans
confluent.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
contentful.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
databricks.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
datadog.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
definednetworking.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
digitalocean.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
discord.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
doppler.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
droneci.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
dropbox.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
duffel.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
dynatrace.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
easypost.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
etsy.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
facebook.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
fastly.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
finicity.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
finnhub.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
flickr.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
flutterwave.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
frameio.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
freshbooks.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
gcp.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
generic.go 4e43d11093 chore: fix gl workflow error (#1487) il y a 1 an
github.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
gitlab.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
gitter.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
gocardless.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
grafana.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
harness.go e93a7c0d26 Update Harness rules to add _ and - in the account ID part. (#1503) il y a 1 an
hashicorp.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
heroku.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
hubspot.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
huggingface.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
infracost.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
intercom.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
intra42.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
jfrog.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
jwt.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
kraken.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
kubernetes.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
kucoin.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
launchdarkly.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
linear.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
linkedin.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
lob.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
mailchimp.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
mailgun.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
mapbox.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
mattermost.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
messagebird.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
netlify.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
newrelic.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
npm.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
nytimes.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
okta.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
openai.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
openshift.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
plaid.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
planetscale.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
postman.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
prefect.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
privatekey.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
pulumi.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
pypi.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
rapidapi.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
readme.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
rubygems.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
scalingo.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
sendbird.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
sendgrid.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
sendinblue.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
sentry.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
shippo.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
shopify.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
sidekiq.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
slack.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
snyk.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
square.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
squarespace.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
stopwords.go 128b50f67b style: sort the stopwords (#1289) il y a 2 ans
stripe.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
sumologic.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
teams.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
telegram.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
travisci.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
trello.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
twilio.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
twitch.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
twitter.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
typeform.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
vault.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
yandex.go bd81872eee Make config generation utils public (#1480) il y a 2 ans
zendesk.go bd81872eee Make config generation utils public (#1480) il y a 2 ans

readme.go

package rules

import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/config/utils"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)

func ReadMe() *config.Rule {
// define rule
r := config.Rule{
RuleID: "readme-api-token",
Description: "Detected a Readme API token, risking unauthorized documentation management and content exposure.",
Regex: utils.GenerateUniqueTokenRegex(`rdme_[a-z0-9]{70}`, true),

Keywords: []string{
"rdme_",
},
}

// validate
tps := []string{
utils.GenerateSampleSecret("api-token", "rdme_"+secrets.NewSecret(utils.AlphaNumeric("70"))),
}
return utils.Validate(r, tps, nil)
}