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

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