Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/gitleaks/gitleaks
/ functions
Functions
501 in github.com/gitleaks/gitleaks
⨍
Functions
501
◇
Types & classes
65
↓ 1 callers
Function
shannonEntropy
shannonEntropy calculates the entropy of data using the formula defined here: https://en.wiktionary.org/wiki/Shannon_entropy Another way to think abou
detect/utils.go:117
↓ 1 callers
Method
sub
sub subtracts the values of two startEnds
detect/codec/start_end.go:15
↓ 1 callers
Function
validateMinVersion
(minVer string, configPath string)
config/config.go:283
↓ 1 callers
Method
withinProximity
(primary, required report.Finding, requiredRule *config.Required)
detect/detect.go:675
Function
BenchmarkCommitAllowed
(b *testing.B)
config/allowlist_test.go:269
Function
BenchmarkCommitNotAllowed
(b *testing.B)
config/allowlist_test.go:276
Function
BenchmarkConfigAllowlistPaths
(b *testing.B)
cmd/generate/config/base/config_test.go:185
Function
BenchmarkConfigAllowlistRegexes
(b *testing.B)
cmd/generate/config/base/config_test.go:100
Function
BenchmarkPathAllowed
(b *testing.B)
config/allowlist_test.go:368
Function
BenchmarkPathNotAllowed
(b *testing.B)
config/allowlist_test.go:375
Function
BenchmarkRegexAllowed
(b *testing.B)
config/allowlist_test.go:318
Function
BenchmarkRegexNotAllowed
(b *testing.B)
config/allowlist_test.go:327
Method
DetectBytes
DetectBytes scans the given bytes and returns a list of findings
detect/detect.go:196
Function
Err
(err error)
logging/log.go:40
Method
Fragments
Fragments yields fragments from files discovered under the path
sources/files.go:142
Method
Fragments
Fragments yields fragments from a git repo
sources/git.go:299
Function
GCPServiceAccount
TODO this one could probably use some work
cmd/generate/config/rules/gcp.go:11
Function
MustCompile
(str string)
regexp/stdlib_regex.go:13
Method
NewBlobReader
NewBlobReader returns an io.ReadCloser that can be used to read a blob within the git repo used to create the GitCmd. The caller is responsible for c
sources/git.go:201
Function
Panic
()
logging/log.go:48
Function
PrintHello
()
testdata/repos/small/api/api.go:5
Function
PrintHello
()
testdata/repos/staged/api/api.go:5
Function
SquareSecret
()
cmd/generate/config/rules/square.go:31
Method
String
()
detect/codec/encodings.go:66
Function
TestCommitAllowed
(t *testing.T)
config/allowlist_test.go:14
Function
TestConfigAllowlistPaths
(t *testing.T)
cmd/generate/config/base/config_test.go:161
Function
TestConfigAllowlistRegexes
(t *testing.T)
cmd/generate/config/base/config_test.go:76
Function
TestDecode
(t *testing.T)
detect/codec/decoder_test.go:11
Function
TestDetect
(t *testing.T)
detect/detect_test.go:132
Function
TestDetectReader
TestDetectReader tests the DetectReader function.
detect/reader_test.go:42
Function
TestDetectRuleAllowlist
(t *testing.T)
detect/detect_test.go:2186
Function
TestDetectWithArchives
(t *testing.T)
detect/detect_test.go:1529
Function
TestDetectWithSymlinks
(t *testing.T)
detect/detect_test.go:2127
Function
TestExtendedRuleKeywordsAreDowncase
(t *testing.T)
config/config_test.go:632
Function
TestFileLoadBaseline
(t *testing.T)
detect/baseline_test.go:156
Function
TestFromFiles
TestFromFiles tests the FromFiles function
detect/detect_test.go:1400
Function
TestFromGit
TestFromGit tests the FromGit function
detect/detect_test.go:850
Function
TestFromGitStaged
(t *testing.T)
detect/detect_test.go:1328
Function
TestGenerateSemiGenericRegex
(t *testing.T)
cmd/generate/config/utils/generate_test.go:7
Function
TestGenerateUniqueTokenRegex
(t *testing.T)
cmd/generate/config/utils/generate_test.go:165
Function
TestGetLocation
TestGetLocation tests the getLocation function.
detect/location_test.go:10
Function
TestIgnoreIssuesInBaseline
(t *testing.T)
detect/baseline_test.go:182
Function
TestIsNew
(t *testing.T)
detect/baseline_test.go:13
Function
TestMask
(t *testing.T)
report/finding_test.go:32
Function
TestMaskSecret
(t *testing.T)
report/finding_test.go:66
Function
TestNormalizeGitleaksIgnorePaths
region Windows-specific tests[]
detect/detect_test.go:2461
Function
TestPathAllowed
(t *testing.T)
config/allowlist_test.go:74
Function
TestRedact
(t *testing.T)
report/finding_test.go:9
Function
TestRegexAllowed
(t *testing.T)
config/allowlist_test.go:48
Function
TestStreamDetectReader
(t *testing.T)
detect/reader_test.go:78
Function
TestTemplateDangerousFunctions
(t *testing.T)
report/template_test.go:100
Function
TestTranslate
(t *testing.T)
config/config_test.go:36
Function
TestTranslateAllowlists
(t *testing.T)
config/config_test.go:116
Function
TestTranslateExtend
(t *testing.T)
config/config_test.go:326
Function
TestValidate
(t *testing.T)
config/allowlist_test.go:100
Function
TestWindowsFileSeparator_RuleAllowlistPaths
(t *testing.T)
detect/detect_test.go:2591
Function
TestWindowsFileSeparator_RulePath
(t *testing.T)
detect/detect_test.go:2477
Function
TestWriteCSV
(t *testing.T)
report/csv_test.go:12
Function
TestWriteJSON
(t *testing.T)
report/json_test.go:31
Function
TestWriteJunit
(t *testing.T)
report/junit_test.go:12
Function
TestWriteSarif
(t *testing.T)
report/sarif_test.go:14
Function
TestWriteStdout
(t *testing.T)
report/report_test.go:15
Function
TestWriteTemplate
(t *testing.T)
report/template_test.go:12
Function
Test_createScmLink
(t *testing.T)
detect/utils_test.go:13
Function
Test_readUntilSafeBoundary
(t *testing.T)
sources/common_test.go:13
Function
TrelloAccessToken
()
cmd/generate/config/rules/trello.go:9
Function
decodeBase64
decodeBase64 decodes base64 encoded printable ASCII characters
detect/codec/base64.go:20
Function
decodeHex
decodeHex decodes hex data
detect/codec/hex.go:35
Function
decodePercent
decodePercent decodes percent encoded strings
detect/codec/percent.go:4
Function
decodeUnicode
decodeUnicode decodes Unicode escape sequences in the given string
detect/codec/unicode.go:30
Method
extendURL
()
config/config.go:416
Function
init
()
logging/log.go:11
Function
init
()
sources/common.go:20
Function
init
()
cmd/stdin.go:13
Function
init
()
cmd/detect.go:33
Function
init
()
cmd/git.go:14
Function
init
()
cmd/protect.go:15
Function
init
()
cmd/directory.go:12
Function
init
()
cmd/root.go:73
Function
init
()
cmd/version.go:10
Function
init
()
detect/codec/encodings.go:105
Function
init
()
detect/codec/ascii.go:5
Function
init
()
detect/codec/base64.go:13
Function
init
()
detect/codec/hex.go:28
Function
initLog
()
cmd/root.go:107
Function
main
()
main.go:11
Function
main
()
testdata/archives/files/api.go:5
Function
main
()
testdata/archives/files/main.go:5
Function
main
()
testdata/repos/nogit/api.go:5
Function
main
()
testdata/repos/nogit/main.go:5
Function
main
()
testdata/repos/small/main.go:8
Function
main
()
testdata/repos/small/api/ignoreGlobal.go:5
Function
main
()
testdata/repos/small/api/ignoreCommit.go:5
Function
main
()
testdata/repos/staged/main.go:8
Function
main
go:generate go run $GOFILE ../../../config/gitleaks.toml
cmd/generate/config/main.go:20
Function
runDetect
(cmd *cobra.Command, args []string)
cmd/detect.go:50
Function
runDirectory
(cmd *cobra.Command, args []string)
cmd/directory.go:24
Function
runGit
(cmd *cobra.Command, args []string)
cmd/git.go:29
Function
runProtect
(cmd *cobra.Command, args []string)
cmd/protect.go:29
Function
runStdIn
(cmd *cobra.Command, _ []string)
cmd/stdin.go:23
← previous
next →
401–500 of 501, ranked by callers