Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/apuigsech/seekret
/ functions
Functions
70 in github.com/apuigsech/seekret
⨍
Functions
70
◇
Types & classes
22
↓ 5 callers
Method
Run
Run executes the rule into a content to find all lines that matches it.
models/rule.go:77
↓ 4 callers
Function
NewRule
NewRule creates a new rule.
models/rule.go:37
↓ 3 callers
Method
AddUnmatch
AddUnmatch adds a refular expression into the unmatch list.
models/rule.go:65
↓ 3 callers
Method
LoadObjects
(source string, opt LoadOptions)
source.go:15
↓ 3 callers
Function
NewObject
NewObject creates a new object.
models/object.go:46
↓ 2 callers
Method
AddRule
AddRule adds a new rule into the context.
seekret.go:41
↓ 2 callers
Method
GetMetadata
SetMetadata gets a metadata value from the object.
models/object.go:81
↓ 2 callers
Function
NewException
NewException creates a new exception.
models/exception.go:32
↓ 2 callers
Method
SetContent
SetContent sets the regular expresion that should match the content of the object.
models/exception.go:68
↓ 2 callers
Method
SetMetadata
SetMetadata sets a metadata value for the object.
models/object.go:64
↓ 2 callers
Method
SetNline
SetNline sets the number of line where secret should be found.
models/exception.go:61
↓ 2 callers
Method
SetObject
SetObject sets the regular expresion that should match the name of the object.
models/exception.go:51
↓ 2 callers
Method
SetRule
SetRule sets the regular expresion that should match the name of the rule.
models/exception.go:40
↓ 2 callers
Function
formatOutputHuman
(secretList []models.Secret)
cmd/seekret/format.go:32
↓ 2 callers
Function
formatOutputJSON
TODO: Implement
cmd/seekret/format.go:41
↓ 2 callers
Function
intPtr
(i int)
models/exception_test.go:209
↓ 2 callers
Function
setRuleEnabled
(ruleList []models.Rule, name string, enabled bool)
seekret.go:174
↓ 2 callers
Function
setRuleEnabledByRegexp
(ruleList []models.Rule, nameRegexp string, enabled bool)
seekret.go:190
↓ 1 callers
Method
AddException
AddException adds a new exception into the context.
seekret.go:239
↓ 1 callers
Function
DefaultRulesPath
DefaultRulesPath return the default PATH that contains rules.
seekret.go:140
↓ 1 callers
Method
Enable
Enable marks the rule as enabled.
models/rule.go:55
↓ 1 callers
Function
FormatOutput
(secretList []models.Secret, format string)
cmd/seekret/format.go:13
↓ 1 callers
Method
GetPrimaryKeyHash
GetPrimaryKeyHash returns the primary key hash of the object. This hash is calculated by using the information of all metadata marked as primary key.
models/object.go:101
↓ 1 callers
Function
GroupObjectsByMetadata
(objects []Object, k string)
models/object.go:135
↓ 1 callers
Function
GroupObjectsByPrimaryKeyHash
(objects []Object)
models/object.go:156
↓ 1 callers
Method
GroupObjectsByPrimaryKeyHash
GroupObjectsByPrimaryKeyHash returns a map with all objects grouped by the primary key hash, that is calculated from all metadata keys with the primar
seekret.go:227
↓ 1 callers
Method
Inspect
Inspect executes the inspection into all loaded objects, by checking all rules and exceptions loaded.
inspect.go:27
↓ 1 callers
Method
ListSecrets
ListSecrets return an array with all found secrets after the inspection.
seekret.go:300
↓ 1 callers
Method
LoadExceptionsFromFile
LoadExceptionsFromFile loads exceptions from a YAML file.
seekret.go:244
↓ 1 callers
Function
LoadKnownFromFile
(s *seekret.Seekret, file string)
cmd/seekret/known.go:16
↓ 1 callers
Method
LoadRulesFromDir
LoadRulesFromFile loads rules from all YAML files inside a directory.
seekret.go:95
↓ 1 callers
Method
LoadRulesFromFile
LoadRulesFromFile loads rules from a YAML file.
seekret.go:55
↓ 1 callers
Method
LoadRulesFromPath
LoadRulesFromFile loads rules from all YAML files inside different directories separated by ':'.
seekret.go:123
↓ 1 callers
Function
NewSecret
NewSecret creates a new secret.
models/secret.go:27
↓ 1 callers
Function
NewSeekret
NewSeekret returns a new seekret context.
seekret.go:35
↓ 1 callers
Method
SetException
SetException specifies that a found secret is an exception (of false positive).
models/secret.go:38
↓ 1 callers
Function
exceptionCheck
(exceptionList []models.Exception, secret models.Secret)
inspect.go:97
↓ 1 callers
Function
formatOutputCSV
(secretList []models.Secret)
cmd/seekret/format.go:49
↓ 1 callers
Function
inspect_worker
(id int, jobs <-chan workerJob, results chan<- workerResult)
inspect.go:54
↓ 1 callers
Function
testMetadataSample
(ts MetadataSample)
models/object_test.go:107
↓ 1 callers
Function
testNewExceptionSample
(ts NewExceptionSample)
models/exception_test.go:46
↓ 1 callers
Function
testNewObjectSample
(ts NewObjectSample)
models/object_test.go:61
↓ 1 callers
Function
testNewRuleSample
(ts NewRuleSample)
models/rule_test.go:60
↓ 1 callers
Function
testPrimaryKeyHashSample
(ts PrimaryKeyHashSample)
models/object_test.go:201
↓ 1 callers
Function
testRunExceptionSample
(ts RunExceptionSample)
models/exception_test.go:199
↓ 1 callers
Function
testRunRuleSample
(ts RunRuleSample)
models/rule_test.go:150
↓ 1 callers
Method
updatePrimaryKeyHash
()
models/object.go:105
Method
Disable
Enable marks the rule as disabled.
models/rule.go:60
Method
DisableRule
DisableRule disables specific rule.
seekret.go:159
Method
DisableRuleByRegexp
DisableRule disables rules that match with a regular expression.
seekret.go:169
Method
EnableRule
EnableRule enables specific rule.
seekret.go:154
Method
EnableRuleByRegexp
EnableRule enables rules that match with a regular expression.
seekret.go:164
Method
GetMetadataAll
GetMetadataAll gets a map that contains all metadata of the object.
models/object.go:91
Method
GroupObjectsByMetadata
GroupObjectsByMetadata returns a map with all objects grouped by specific metadata key.
seekret.go:219
Method
ListRules
ListRules return an array with all loaded rules.
seekret.go:149
Method
LoadObjects
LoadObjects loads objects form an specific source. It can load objects from different source types, that are implemented following the SourceType inte
seekret.go:208
Method
Run
Run executes the exception into a secret to determine if it's an exception or not.
models/exception.go:79
Function
TestMetadata
(t *testing.T)
models/object_test.go:81
Function
TestNewException
(t *testing.T)
models/exception_test.go:21
Function
TestNewObject
(t *testing.T)
models/object_test.go:23
Function
TestNewRule
(t *testing.T)
models/rule_test.go:19
Function
TestPrimaryKeyHash
(t *testing.T)
models/object_test.go:128
Function
TestRunException
(t *testing.T)
models/exception_test.go:84
Function
TestRunRule
(t *testing.T)
models/rule_test.go:93
Function
formatOutputXML
(secretList []models.Secret)
cmd/seekret/format.go:45
Function
main
()
cmd/seekret/main.go:23
Function
seekretAfter
(c *cli.Context)
cmd/seekret/main.go:204
Function
seekretBefore
(c *cli.Context)
cmd/seekret/main.go:121
Function
seekretDir
(c *cli.Context)
cmd/seekret/main.go:141
Function
seekretGit
(c *cli.Context)
cmd/seekret/main.go:161