Cleaned up Generate Unexclueded Function to keep its files in check
This commit is contained in:
@@ -354,25 +354,7 @@ def sendToPolicyTest(url, first_policy, second_policy, destination_name, destina
|
||||
allowlist_childhashlist = allowbyhash[allowbyhash['reputation_status'] == 'UNKNOWN']['sha256'].unique().tolist()
|
||||
addHash(url, allowlist_child_id, allowlist_childhashlist)
|
||||
|
||||
def getMetaRules(url,appid):
|
||||
endpoint = url + '/v1/application/export'
|
||||
payload = {
|
||||
"applicationid" : {appid}
|
||||
}
|
||||
headers = {
|
||||
"X-APIKey": os.getenv('APIKEY')
|
||||
}
|
||||
response = requests.request("POST", endpoint, headers=headers, data=payload, verify=False)
|
||||
parse_text = json.loads(response.text)
|
||||
policiesnames = []
|
||||
policyids = []
|
||||
for index, list in enumerate(parse_text['response']['groups'], start=1):
|
||||
print(ct.colorText(f"{index}. {list['name']}", "yellow"))
|
||||
policiesnames.append(list['name'])
|
||||
policyids.append(list['groupid'])
|
||||
choice = input(ct.colorText("Select Policy Group: ", "white"))
|
||||
choice = int(choice) - 1
|
||||
return choice, policiesnames, policyids
|
||||
|
||||
|
||||
def updateAuditPoliciesFromEnforcementPolices(url, policy_relationship_map):
|
||||
for enforcement_policy, audit_policy in policy_relationship_map.items():
|
||||
|
||||
Reference in New Issue
Block a user