Richard Gomez 3fdaefdaa3 fix(meraki): restrict keyword case (#1722) hace 1 año
..
1password.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
adafruit.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
adobe.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
age.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
airtable.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
algolia.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
alibaba.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
asana.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
atlassian.go 4181ad647a Add new jira api token pattern (#1601) hace 2 años
authress.go 83e99bacf1 feat(report): allow user-defined templates (#1650) hace 1 año
aws.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
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 2 años
bittrex.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
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 2 años
codecov.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
cohere.go 1a2f656278 feat: add cohere rule (#1549) hace 2 años
coinbase.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
config.tmpl db8e5e672e feat(generate): use multiple allowlists (#1691) hace 1 año
confluent.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
contentful.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
curl.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
databricks.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
datadog.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
definednetworking.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
digitalocean.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
discord.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
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 2 años
dropbox.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
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 c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
fastly.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
finicity.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
finnhub.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
flickr.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
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 2 años
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 2 años
gcp.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
generic.go f3ae52e138 feat(generic-api-key): detect base64 (#1598) hace 1 año
github.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
gitlab.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
gitter.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
gocardless.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
grafana.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
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 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
heroku.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
hubspot.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
huggingface.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
infracost.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
intercom.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
intra42.go 455ae0aab7 More rule fixes (#1586) hace 2 años
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 2 años
kubernetes.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
kucoin.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
launchdarkly.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
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 2 años
lob.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
mailchimp.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
mailgun.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
mapbox.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
mattermost.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
meraki.go 3fdaefdaa3 fix(meraki): restrict keyword case (#1722) hace 1 año
messagebird.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
netlify.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
newrelic.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
npm.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
nuget.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
nytimes.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
octopusdeploy.go 43fae355e6 feat(rules): create Octopus Deploy api key (#1602) hace 2 años
okta.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
openai.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
openshift.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
plaid.go 83e99bacf1 feat(report): allow user-defined templates (#1650) hace 1 año
planetscale.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
postman.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
prefect.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
privateai.go 00bb82153e feat: add PrivateAI rule (#1548) hace 2 años
privatekey.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
pulumi.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
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 2 años
readme.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
rubygems.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
scalingo.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
sendbird.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
sendgrid.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
sendinblue.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
sentry.go 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
settlemint.go f6966057f5 feat: add settlemint api keys detection (#1663) hace 1 año
shippo.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
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 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
snyk.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
square.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
squarespace.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
stopwords.go e97695b852 feat(generic-api-key): exclude keywords (#1587) hace 2 años
stripe.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
sumologic.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
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 2 años
travisci.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
trello.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
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 2 años
twitter.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
typeform.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
yandex.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años
zendesk.go c11adc91ad Generate comprehensive secret samples (#1484) hace 2 años

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