Skip to content

Commit

Permalink
Asure Storage Key update context text to valid line analyzing (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
anatolii-paloaltonetworks authored Apr 12, 2024
1 parent 92d998f commit 94eed45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detect_secrets/plugins/azure_storage_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def analyze_context_keys(
context: Optional[CodeSnippet],
line: str,
) -> List[PotentialSecret]:
context_text = ''.join(context.lines) if context else line
context_text = '\n'.join(context.lines).replace('\n\n', '\n') if context else line
return [result for result in results if self.context_keys_exists(result, context_text)]

def context_keys_exists(self, result: PotentialSecret, string: str) -> bool:
Expand Down

0 comments on commit 94eed45

Please sign in to comment.