Richard Gomez 961f2e674f feat(generic-api-key): tune false positives (#1606) hai 1 ano
..
1password.go 93acc6e82a feat(rules): add 1password token (#1583) hai 1 ano
adafruit.go bd81872eee Make config generation utils public (#1480) hai 1 ano
adobe.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
age.go bd81872eee Make config generation utils public (#1480) hai 1 ano
airtable.go bd81872eee Make config generation utils public (#1480) hai 1 ano
algolia.go bd81872eee Make config generation utils public (#1480) hai 1 ano
alibaba.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
asana.go bd81872eee Make config generation utils public (#1480) hai 1 ano
atlassian.go bd81872eee Make config generation utils public (#1480) hai 1 ano
authress.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
aws.go 9152eaa57a feat(aws): add entropy & allowlist (#1582) hai 1 ano
azure.go 8fb39ba8dc feat(azure): detect Azure AD client secrets (#1199) hai 1 ano
beamer.go bd81872eee Make config generation utils public (#1480) hai 1 ano
bitbucket.go bd81872eee Make config generation utils public (#1480) hai 1 ano
bittrex.go bd81872eee Make config generation utils public (#1480) hai 1 ano
clojars.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
cloudflare.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
codecov.go bd81872eee Make config generation utils public (#1480) hai 1 ano
cohere.go 1a2f656278 feat: add cohere rule (#1549) hai 1 ano
coinbase.go bd81872eee Make config generation utils public (#1480) hai 1 ano
config.tmpl 2db25f1367 feat(config): ignore swagger-ui assets (#1604) hai 1 ano
confluent.go bd81872eee Make config generation utils public (#1480) hai 1 ano
contentful.go bd81872eee Make config generation utils public (#1480) hai 1 ano
curl.go 7206d6bc56 feat(curl): tweak tps and fps (#1603) hai 1 ano
databricks.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
datadog.go bd81872eee Make config generation utils public (#1480) hai 1 ano
definednetworking.go bd81872eee Make config generation utils public (#1480) hai 1 ano
digitalocean.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
discord.go 8cfa6b2e43 fix(rules): add entropy (#1580) hai 1 ano
doppler.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
droneci.go bd81872eee Make config generation utils public (#1480) hai 1 ano
dropbox.go bd81872eee Make config generation utils public (#1480) hai 1 ano
duffel.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
dynatrace.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
easypost.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
etsy.go 9e06824372 Restrict Etsy keywords (#1491) hai 1 ano
facebook.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
fastly.go bd81872eee Make config generation utils public (#1480) hai 1 ano
finicity.go bd81872eee Make config generation utils public (#1480) hai 1 ano
finnhub.go bd81872eee Make config generation utils public (#1480) hai 1 ano
flickr.go bd81872eee Make config generation utils public (#1480) hai 1 ano
flutterwave.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
flyio.go 78f7d3f5df feat: create fly.io rule (#1528) hai 1 ano
frameio.go bd81872eee Make config generation utils public (#1480) hai 1 ano
freshbooks.go bd81872eee Make config generation utils public (#1480) hai 1 ano
gcp.go df126a7473 feat(gcp): update api key rule (#1481) hai 1 ano
generic.go 961f2e674f feat(generic-api-key): tune false positives (#1606) hai 1 ano
github.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
gitlab.go 8cfa6b2e43 fix(rules): add entropy (#1580) hai 1 ano
gitter.go bd81872eee Make config generation utils public (#1480) hai 1 ano
gocardless.go bd81872eee Make config generation utils public (#1480) hai 1 ano
grafana.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
harness.go e93a7c0d26 Update Harness rules to add _ and - in the account ID part. (#1503) hai 1 ano
hashicorp.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
hashicorp_vault.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
heroku.go bd81872eee Make config generation utils public (#1480) hai 1 ano
hubspot.go bd81872eee Make config generation utils public (#1480) hai 1 ano
huggingface.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
infracost.go 8cfa6b2e43 fix(rules): add entropy (#1580) hai 1 ano
intercom.go bd81872eee Make config generation utils public (#1480) hai 1 ano
intra42.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
jfrog.go bd81872eee Make config generation utils public (#1480) hai 1 ano
jwt.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
kraken.go bd81872eee Make config generation utils public (#1480) hai 1 ano
kubernetes.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
kucoin.go bd81872eee Make config generation utils public (#1480) hai 1 ano
launchdarkly.go bd81872eee Make config generation utils public (#1480) hai 1 ano
linear.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
linkedin.go bd81872eee Make config generation utils public (#1480) hai 1 ano
lob.go bd81872eee Make config generation utils public (#1480) hai 1 ano
mailchimp.go bd81872eee Make config generation utils public (#1480) hai 1 ano
mailgun.go bd81872eee Make config generation utils public (#1480) hai 1 ano
mapbox.go bd81872eee Make config generation utils public (#1480) hai 1 ano
mattermost.go bd81872eee Make config generation utils public (#1480) hai 1 ano
messagebird.go bd81872eee Make config generation utils public (#1480) hai 1 ano
netlify.go bd81872eee Make config generation utils public (#1480) hai 1 ano
newrelic.go bd81872eee Make config generation utils public (#1480) hai 1 ano
npm.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
nuget.go aabe381539 Define multiple allowlists per rule (#1496) hai 1 ano
nytimes.go bd81872eee Make config generation utils public (#1480) hai 1 ano
okta.go 0afb525e59 feat(okta): bump entropy to 4 (#1599) hai 1 ano
openai.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
openshift.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
plaid.go bd81872eee Make config generation utils public (#1480) hai 1 ano
planetscale.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
postman.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
prefect.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
privateai.go 00bb82153e feat: add PrivateAI rule (#1548) hai 1 ano
privatekey.go bf8a49fc29 Make private key check less greedy and include fifth dash (#1440) hai 1 ano
pulumi.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
pypi.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
rapidapi.go bd81872eee Make config generation utils public (#1480) hai 1 ano
readme.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
rubygems.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
scalingo.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
sendbird.go bd81872eee Make config generation utils public (#1480) hai 1 ano
sendgrid.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
sendinblue.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
sentry.go bd81872eee Make config generation utils public (#1480) hai 1 ano
shippo.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
shopify.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
sidekiq.go bd81872eee Make config generation utils public (#1480) hai 1 ano
slack.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
snyk.go bd81872eee Make config generation utils public (#1480) hai 1 ano
square.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
squarespace.go bd81872eee Make config generation utils public (#1480) hai 1 ano
stopwords.go e97695b852 feat(generic-api-key): exclude keywords (#1587) hai 1 ano
stripe.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
sumologic.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
teams.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
telegram.go bd81872eee Make config generation utils public (#1480) hai 1 ano
travisci.go bd81872eee Make config generation utils public (#1480) hai 1 ano
trello.go bd81872eee Make config generation utils public (#1480) hai 1 ano
twilio.go 455ae0aab7 More rule fixes (#1586) hai 1 ano
twitch.go bd81872eee Make config generation utils public (#1480) hai 1 ano
twitter.go bd81872eee Make config generation utils public (#1480) hai 1 ano
typeform.go bd81872eee Make config generation utils public (#1480) hai 1 ano
yandex.go bd81872eee Make config generation utils public (#1480) hai 1 ano
zendesk.go bd81872eee Make config generation utils public (#1480) hai 1 ano

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 := []string{
utils.GenerateSampleSecret("api-token", "rdme_"+secrets.NewSecret(utils.AlphaNumeric("70"))),
}
fps := []string{
`const API_KEY = 'rdme_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';`,
}
return utils.Validate(r, tps, fps)
}