Since you can see the value in the UI, that means there’s a web service that feeds that data, and you can use your browser’s dev tools to eavesdrop to see which calls the UI makes to get that data.
I suspect what you’re going to find is that the commit ID is attached to the line of the file, rather than to the Security Hotspot. So you’ll need to do something like Security Hotspot → line # → page data → line # → revision ID.