Scan chains increase the testability but decrease security. Attackers may use scan chains to launch attacks to obtain sensitive information, which poses serious security threats. The scan chain-based attacks contain two steps: 1) scan data obtaining, including mode switching obtaining method and test mode only obtaining method, and 2) scan data analysis, including data mapping analysis method and signature analysis method. To prevent these attacks, various secure scan designs have been proposed. These designs are summarized into two categories: scan chain modification and scan input/output restriction. This paper gives a survey of the scan chain-based attacks and countermeasures. The secure scan designs are summarized and compared from the aspects of security, testability, test time, and hardware overhead.INDEX TERMS Scan chain based attacks, test mode, mode switch, signature, secure scan chain, secret key, physical unclonable function.