Skip to content

Commit 493c511

Browse files
authored
Merge branch 'main' into gha-fix
2 parents a87ec21 + e75313c commit 493c511

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3070
-2641
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,9 @@ func init() {
275275

276276
cli.Version("trufflehog " + version.BuildVersion)
277277

278-
// Support -h for help
278+
// Support -h for help and write it to stdout.
279279
cli.HelpFlag.Short('h')
280+
cli.UsageWriter(os.Stdout)
280281

281282
// Check if the TUI environment variable is set.
282283
if ok, err := strconv.ParseBool(os.Getenv("TUI_PARENT")); err == nil {

pkg/analyzer/analyzers/asana/asana.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func secretInfoToAnalyzerResult(info *SecretInfo) *analyzers.AnalyzerResult {
4646

4747
result := analyzers.AnalyzerResult{}
4848

49-
// resoures/permission setup
49+
// resources/permission setup
5050
permissions := allPermissions()
5151
userResource := analyzers.Resource{
5252
Name: info.Data.Name,

pkg/analyzer/analyzers/huggingface/huggingface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ func AnalyzePermissions(cfg *config.Config, key string) (*SecretInfo, error) {
416416
}, nil
417417
}
418418

419-
// AnalyzePermissions prints the permissions of a HuggingFace API key
419+
// AnalyzeAndPrintPermissions prints the permissions of a HuggingFace API key
420420
func AnalyzeAndPrintPermissions(cfg *config.Config, key string) {
421421
info, err := AnalyzePermissions(cfg, key)
422422
if err != nil {

pkg/analyzer/analyzers/launchdarkly/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ type Resource struct {
7878
MetaData map[string]string
7979
}
8080

81-
// appendResources append resource to secret info resources list
81+
// appendResource append resource to secret info resources list
8282
func (s *SecretInfo) appendResource(resource Resource) {
8383
s.mu.Lock()
8484
defer s.mu.Unlock()

pkg/analyzer/analyzers/posthog/posthog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ func AnalyzeAndPrintPermissions(cfg *config.Config, key string) {
269269
}
270270

271271
if info.organization == nil {
272-
color.Yellow("\n[i] No permissions were verified for this key because the key does not have one of the necessary permissions (user:read or organization:read) required to verifiy other permissions.")
272+
color.Yellow("\n[i] No permissions were verified for this key because the key does not have one of the necessary permissions (user:read or organization:read) required to verify other permissions.")
273273
}
274274

275275
if info.orgPermissions != nil {

pkg/custom_detectors/CUSTOM_DETECTORS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# TruffleHog Custom Detector Setup Guide
22

3-
This guide will walk you through setting up a custom detector in TruffleHog to identify specific patterns unique to your project.
3+
This guide will walk you through setting up a custom detector in TruffleHog to identify specific patterns unique to your project. For users of Trufflehog Enterprise, this guide applies to that environment as well.
44

55
## Steps to Set Up a Custom Detector
66

@@ -40,9 +40,9 @@ This guide will walk you through setting up a custom detector in TruffleHog to i
4040
**Other allowed parameters:**
4141
- **`primary_regex_name`**: This parameter allows you designate the primary regex pattern when multiple regex patterns are defined in the regex section. If a match is found, the match for the designated primary regex will be used to determine the line number. The value must be one of the names specified in the regex section.
4242
- **`exclude_regexes_capture`**: This parameter allows you to define regex patterns to exclude specific parts of a detected secret. If a match is found within the detected secret, the portion matching this regex is excluded from the result.
43-
- **`exclude_regexes_match`**: This parameter enables you to define regex patterns to exclude entire matches from being reported as secrets.
43+
- **`exclude_regexes_match`**: This parameter enables you to define regex patterns to exclude entire matches from being reported as secrets. This applies to the entire matched string, not just the token.
4444
- **`entropy`**: This parameter is used to assess the randomness of detected strings. High entropy often indicates that a string is a potential secret, such as an API key or password, due to its complexity and unpredictability. It helps in filtering false-positives. While an entropy threshold of `3` can be a starting point, it's essential to adjust this value based on your project's specific requirements and the nature of the data you have.
45-
- **`exclude_words`**: This parameter allows you to specify a list of words that, if present in a detected string, will cause TruffleHog to ignore that string.
45+
- **`exclude_words`**: This parameter allows you to specify a list of words that, if present in a detected string, will cause TruffleHog to ignore that string. This is a substring match and does not enforce word boundaries. It applies only to the token.
4646

4747
[Here](/examples/generic_with_filters.yml) is an example of a custom detector using these parameters.
4848

@@ -207,4 +207,4 @@ func main() {
207207
log.Fatalf("Server failed: %s", err)
208208
}
209209
}
210-
```
210+
```

pkg/detectors/airtableapikey/airtableapikey.go

Lines changed: 0 additions & 160 deletions
This file was deleted.

pkg/detectors/airtableapikey/airtableapikey_integration_test.go

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)