def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/osascript"),
            "-e" in event.deep_get("CommandLine", default=""),
            "display" in event.deep_get("CommandLine", default=""),
            "dialog" in event.deep_get("CommandLine", default=""),
            "answer" in event.deep_get("CommandLine", default=""),
            any(
                [
                    "admin" in event.deep_get("CommandLine", default=""),
                    "administrator" in event.deep_get("CommandLine", default=""),
                    "authenticate" in event.deep_get("CommandLine", default=""),
                    "authentication" in event.deep_get("CommandLine", default=""),
                    "credentials" in event.deep_get("CommandLine", default=""),
                    "pass" in event.deep_get("CommandLine", default=""),
                    "password" in event.deep_get("CommandLine", default=""),
                    "unlock" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
