Network coding not only improves the information flow rates but also shapes the traffic by inducing some predictable structure on the spectrum usage. Specifically, due to the buffering and block processing involved in network coding, the transitions between busy periods and idle periods are expected to be less frequent, which in turn results in a more predictable structure in the network-coded communications, compared to traditional store-and-forward based transmissions. For broadcast communications over erasure channels, we characterize how network coding adds memory to the channel usage and increases the spectrum predictability compared to the basic retransmission scheme (e.g., ARQ). This traffic shaping effect of network coding can be readily applied to cognitive radio networks. We develop adaptive spectrum sensing for secondary users to discover the spectrum opportunities in primary user channels with network-coded transmissions, and show that the throughput of secondary users can be significantly improved. On the other hand, we caution that the predictable structure induced by network coding also presents a security challenge, in the sense of making wireless channels more susceptible to jamming attacks. Our results lead to a new understanding of network coding as a spectrum shaper, and reveal the inherent trade-offs between the throughput and security objectives resulted from the spectrum predictability induced by network coding.