Skip to content

How can I ensure my code is secure before submitting a PR? #145762

Closed Answered by hylcore-V
lunarforky-z asked this question in Code Security
Discussion options

You must be logged in to vote

Ensuring your code is secure before submitting a pull request is crucial, especially when it involves sensitive data or infrastructure. Here are some best practices:

Static Code Analysis:
Use static code analysis tools to automatically check for common security vulnerabilities such as SQL injection, cross-site scripting (XSS), and other flaws. Tools like SonarQube, Snyk, and CodeQL can scan your code and highlight potential issues before they become problems.

Secrets Scanning:
Before submitting a PR, ensure that no sensitive information like API keys, database credentials, or tokens are hardcoded in your code. GitHub has Secret Scanning built in to help identify secrets accidentally pushe…

Replies: 1 comment

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Security Build security into your GitHub workflow with features to keep your codebase secure Question
2 participants