Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _get_denied_prefixes_from_desired(desired_actions):
denied_actions = all_permissions.difference(desired_actions)
denied_prefixes = set()
for denied_action in denied_actions:
for denied_prefix in _get_prefixes_for_action(denied_action):
denied_prefixes.add(denied_prefix)
return denied_prefixes