Zachary Rice d88bc094f7 facebook keyword 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 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 c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
algolia.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
alibaba.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
asana.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
atlassian.go 4181ad647a Add new jira api token pattern (#1601) hace 1 año
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 1 año
bittrex.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
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 db8e5e672e feat(generate): use multiple allowlists (#1691) hace 1 año
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 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
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 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 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 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
heroku.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
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 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
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
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
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
npm.go c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
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 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 c11adc91ad Generate comprehensive secret samples (#1484) hace 1 año
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 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 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
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 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 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 3f4d91fc22 build: support either stdlib or 3rd-party regexp (#1706) hace 1 año
snyk.go c11adc91ad Generate comprehensive secret samples (#1484) 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)
}