def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("ParentImage", default="").endswith("/applet"),
                    event.deep_get("ParentImage", default="").endswith("/osascript"),
                ]
            ),
            "osacompile" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
