Skip to content

Commit

Permalink
resolve_code_scan_exponential_backtracking (#1728)
Browse files Browse the repository at this point in the history
Signed-off-by: DerekRushton <[email protected]>
  • Loading branch information
DerekRushton authored Aug 27, 2024
1 parent 67ca4e5 commit 5acc8e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stix_shifter_modules/okta/stix_transmission/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class InvalidMetadataException(Exception):

class Connector(BaseJsonSyncConnector):
OKTA_MAX_PAGE_SIZE = 1000
DOMAIN_PATTERN = re.compile(r'^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(\.)?)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$')
DOMAIN_PATTERN = re.compile(r'^(?:(?:[a-z0-9]\.)|(?:[a-z0-9][a-z0-9-]{0,61}[a-z0-9]\.))+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$')

def __init__(self, connection, configuration):
self.api_client = APIClient(connection, configuration)
Expand Down
3 changes: 1 addition & 2 deletions stix_shifter_modules/vectra/stix_translation/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ def transform(obj):
try:
if obj and isinstance(obj, list):
ip_pattern = re.compile(r'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})')
domain_pattern = re.compile(r'^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(\.)?)+[a-z0-9][a-z0-9-]{0,'
r'61}[a-z0-9]$')
domain_pattern = re.compile(r'^(?:(?:[a-z0-9]\.)|(?:[a-z0-9][a-z0-9-]{0,61}[a-z0-9]\.))+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$')
for index, row in enumerate(obj):
if domain_pattern.search(row):
continue
Expand Down

0 comments on commit 5acc8e9

Please sign in to comment.