take (something) to the grave
To not reveal or share some secret until the day one dies. My grandmother took the affair to her grave. We only found out about it because the man she'd been seeing so many years ago showed up to her funeral! A: "Please, don't tell anyone what I told you today!" B: "I swear, I'll take it to the grave." The company use extreme non-disclosure agreements to ensure all employees take its research to the grave.
take it to one's grave
to carry a secret with one until one dies. I will never tell anyone. I'll take your secret to my grave. She took the answer to the mystery to her grave.