The best way of securing your code in a code repository is using Amazon Code Whisperer. Amazon Code Whisperer is the only AI Coding Companion for finding and suggesting remediations for hard-to-detect vulnerabilities.
First I would like to refer Security Best Practices and Published Whitepapers from either Amazon or Google for securing code before taking any action.