The earliest author to talk of the Seven [or Eight] Capital [or Deadly] Sins, is John Cassian in the fifth century, in his Conferences. The whole idea was originally monastic.
The present list of seven, is no older than Gregory the Great, IIRC. It was a convenient and handy way of thinking about sin that “caught on”. ##
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.