We often rely on others' testimony when learning about new topics, such as health benefits of a novel food. However, the sources are not always knowledgeable, helpful, or unbiased, necessitating an assessment of their credibility. Here, we present a Bayesian model of source credibility, where a listener simultaneously infers the expertise and intention of the source while trying to discern the truth. A key prediction is that rational inference of credibility requires anchoring it on some kernel of shared knowledge. We consider a scenario where both parties have noisy access to the ground truth of familiar topics (e.g., is broccoli healthy?), which serves as a basis for reasoning about a source's credibility on novel topics (e.g., is avocado healthy?). This approach provides a computational framework for understanding how people respond to information in domains like science communication and media consumption.