DN 31: Sigalovada Sutta
This sutta includes Buddha's advice to the lay practitioner. One section describes four types of "enemies described as friends." Bragging/Boasting seems to be a cause or effect of the characteristics of a not-so-good friend:
15. "Young man, be aware of these four enemies disguised as friends: the taker, the talker, the flatterer, and the reckless companion.
16. "The taker can be identified by four things: by only taking, asking for a lot while giving little, performing duty out of fear, and offering service in order to gain something.
17. "The talker can be identified by four things: by reminding of past generosity, promising future generosity, mouthing empty words of kindness, and protesting personal misfortune when called on to help.
18. "The flatterer can be identified by four things: by supporting both bad and good behavior indiscriminately, praising you to your face, and putting you down behind your back.
19. "The reckless companion can be identified by four things: by accompanying you in drinking, roaming around at night, partying, and gambling."
Bragging/Boasting doesn't seem to be a cause or effect of the characteristics of a good friend:
21. "Young man, be aware of these four good-hearted friends: the helper, the friend who endures in good times and bad, the mentor, and the compassionate friend.
22. "The helper can be identified by four things: by protecting you when you are vulnerable, and likewise your wealth, being a refuge when you are afraid, and in various tasks providing double what is requested.
23. "The enduring friend can be identified by four things: by telling you secrets, guarding your own secrets closely, not abandoning you in misfortune, and even dying for you.
24. "The mentor can be identified by four things: by restraining you from wrongdoing, guiding you towards good actions, telling you what you ought to know, and showing you the path to heaven.
25. "The compassionate friend can be identified by four things: by not rejoicing in your misfortune, delighting in your good fortune, preventing others from speaking ill of you, and encouraging others who praise your good qualities."