Cooperative spectrum sensing can be regarded as a promising method to resolve the spectrumscarcity owing to achieving spatial diversity gain in cognitive radio sensor networks. However, the spectrumsensing data falsification attack launched by the malicious nodes will result in the wrong decision in thefusion center owing to the falsified observations. It will cause a serious security threat and degrade thedecision making process. In this paper, we propose a secure cooperative spectrum sensing strategy basedon reputation mechanism for cognitive wireless sensor networks to counter above kind of attack. The betareputation model is applied to assign reputation value to cognitive sensor nodes according to their historicalsensing behavior, and a dynamic trust evaluation scheme of cooperative spectrum sensing is established.In the final decision, the fusion center allocates a reasonable weight value according to the evaluation ofthe submitted observations to improve the accuracy of the sensing results. Simulation results support thatour proposed strategy can weaken the impact of sensing data falsification attacks in cooperative sensing andoutperform some traditional methods.