OP I have worked in prisons and still work in criminal justice now.
Many of these men are decent and have just made mistakes.
I do not judge them (depending on the crime and circumstances) or the people who are in relationships with them.
But even I think your friend is being incredibly stupid.
Your friend is 38 weeks pregnant and is talking to a man - she should be focusing on herself and getting ready for the new baby.
Even if he wasn’t in prison, I would be shocked that any pregnant woman would be doing this.
If he had been released from prison a couple of years ago, then I’d still avoid him if I had SS involvement but the fact that he’s still in prison is of course going to raise red flags.
Your friend does not sound fit to be a parent without SS involvement and they will absolutely take this seriously, because it is.
They will very likely find out because he’s in prison.
If he was already out and not on tag or license then it would be less likely but him being still in prison does mean they’ll likely find out.
How long has he got left?
Why did she contact him in the first place?
I do hope they know each other well as IME these men will talk to anyone because they need love and a distraction.
A few weeks after getting out though, they don’t want anything to do with the new woman.
I genuinely can’t understand why your friend would choose a man over her own child, let alone a man that’s in prison and she can’t even have a relationship with.