From efcc3fbdfe4fd4619aea93d5b3a09e5f4c764715 Mon Sep 17 00:00:00 2001 From: Nishan Jain <37294591+gr8nishan@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:59:54 +0530 Subject: [PATCH] coorect spelling mistake for github finegrained token (#589) * coorect spelling mistake for github finegrained token * spelling mistake backword compatibility --- pebblo/app/pebblo-ui/src/constants/keywordMapping.js | 3 ++- pebblo/entity_classifier/utils/config.py | 4 ++-- pebblo/entity_classifier/utils/regex_pattern.py | 2 +- pebblo/reports/enums/keyword_mapping.py | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pebblo/app/pebblo-ui/src/constants/keywordMapping.js b/pebblo/app/pebblo-ui/src/constants/keywordMapping.js index fd7f8e11..dd55b3db 100644 --- a/pebblo/app/pebblo-ui/src/constants/keywordMapping.js +++ b/pebblo/app/pebblo-ui/src/constants/keywordMapping.js @@ -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", diff --git a/pebblo/entity_classifier/utils/config.py b/pebblo/entity_classifier/utils/config.py index 6956d6cc..df11e691 100644 --- a/pebblo/entity_classifier/utils/config.py +++ b/pebblo/entity_classifier/utils/config.py @@ -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"], @@ -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): diff --git a/pebblo/entity_classifier/utils/regex_pattern.py b/pebblo/entity_classifier/utils/regex_pattern.py index 51ecbf63..9a760095 100644 --- a/pebblo/entity_classifier/utils/regex_pattern.py +++ b/pebblo/entity_classifier/utils/regex_pattern.py @@ -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""", diff --git a/pebblo/reports/enums/keyword_mapping.py b/pebblo/reports/enums/keyword_mapping.py index 2241f835..3e72a5d6 100644 --- a/pebblo/reports/enums/keyword_mapping.py +++ b/pebblo/reports/enums/keyword_mapping.py @@ -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",