def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("ParentImage", default="").endswith("/package_script_service"),
                    event.deep_get("ParentImage", default="").endswith("/installer"),
                ]
            ),
            any(
                [
                    event.deep_get("Image", default="").endswith("/sh"),
                    event.deep_get("Image", default="").endswith("/bash"),
                    event.deep_get("Image", default="").endswith("/dash"),
                    event.deep_get("Image", default="").endswith("/python"),
                    event.deep_get("Image", default="").endswith("/ruby"),
                    event.deep_get("Image", default="").endswith("/perl"),
                    event.deep_get("Image", default="").endswith("/php"),
                    event.deep_get("Image", default="").endswith("/javascript"),
                    event.deep_get("Image", default="").endswith("/osascript"),
                    event.deep_get("Image", default="").endswith("/tclsh"),
                    event.deep_get("Image", default="").endswith("/curl"),
                    event.deep_get("Image", default="").endswith("/wget"),
                ]
            ),
            any(
                [
                    "preinstall" in event.deep_get("CommandLine", default=""),
                    "postinstall" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
