Skip to main content

Cette version de GitHub Enterprise Server ne sera plus disponible le 2026-03-17. 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.

Activation de la protection d’envoi pour votre référentiel

Avec la protection d’envoi, secret scanning empêche les contributeurs d’envoyer des secrets à un référentiel et génère une alerte chaque fois qu’un contributeur contourne le blocage.

Qui peut utiliser cette fonctionnalité ?

Propriétaires de référentiels, propriétaire d’organisations, gestionnaires de sécurité et utilisateurs avec le rôle d’administrateur

About enabling push protection

To enable push protection for a repository, you must first enable secret scanning. You can then enable push protection in the repository's "Code security and analysis" settings page following the steps outlined in this article.

If you're an organization owner, you can enable push protection for multiple repositories at a time. For more information, see Quickstart for securing your organization.

Organization owners, security managers, and repository administrators can also enable push protection for secret scanning via the API. For more information, see REST API endpoints for repositories and expand the "Properties of the security_and_analysis object" section.

If your organization is owned by an enterprise account, an enterprise owner can also enable push protection at the enterprise level. For more information, see Managing GitHub Advanced Security features for your enterprise.

Enabling push protection for a repository

  1. On GitHub, navigate to the main page of the repository.

  2. Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.

    Screenshot of a repository header showing the tabs. The "Settings" tab is highlighted by a dark orange outline.

  3. In the "Security" section of the sidebar, click Code security and analysis.

  1. Under "Code security and analysis", find "GitHub Advanced Security."
  2. Under "Secret scanning", under "Push protection", click Enable.

Further reading