Skip to main content

Cette version de GitHub Enterprise Server n'est plus disponible depuis le 2024-09-25. Aucune publication de correctifs n’est effectuée, même pour les problèmes de sécurité critiques. Pour de meilleures performances, une sécurité améliorée et de nouvelles fonctionnalités, effectuez une mise à niveau vers la dernière version de GitHub Enterprise. Pour obtenir de l’aide sur la mise à niveau, contactez le support GitHub Enterprise.

Best practices for maintaining dependencies

Guidance and recommendations for maintaining the dependencies you use, including GitHub's security products that can help.

Best practices for maintaining dependencies

Staying up to date on dependencies is crucial to maintaining a secure software environment. Here are some recommendations:

Adopt security-focused dependency management tools

  • Use and set up tools that scan your dependencies for vulnerabilities and automatically suggest updates.
  • Ensure these tools are integrated into your CI/CD pipeline for continuous monitoring and updating.
  • Set up your processes to follow semantic versioning to avoid breaking changes.

Perform regular vulnerability scans and audits

  • Schedule regular dependency audits and dependency scans to identify outdated or vulnerable dependencies.

Automate security patch management

  • Configure your dependency management tools to automatically apply security patches.
  • Set up automated pull requests for critical security updates so they can be reviewed and merged quickly.

Enforce policies on the use of dependencies

  • Implement policies that enforce the use of secure versions of dependencies.
  • Use tools that can block merging of pull requests if they introduce vulnerabilities or fail to update vulnerable dependencies.

Integrate security testing in CI/CD

  • Incorporate security testing tools into your CI/CD pipeline.
  • Ensure that dependency updates are automatically tested for security compliance.

Use lock files and dependency pinning

  • Use lock files (for example, package-lock.json, yarn.lock, Pipfile.lock) to pin dependencies to known secure versions.
  • Regularly update and review these lock files to ensure dependencies are up-to-date without unintended security issues.

Monitor security advisories

  • Subscribe to security advisories for the languages and frameworks you use.
  • Automate the integration of advisories into your development workflow to stay informed of new vulnerabilities.
  • Keep an eye on the dashboards provided by your dependency management tools.
  • Be aware of critical updates, especially security patches, and prioritize them.

Version control and change management

  • Track dependency changes in version control (for example, through automated pull requests).
  • Conduct regular code reviews to ensure updates do not introduce new vulnerabilities.

Training and awareness

  • Educate your development and operations teams about the importance of keeping dependencies secure and up-to-date.
  • Provide training on how to use dependency management and security tools effectively.

Response plan for vulnerabilities

  • Have a clear incident response plan for when vulnerabilities are identified in dependencies.
  • Ensure the team knows how to quickly address and remediate security issues.

By following these practices, you can significantly reduce the risk posed by outdated and vulnerable dependencies and maintain a more secure environment.

How GitHub can help

GitHub offers several security features that can help maintain the security of your codebases:

Dependency Graph

  • Provides a tabular representation of your project's dependencies.
  • The graph helps you understand the dependencies of your project and GitHub uses this to identify vulnerable dependencies.
  • For more information, see À propos du graphe de dépendances.

Dependency review

  • Is integrated into your CI/CD pipeline, and allows you to catch insecure dependencies in your code at every pull request. For more information, see À propos de la vérification des dépendances.

  • The action de révision des dépendances is a tool that can block the merging of pull requests if they introduce vulnerabilities or fail to update vulnerable dependencies. For more information, see "About the action de révision des dépendances" in À propos de la vérification des dépendances.

Dependabot

  • Dependabot alerts: Dependabot scans your dependencies for known vulnerabilities and automatically creates alerts when vulnerabilities are found in the repository. For more information, see À propos des alertes Dependabot.

  • Dependabot security updates: Automatically opens pull requests to update vulnerable dependencies to versions that do not have known vulnerabilities. This allows you to quickly review and merge fixes. For more information, see À propos des mises à jour de sécurité Dependabot.

  • Dependabot version updates: Can also be configured to automatically open pull requests to update your dependencies to their latest versions regularly, ensuring you are always using current packages. For more information, see À propos des mises à jour de version Dependabot.

Security Advisories

Security overview

  • You can keep an eye on the dashboards on the security overview page, which provide insights about your organization or enterprise's security landscape and progress. It helps users identify repositories that need attention and monitor the health of their application security program. For example, you can see a summary of an organization's security risk, trends in detection, remediation, and prevention of security alerts, as well as the enablement status of GitHub's security features. For more information, see À propos de la vue d’ensemble de la sécurité.

Security policy

For additional guidance across the whole supply chain using GitHub's security features, see Sécurisation de votre chaîne d’approvisionnement de bout en bout.