The data aggregation process of wireless sensor networks faces serious security problems. In order to defend the internal attacks launched by captured nodes and ensure the reliability of data aggregation, a secure data aggregation mechanism based on constrained supervision is proposed for wireless sensor network, which uses the advanced LEACH clustering method to select cluster heads. Then the cluster heads supervise the behaviors of cluster members and evaluate the trust values of nodes according to the communication behavior, data quality and residual energy. Then the node with the highest trust value is selected as the supervisor node to audit the cluster head and reject nodes with low trust values. Results show that the proposed mechanism can effectively identify the unreliable nodes, guarantee the system security and prolong the network lifetime.