Social network analysis is an important methodology in sociological research. Though social network data is very useful to researchers and policy makers, releasing such data to the public may cause an invasion of privacy. We generalize the techniques for protecting personal privacy in tabulated data, and propose some metrics of anonymity for assessing the risk of breaching confidentiality by disclosing social network data. We assume a situation of data publication, where data is released to the general public. We adopt description logic as the underlying knowledge representation formalism, and consider the metrics of anonymity in open world and closed world contexts respectively.