def rule(event):
    if any(
        [
            all(
                [
                    event.deep_get("type", default="") == "PATH",
                    event.deep_get("name", default="")
                    in ["/etc/pam.d/system-auth", "/etc/pam.d/password-auth"],
                ]
            ),
            event.deep_get("type", default="") in ["TTY", "USER_TTY"],
        ]
    ):
        return True
    return False
