def rule(event):
    if any(
        [
            all(
                [
                    event.deep_get("Image", default="").endswith("/ufw-init"),
                    any(
                        [
                            " force-stop" in event.deep_get("CommandLine", default=""),
                            " stop" in event.deep_get("CommandLine", default=""),
                            " flush" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
            all(
                [
                    "ufw " in event.deep_get("CommandLine", default=""),
                    "disable" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
