That sounds very much like the reason Jonathon Pollard is still serving a life sentence for passing US secrets about Arab order of battle information to Israel back in the ‘80s. His defenders, of which I am not one, claim he was only helping an ally, however he compromised US security and violated his oath. There was talk that the info passed to the Israelis fell into Soviet hands due to leaks in their security services.
During the same era a naval analyst by the name of Morrison, from a family of distinguished historians, sold a satellite photo of a Soviet aircraft carrier under construction to Jane’s Defense Weekly, it was the cover photo one week.
I remember that he too was prosecuted though I don’t recall his punishment.
People entrusted with secret information have no business deciding for themselves what to do with it if no other reason that they may compromise methods and reveal capabilities by doing so.
I saw/heard the author of the book (linked below) on Pollard give
a presentation on BookTV (C-Span2; weekends) maybe six months ago.
Before the appearance of this book, I suspected that Pollard is
doing hard-time for espionage AND for having been able “to get away
with it” for so long.
I suspect that some of the people that were in positions to catch/stop
Pollard during his career were NOT happy to see this book come out!
Capturing Jonathan Pollard: How One of the Most Notorious
Spies in American History Was Brought to Justice
by Ronald J. Olive