Wireless sensor networks (WSNs) are susceptible to many security threats and are specifically prone to physical node capture in which the adversary can easily launch the so-called insider attacks such as node compromise, bypassing the traditional security mechanisms based on cryptography primitives. So, the compromised nodes can be modified to misbehave and disrupt the entire network and can successfully perform the authentication process with their neighbors, which have no way to distinguish fraudulent nodes from trustworthy ones. Trust and reputation systems have been recently suggested as a powerful tools and an attractive complement to cryptography-based schemes in securing WSNs. They provide ability to detect and isolate both faulty and malicious nodes. Considerable research has been done on modeling and managing trust and reputation. However, trust topic issue in WSNs remains an open and challenging field. In this paper, we propose a Risk-aware Reputation-based Trust (RaRTrust) model for WSNs. Our novel framework uses both reputation and risk to evaluate trustworthiness of a sensor node. Risk evaluation is used to deal with the dramatic spoiling of nodes, which makes RaRTrust robust to on-off attack and differ from other trust models based only on reputation. This paper contributes to model the risk as opinion of short-term trustworthiness combining with traditional reputation evaluation to derive trustworthiness in WSNs.