Skip to content

Commit

Permalink
coorect spelling mistake for github finegrained token (daxa-ai#589)
Browse files Browse the repository at this point in the history
* coorect spelling mistake for github finegrained token

* spelling mistake backword compatibility
  • Loading branch information
gr8nishan authored Oct 28, 2024
1 parent 79f1f9c commit efcc3fb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pebblo/app/pebblo-ui/src/constants/keywordMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const KEYWORD_MAPPING = {
"iban-code": "IBAN code",
"us-itin": "US ITIN",
"github-token": "Github Token",
"github-finergrained-token": "Github Finergrained Token",
"github-finegrained-token": "Github Finegrained Token",
"github-finergrained-token": "Github Finegrained Token",
"private-key": "Private Key",
"dsa-private-key": "DSA Private Key",
"encrypted-private-key": "Encrypted Private Key",
Expand Down
4 changes: 2 additions & 2 deletions pebblo/entity_classifier/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

secret_entities_context_mapping = {
"github-token": ["github", "github_token", "git"],
"github-finergrained-token": ["github", "github_token", "git"],
"github-finegrained-token": ["github", "github_token", "git"],
"slack-token": ["slack", "slack token", "slack_token"],
"aws-access-key": ["aws_access_key", "aws_key", "access", "id", "api"],
"aws-secret-key": ["aws_secret_key", "secret"],
Expand Down Expand Up @@ -49,7 +49,7 @@ class SecretEntities(Enum):
AZURE_KEY_ID = "azure-key-id"
AZURE_CLIENT_SECRET = "azure-client-secret"
GOOGLE_API_KEY = "google-api-key"
GITHUB_FINEGRAINED_TOKEN = "github-finergrained-token"
GITHUB_FINEGRAINED_TOKEN = "github-finegrained-token"


class PIIGroups(Enum):
Expand Down
2 changes: 1 addition & 1 deletion pebblo/entity_classifier/utils/regex_pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

regex_secrets_patterns = {
"github-token": r"""\b((?:ghp|gho|ghu|ghs|ghr)_[a-zA-Z0-9]{36,255})\b""",
"github-finergrained-token": r"""\b((?:github_pat)_[a-zA-Z0-9_]{36,255})\b""",
"github-finegrained-token": r"""\b((?:github_pat)_[a-zA-Z0-9_]{36,255})\b""",
"slack-token": r"""(xoxb|xoxp|xapp|xoxa|xoxr|xoxo|xoxs|xoxe)\-[0-9]{10,13}\-[a-zA-Z0-9\-]*""",
# "Slack Token V2": r"""xox[baprs]-([0-9a-zA-Z]{10,48})?""",
"aws-access-key": r"""\b((?:AKIA|ABIA|ACCA|ASIA)[0-9A-Z]{16})\b""",
Expand Down
3 changes: 2 additions & 1 deletion pebblo/reports/enums/keyword_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"iban-code": "IBAN code",
"us-itin": "US ITIN",
"github-token": "Github Token",
"github-finergrained-token": "Github Finergrained Token",
"github-finegrained-token": "Github Finegrained Token",
"github-finergrained-token": "Github Finegrained Token",
"private-key": "Private Key",
"dsa-private-key": "DSA Private Key",
"encrypted-private-key": "Encrypted Private Key",
Expand Down

0 comments on commit efcc3fb

Please sign in to comment.