def rule(event):
    if any(
        [
            all(
                [
                    event.deep_get("Image", default="").endswith("/truncate"),
                    "-s +" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/dd"),
                    any(
                        [
                            "if=/dev/zero" in event.deep_get("CommandLine", default=""),
                            "if=/dev/random" in event.deep_get("CommandLine", default=""),
                            "if=/dev/urandom" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
