def rule(event):
    if any(
        [
            event.deep_get("Image", default="").endswith("/groups"),
            all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("/cat"),
                            event.deep_get("Image", default="").endswith("/ed"),
                            event.deep_get("Image", default="").endswith("/head"),
                            event.deep_get("Image", default="").endswith("/less"),
                            event.deep_get("Image", default="").endswith("/more"),
                            event.deep_get("Image", default="").endswith("/nano"),
                            event.deep_get("Image", default="").endswith("/tail"),
                            event.deep_get("Image", default="").endswith("/vi"),
                            event.deep_get("Image", default="").endswith("/vim"),
                        ]
                    ),
                    "/etc/group" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
