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

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)
}