Skip to content

Commit

Permalink
extend FB access token discovery (#1407)
Browse files Browse the repository at this point in the history
* extend FB access token discovery

* validate config

* set upper 40

* set upper 40
  • Loading branch information
shahar4200 committed May 31, 2024
1 parent 79cac73 commit 39947b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/generate/config/rules/facebook.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func FacebookAccessToken() *config.Rule {
r := config.Rule{
Description: "Discovered a Facebook Access Token, posing a risk of unauthorized access to Facebook accounts and personal data exposure.",
RuleID: "facebook-access-token",
Regex: generateUniqueTokenRegex(`\d{15,16}\|[0-9a-z\-_]{27}`, true),
Regex: generateUniqueTokenRegex(`\d{15,16}(\||%)[0-9a-z\-_]{27,40}`, true),
}

// validate
Expand Down
2 changes: 1 addition & 1 deletion config/gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ keywords = [
[[rules]]
id = "facebook-access-token"
description = "Discovered a Facebook Access Token, posing a risk of unauthorized access to Facebook accounts and personal data exposure."
regex = '''(?i)\b(\d{15,16}\|[0-9a-z\-_]{27})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
regex = '''(?i)\b(\d{15,16}(\||%)[0-9a-z\-_]{27,40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''

[[rules]]
id = "facebook-page-access-token"
Expand Down

0 comments on commit 39947b0

Please sign in to comment.