Chris 09242ce9c8 Add new Looker client ID and client secret rules (#1947) hace 2 meses
..
1password.go 23cb69fba4 feat(rules): Add 1Password secret key detection (#1834) hace 9 meses
adafruit.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
adobe.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
age.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
airtable.go c98e5e0d27 feat: add Airtable Personnal Access Token detection (#1952) hace 2 meses
algolia.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
alibaba.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
anthropic.go 72977e41b6 feat: add Anthropic API key detection (#1910) hace 7 meses
artifactory.go a044b815b3 feat: add artifactory reference token and api key detection (#1906) hace 7 meses
asana.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
atlassian.go ef8223700a fix(atlassian): reduce false-positives for v1 pattern (#1892) hace 8 meses
authress.go 83e99bacf1 feat(report): allow user-defined templates (#1650) hace 1 año
aws.go 87d96295d6 feat: add Amazon Bedrock API key detection (#1935) hace 4 meses
azure.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
beamer.go 973c794cf0 chore(rules): include fps in reference (#1471) hace 1 año
bitbucket.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
bittrex.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
clickhouse.go 9bc725786d Adding clickhouse scanner (#1826) hace 10 meses
clojars.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
cloudflare.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
codecov.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
cohere.go 1a2f656278 feat: add cohere rule (#1549) hace 1 año
coinbase.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
config.tmpl 3821f30b06 Config min version (#1955) hace 4 meses
confluent.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
contentful.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
curl.go cfdeb0d7e0 feat(rule): validate & sort rule when generating (#1817) hace 10 meses
databricks.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
datadog.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
definednetworking.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
digitalocean.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
discord.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
doppler.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
droneci.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
dropbox.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
duffel.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
dynatrace.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
easypost.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
etsy.go 83e99bacf1 feat(report): allow user-defined templates (#1650) hace 1 año
facebook.go d88bc094f7 facebook keyword hace 1 año
fastly.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
finicity.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
finnhub.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
flickr.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
flutterwave.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
flyio.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
frameio.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
freemius.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
freshbooks.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
gcp.go f6193bc92c feat(gcp): increase rule entropy (#1840) hace 9 meses
generic.go 782f310478 Archive support (#1872) hace 8 meses
github.go cfdeb0d7e0 feat(rule): validate & sort rule when generating (#1817) hace 10 meses
gitlab.go 107a41827b Add support for GitLab Runner Tokens (Routable) (#1820) hace 10 meses
gitter.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
gocardless.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
grafana.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
harness.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
hashicorp.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
hashicorp_vault.go cfdeb0d7e0 feat(rule): validate & sort rule when generating (#1817) hace 10 meses
heroku.go 6f251eef65 Added Heroku API Key New Version (#1883) hace 8 meses
hubspot.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
huggingface.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
infracost.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
intercom.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
intra42.go 455ae0aab7 More rule fixes (#1586) hace 1 año
jfrog.go f0d4499064 Add comma as operator for GenerateSemiGenericRegex (#1679) hace 1 año
jwt.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
kraken.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
kubernetes.go 6f967cad68 fix(kubernetes): remove slow element from pat (#1848) hace 9 meses
kucoin.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
launchdarkly.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
linear.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
linkedin.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
lob.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
looker.go 09242ce9c8 Add new Looker client ID and client secret rules (#1947) hace 2 meses
mailchimp.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
mailgun.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
mapbox.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
mattermost.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
maxmind.go 3e8cd2d1ab Add MaxMind license key rule (#1771) hace 10 meses
meraki.go 3fdaefdaa3 fix(meraki): restrict keyword case (#1722) hace 1 año
messagebird.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
netlify.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
newrelic.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
notion.go c5ccbb9468 Respect contexts with timeouts (#1948) hace 3 meses
npm.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
nuget.go cfdeb0d7e0 feat(rule): validate & sort rule when generating (#1817) hace 10 meses
nytimes.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
octopusdeploy.go 43fae355e6 feat(rules): create Octopus Deploy api key (#1602) hace 1 año
okta.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
openai.go ddcc75371f implement new openai regex pattern (#1780) hace 10 meses
openshift.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
perplexity.go 7fb21a4e61 feat(rules): Add Perplexity AI API key detection (#1825) hace 9 meses
plaid.go 782f310478 Archive support (#1872) hace 8 meses
planetscale.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
postman.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
prefect.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
privateai.go 00bb82153e feat: add PrivateAI rule (#1548) hace 1 año
privatekey.go 3fa5a3a954 Minor false positive improvements (#1758) hace 11 meses
pulumi.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
pypi.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
rapidapi.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
readme.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
rubygems.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
scalingo.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
sendbird.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
sendgrid.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
sendinblue.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
sentry.go 3fa5a3a954 Minor false positive improvements (#1758) hace 11 meses
settlemint.go f6966057f5 feat: add settlemint api keys detection (#1663) hace 1 año
shippo.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
shopify.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
sidekiq.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
slack.go 9708e65c25 A first attempt adding hooks.slack.com/triggers/ (#1792) hace 10 meses
snyk.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
sonar.go a82bc53d89 feat: improve regex to detect Sonar tokens with prefixes (#1931) hace 6 meses
sourcegraph.go c6424a6fc3 added sourcegraph token rule (#1736) hace 1 año
square.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
squarespace.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
stopwords.go e97695b852 feat(generic-api-key): exclude keywords (#1587) hace 1 año
stripe.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
sumologic.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
teams.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
telegram.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
travisci.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
trello.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
twilio.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
twitch.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
twitter.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
typeform.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
yandex.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
zendesk.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año

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