Why not just use AWS Secrets Manager?
A program making a call to github.com needs an authentication token.
What are you suggesting? The program makes a call to retrieve the secret from AWS? Then has full access to do with it what they want? That's exactly the risk and the problem this, and related solutions mentioned in this thread, is trying to solve.