MCPcopy Index your code

hub / github.com/gitleaks/gitleaks / functions

Functions501 in github.com/gitleaks/gitleaks

↓ 319 callersFunctionNewSecret
(regex string)
cmd/generate/secrets/regen.go:9
↓ 302 callersFunctionMustCompile
(str string)
regexp/wasilibs_regex.go:13
↓ 223 callersFunctionGenerateSampleSecrets
See: https://github.com/gitleaks/gitleaks/issues/1222
cmd/generate/config/utils/generate.go:85
↓ 218 callersFunctionValidate
(rule config.Rule, truePositives []string, falsePositives []string)
cmd/generate/config/utils/validate.go:16
↓ 179 callersFunctionAlphaNumeric
(size string)
cmd/generate/config/utils/patterns.go:19
↓ 103 callersFunctionGenerateSemiGenericRegex
(identifiers []string, secretRegex string, isCaseInsensitive bool)
cmd/generate/config/utils/generate.go:34
↓ 61 callersFunctionHex
(size string)
cmd/generate/config/utils/patterns.go:15
↓ 59 callersFunctionFatal
()
logging/log.go:44
↓ 53 callersFunctionGenerateUniqueTokenRegex
(secretRegex string, isCaseInsensitive bool)
cmd/generate/config/utils/generate.go:69
↓ 35 callersFunctionNumeric
(size string)
cmd/generate/config/utils/patterns.go:11
↓ 32 callersFunctionAlphaNumericExtended
(size string)
cmd/generate/config/utils/patterns.go:27
↓ 29 callersFunctionDebug
()
logging/log.go:26
↓ 26 callersFunctionAlphaNumericExtendedShort
(size string)
cmd/generate/config/utils/patterns.go:23
↓ 23 callersFunctionGenerateSampleSecret
(identifier string, secret string)
cmd/generate/config/utils/generate.go:80
↓ 20 callersFunctionError
()
logging/log.go:36
↓ 17 callersMethodClose
Close closes the underlying reader and then waits for the command to complete, releasing its resources.
sources/git.go:45
↓ 17 callersMethodString
()
cmd/scm/scm.go:21
↓ 16 callersFunctionWarn
()
logging/log.go:32
↓ 13 callersFunctionHex8_4_4_4_12
()
cmd/generate/config/utils/patterns.go:35
↓ 13 callersMethodPathAllowed
PathAllowed returns true if the path is allowed to be ignored.
config/allowlist.go:136
↓ 12 callersMethodTranslate
()
config/config.go:109
↓ 10 callersMethodFullPath
FullPath returns the File.Path with any preceding outer paths
sources/file.go:254
↓ 10 callersFunctionInfo
()
logging/log.go:29
↓ 10 callersFunctionnewPlausibleSecret
(regex string)
cmd/generate/config/rules/generic.go:283
↓ 9 callersMethodString
()
config/allowlist.go:20
↓ 9 callersFunctionmustGetStringFlag
(cmd *cobra.Command, name string)
cmd/root.go:542
↓ 8 callersMethodDetectSource
DetectSource scans the given source and returns a list of findings
detect/detect.go:208
↓ 8 callersMethodRegexAllowed
RegexAllowed returns true if the regex is allowed to be ignored.
config/allowlist.go:149
↓ 8 callersMethodString
String displays the command used for GitCmd
sources/git.go:193
↓ 8 callersMethodValidate
Validate guards against common misconfigurations.
config/rule.go:64
↓ 7 callersMethodAddGitleaksIgnore
(gitleaksIgnorePath string)
detect/detect.go:153
↓ 7 callersMethodDetect
Detect scans the given fragment and returns a list of findings
detect/detect.go:270
↓ 7 callersFunctionNewDetector
NewDetector creates a new detector with the given config
detect/detect.go:115
↓ 7 callersFunctionNewDetectorDefaultConfig
NewDetectorDefaultConfig creates a new detector with the default config
detect/detect.go:135
↓ 7 callersFunctionWith
()
logging/log.go:18
↓ 6 callersMethodClose
()
report/report_test.go:40
↓ 6 callersMethodCommitAllowed
CommitAllowed returns true if the commit is allowed to be ignored.
config/allowlist.go:117
↓ 6 callersFunctionCreateGlobalConfig
()
cmd/generate/config/base/config.go:11
↓ 6 callersMethodFragments
Fragments yields fragments for the this source
sources/file.go:52
↓ 6 callersMethodString
String returns a string representation for clearer debugging
detect/codec/start_end.go:55
↓ 6 callersMethoddetectRule
detectRule scans the given fragment for the given rule and returns a list of findings
detect/detect.go:371
↓ 6 callersFunctionmustGetBoolFlag
(cmd *cobra.Command, name string)
cmd/root.go:526
↓ 5 callersFunctionConfig
(cmd *cobra.Command)
cmd/root.go:234
↓ 5 callersFunctionDetector
(cmd *cobra.Command, cfg config.Config, source string)
cmd/root.go:249
↓ 5 callersFunctionTrace
()
logging/log.go:22
↓ 5 callersFunctionValidateWithPaths
(rule config.Rule, truePositives map[string]string, falsePositives map[string]string)
cmd/generate/config/utils/validate.go:41
↓ 5 callersMethodWait
Wait waits for the command to exit and waits for any copying to stdin or copying from stdout or stderr to complete. Wait also closes underlying stdou
sources/git.go:188
↓ 5 callersFunctionfindingSummaryAndExit
(detector *detect.Detector, findings []report.Finding, exitCode int, start time.Time, err error)
cmd/root.go:438
↓ 5 callersFunctioninitConfig
(source string)
cmd/root.go:132
↓ 5 callersFunctioninitDiagnostics
()
cmd/root.go:197
↓ 5 callersMethodoverlaps
overlaps returns true if two startEnds overlap
detect/codec/start_end.go:31
↓ 4 callersMethodPrintRequiredFindings
()
report/finding.go:102
↓ 4 callersFunctioncompare
(t *testing.T, a, b []report.Finding)
detect/detect_test.go:100
↓ 4 callersFunctionmoveDotGit
(t *testing.T, from, to string)
detect/detect_test.go:2432
↓ 4 callersFunctionmustGetIntFlag
(cmd *cobra.Command, name string)
cmd/root.go:534
↓ 3 callersMethodAddFinding
AddFinding synchronously adds a finding to the findings slice
detect/detect.go:711
↓ 3 callersMethodDetectGit
DetectGit runs detections against a GitCmd with its remote info Deprecated: Use sources.Git and detector.DetectSource instead
detect/git.go:19
↓ 3 callersMethodDetectString
DetectString scans the given string and returns a list of findings
detect/detect.go:201
↓ 3 callersFunctionNewDetectorContext
NewDetectorContext is the same as NewDetector but supports passing in a context to use for timeouts
detect/detect.go:121
↓ 3 callersFunctionNewGitDiffCmdContext
NewGitDiffCmdContext is the same as NewGitDiffCmd but supports passing in a context to use for timeouts
sources/git.go:136
↓ 3 callersFunctionNewGitLogCmdContext
NewGitLogCmdContext is the same as NewGitLogCmd but supports passing in a context to use for timeouts
sources/git.go:71
↓ 3 callersFunctionNewRemoteInfoContext
NewRemoteInfoContext is the same as NewRemoteInfo but supports passing in a context to use for timeouts
sources/git.go:440
↓ 3 callersFunctionNewTemplateReporter
(templatePath string)
report/template.go:19
↓ 3 callersMethodRedact
Redact removes sensitive information from a finding.
report/finding.go:78
↓ 3 callersMethodWrite
(w io.WriteCloser, findings []Finding)
report/report.go:15
↓ 3 callersFunctioncreateScmLink
(remote *sources.RemoteInfo, finding report.Finding)
detect/utils.go:23
↓ 3 callersFunctionfileExists
(fileName string)
cmd/root.go:502
↓ 3 callersMethodmerge
merge takes two start/ends and returns a single one that encompasses both
detect/codec/start_end.go:47
↓ 3 callersFunctionprintFinding
(f report.Finding, noColor bool)
detect/utils.go:168
↓ 3 callersFunctionshouldSkipPath
shouldSkipPath checks a path against all the allowlists to see if it can be skipped
sources/common.go:38
↓ 3 callersFunctiontestTranslate
(t *testing.T, test translateCase)
config/config_test.go:579
↓ 2 callersFunctionAlphaNumericExtendedLong
(size string)
cmd/generate/config/utils/patterns.go:31
↓ 2 callersMethodContainsStopWord
(s string)
config/allowlist.go:161
↓ 2 callersMethodDecode
Decode returns the data with the values decoded in place along with the encoded segment meta data for the next pass of decoding
detect/codec/decoder.go:23
↓ 2 callersMethodDetectContext
DetectContext is the same as Detect but supports passing in a context to use for timeouts
detect/detect.go:276
↓ 2 callersMethodDetectFiles
DetectFiles runs detections against a chanel of scan targets Deprecated: Use sources.Files and Detector.DetectSource instead
detect/files.go:17
↓ 2 callersFunctionDirectoryTargets
Deprecated: Use Files and detector.DetectSource instead
sources/files.go:23
↓ 2 callersFunctionFormatDuration
(d time.Duration)
cmd/root.go:517
↓ 2 callersFunctionIsNew
(finding report.Finding, redact uint, baseline []report.Finding)
detect/baseline.go:12
↓ 2 callersFunctionLoadBaseline
(baselinePath string)
detect/baseline.go:37
↓ 2 callersMethodNewBlobReaderContext
NewBlobReaderContext is the same as NewBlobReader but supports passing in a context to use for timeouts
sources/git.go:207
↓ 2 callersFunctionNewDecoder
NewDecoder creates a default decoder struct
detect/codec/decoder.go:15
↓ 2 callersFunctionNewRemoteInfo
Deprecated: use sources.NewRemoteInfo instead
detect/git.go:33
↓ 2 callersFunctionPlatformFromString
(s string)
cmd/scm/scm.go:33
↓ 2 callersMethodRead
(p []byte)
detect/reader_test.go:25
↓ 2 callersMethodWrite
(w io.WriteCloser, findings []Finding)
report/json.go:13
↓ 2 callersFunctionabs
abs returns the absolute value of an integer
detect/detect.go:703
↓ 2 callersMethodadd
add adds the values of two startEnds
detect/codec/start_end.go:23
↓ 2 callersMethodaddCommit
AddCommit synchronously adds a commit to the commit slice
detect/detect.go:757
↓ 2 callersFunctionallTrue
(bools []bool)
detect/detect.go:893
↓ 2 callersFunctionanyRegexMatch
(f string, res []*regexp.Regexp)
config/utils.go:9
↓ 2 callersFunctioncheckCommitOrPathAllowed
checkCommitOrPathAllowed evaluates |fragment| against all provided |allowlists|. If the match condition is "OR", only commit and path are checked. Ot
detect/detect.go:767
↓ 2 callersFunctioncheckFindingAllowed
checkFindingAllowed evaluates |finding| against all provided |allowlists|. If the match condition is "OR", only regex and stopwords are run. (Commit
detect/detect.go:823
↓ 2 callersFunctioncreateSingleRuleDetector
(r *config.Rule)
cmd/generate/config/utils/validate.go:69
↓ 2 callersFunctiondecodeIndividualEscapes
decodeIndividualEscapes decodes individual Unicode escape sequences (\u1234 format) This is a fallback for when we don't have a continuous sequence of
detect/codec/unicode.go:225
↓ 2 callersMethodextend
(extensionConfig Config)
config/config.go:420
↓ 2 callersMethodfileFragments
fileFragments reads the file into fragments to yield
sources/file.go:167
↓ 2 callersFunctiongetMessage
(f Finding)
report/junit.go:71
↓ 2 callersFunctionhasByte
hasByte can be used to check if a string has at least one of the provided bytes. Note: make sure byteset is long enough to handle the largest byte in
detect/codec/ascii.go:27
↓ 2 callersFunctionisPrintableASCII
isPrintableASCII returns true if all bytes are printable ASCII
detect/codec/ascii.go:14
next →1–100 of 501, ranked by callers