import re


def rule(event):
    if all(
        [
            event.deep_get("type", default="") == "PATH",
            any(
                [
                    event.deep_get("name", default="") == "/etc/shells",
                    event.deep_get("name", default="") == "/etc/profile",
                    event.deep_get("name", default="").startswith("/etc/profile.d/"),
                    event.deep_get("name", default="") == "/etc/bash.bashrc",
                    event.deep_get("name", default="") == "/etc/bashrc",
                    event.deep_get("name", default="") == "/etc/zsh/zprofile",
                    event.deep_get("name", default="") == "/etc/zsh/zshrc",
                    event.deep_get("name", default="") == "/etc/zsh/zlogin",
                    event.deep_get("name", default="") == "/etc/zsh/zlogout",
                    event.deep_get("name", default="") == "/etc/csh.cshrc",
                    event.deep_get("name", default="") == "/etc/csh.login",
                    event.deep_get("name", default="") == "/root/.bashrc",
                    event.deep_get("name", default="") == "/root/.bash_profile",
                    event.deep_get("name", default="") == "/root/.profile",
                    event.deep_get("name", default="") == "/root/.zshrc",
                    event.deep_get("name", default="") == "/root/.zprofile",
                    re.match(r"^/home/.*/.bashrc$", event.deep_get("name", default="")),
                    re.match(r"^/home/.*/.zshrc$", event.deep_get("name", default="")),
                    re.match(r"^/home/.*/.bash_profile$", event.deep_get("name", default="")),
                    re.match(r"^/home/.*/.zprofile$", event.deep_get("name", default="")),
                    re.match(r"^/home/.*/.profile$", event.deep_get("name", default="")),
                    re.match(r"^/home/.*/.bash_login$", event.deep_get("name", default="")),
                    re.match(r"^/home/.*/.bash_logout$", event.deep_get("name", default="")),
                    re.match(r"^/home/.*/.zlogin$", event.deep_get("name", default="")),
                    re.match(r"^/home/.*/.zlogout$", event.deep_get("name", default="")),
                ]
            ),
        ]
    ):
        return True
    return False
