Skip to content

Commit

Permalink
Update algorithm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mtcolman authored Dec 13, 2023
1 parent 55e0b8e commit f234412
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cbom/parser/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ def parse_algorithm(cbom, codeql_result):


def _generate_crypto_component(codeql_result):
algorithm = utils.get_algorithm(utils.extract_precise_snippet(codeql_result['locations'][0]['physicalLocation']['contextRegion']['snippet']['text'], codeql_result['locations'][0]['physicalLocation']['region']))

code_snippet = codeql_result['locations'][0]['physicalLocation']['contextRegion']['snippet']['text']
algorithm = utils.get_algorithm(utils.extract_precise_snippet(code_snippet, codeql_result['locations'][0]['physicalLocation']['region']))

if algorithm.lower() == 'fernet':
algorithm, key_size, mode = 'AES', '128', Mode.CBC
Expand Down

0 comments on commit f234412

Please sign in to comment.