Richard Gomez db8e5e672e feat(generate): use multiple allowlists (#1691) il y a 1 an
..
1password.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
adafruit.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
adobe.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
age.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
airtable.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
algolia.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
alibaba.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
asana.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
atlassian.go 4181ad647a Add new jira api token pattern (#1601) il y a 1 an
authress.go 83e99bacf1 feat(report): allow user-defined templates (#1650) il y a 1 an
aws.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
azure.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
beamer.go 973c794cf0 chore(rules): include fps in reference (#1471) il y a 1 an
bitbucket.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
bittrex.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
clojars.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
cloudflare.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
codecov.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
cohere.go 1a2f656278 feat: add cohere rule (#1549) il y a 1 an
coinbase.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
config.tmpl db8e5e672e feat(generate): use multiple allowlists (#1691) il y a 1 an
confluent.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
contentful.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
curl.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
databricks.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
datadog.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
definednetworking.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
digitalocean.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
discord.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
doppler.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
droneci.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
dropbox.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
duffel.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
dynatrace.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
easypost.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
etsy.go 83e99bacf1 feat(report): allow user-defined templates (#1650) il y a 1 an
facebook.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
fastly.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
finicity.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
finnhub.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
flickr.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
flutterwave.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
flyio.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
frameio.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
freemius.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
freshbooks.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
gcp.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
generic.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
github.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
gitlab.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
gitter.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
gocardless.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
grafana.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
harness.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
hashicorp.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
hashicorp_vault.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
heroku.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
hubspot.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
huggingface.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
infracost.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
intercom.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
intra42.go 455ae0aab7 More rule fixes (#1586) il y a 1 an
jfrog.go f0d4499064 Add comma as operator for GenerateSemiGenericRegex (#1679) il y a 1 an
jwt.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
kraken.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
kubernetes.go db8e5e672e feat(generate): use multiple allowlists (#1691) il y a 1 an
kucoin.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
launchdarkly.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
linear.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
linkedin.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
lob.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
mailchimp.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
mailgun.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
mapbox.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
mattermost.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
messagebird.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
netlify.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
newrelic.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
npm.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
nuget.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
nytimes.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
octopusdeploy.go 43fae355e6 feat(rules): create Octopus Deploy api key (#1602) il y a 1 an
okta.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
openai.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
openshift.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
plaid.go 83e99bacf1 feat(report): allow user-defined templates (#1650) il y a 1 an
planetscale.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
postman.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
prefect.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
privateai.go 00bb82153e feat: add PrivateAI rule (#1548) il y a 1 an
privatekey.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
pulumi.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
pypi.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
rapidapi.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
readme.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
rubygems.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
scalingo.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
sendbird.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
sendgrid.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
sendinblue.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
sentry.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
settlemint.go f6966057f5 feat: add settlemint api keys detection (#1663) il y a 1 an
shippo.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
shopify.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
sidekiq.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
slack.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
snyk.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
square.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
squarespace.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
stopwords.go e97695b852 feat(generic-api-key): exclude keywords (#1587) il y a 1 an
stripe.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
sumologic.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
teams.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
telegram.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
travisci.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
trello.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
twilio.go a91c6717a0 replace std library regex engine with go-re2 (#1669) il y a 1 an
twitch.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
twitter.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
typeform.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
yandex.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an
zendesk.go c11adc91ad Generate comprehensive secret samples (#1484) il y a 1 an

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}`, false),
Entropy: 2,
Keywords: []string{
"rdme_",
},
}

// validate
tps := utils.GenerateSampleSecrets("api-token", "rdme_"+secrets.NewSecret(utils.AlphaNumeric("70")))

fps := []string{
`const API_KEY = 'rdme_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';`,
}
return utils.Validate(r, tps, fps)
}