feat(shub): add Security Hub integration (#1255)

This commit is contained in:
Sergio Garcia
2022-07-21 12:22:56 +02:00
committed by GitHub
parent 67834c3f8b
commit 7d0a95e98f
10 changed files with 171 additions and 16 deletions

View File

@@ -1,5 +1,6 @@
import json
import sys
from hashlib import sha512
from io import TextIOWrapper
from os.path import exists
from typing import Any
@@ -40,3 +41,8 @@ def file_exists(filename: str):
return True
else:
return False
# create sha512 hash for string
def hash_sha512(string: str) -> str:
return sha512(string.encode("utf-8")).hexdigest()[0:9]