feature/GPT #12
@ -2,6 +2,7 @@ import re
|
|||||||
from typing import Dict, List, Tuple
|
from typing import Dict, List, Tuple
|
||||||
from .utils import remove_comments
|
from .utils import remove_comments
|
||||||
|
|
||||||
|
|
||||||
def find_dangerous_functions(
|
def find_dangerous_functions(
|
||||||
file_content: str, file_extension: str
|
file_content: str, file_extension: str
|
||||||
) -> Dict[str, List[Tuple[int, str]]]:
|
) -> Dict[str, List[Tuple[int, str]]]:
|
||||||
@ -34,4 +35,5 @@ def find_dangerous_functions(
|
|||||||
for pattern, risk_level in risk_patterns.items():
|
for pattern, risk_level in risk_patterns.items():
|
||||||
if re.search(pattern, clean_line):
|
if re.search(pattern, clean_line):
|
||||||
classified_results[risk_level].append((line_number, clean_line))
|
classified_results[risk_level].append((line_number, clean_line))
|
||||||
return classified_results
|
return classified_results
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user