import re


def rule(event):
    if all(
        [
            event.deep_get("type", default="") == "EXECVE",
            event.deep_get("a0", default="") in ["mkdir", "nano", "touch", "vi", "vim"],
            any(
                [
                    re.match(r"(^|\\/)\\.[^.\\/]", event.deep_get("a1", default="")),
                    re.match(r"(^|\\/)\\.[^.\\/]", event.deep_get("a2", default="")),
                ]
            ),
        ]
    ):
        return True
    return False
