My understanding is that there is a protocol that sources and journalists follow concerning “on the record, “off the record,” or somewhere in between that is negotiated before the interview begins. (https://www.nytimes.com/2018/08/02/reader-center/off-the-rec...)