just adding my 2c, that the scanning in the latest beta does seem to be a little unreliable and often hangs.
I run a few servers in dockers and have seen it happen in more than one of them.
It will hang at different places, so it does not seem to be specific files that are causing it.
It also does not seem to be agent specific either, as I have seen it happen on different types of libraries.
I have downgraded them to an older version and scanning seems to work as expected.