def create_vuln(workspace_name, vuln): """Take a workspace_name and an vulnerability object and save it to the sever. The rev parameter must be provided if you are updating the object. Return the server's json response as a dictionary. """ vuln_properties = get_vuln_properties(vuln) return server.create_vuln(workspace_name, **vuln_properties)
def update_vuln(workspace_name, vuln): vuln_properties = get_vuln_properties(vuln) return server.update_vuln(workspace_name, **vuln_properties)