Skip to main content

About code scanning

You can use code scanning to find security vulnerabilities and errors in the code for your project on GitHub.

Wer kann dieses Feature verwenden?

Code scanning is available for the following repository types:

  • Public repositories on GitHub.com
  • Organization-owned repositories on GitHub Team, GitHub Enterprise Cloud, or GitHub Enterprise Server, with GitHub Code Security enabled.

Hinweis

Der Websiteadministrator muss code scanning aktivieren, damit du dieses Feature verwenden kannst. Weitere Informationen finden Sie unter Konfigurieren der Codeüberprüfung für Ihre Anwendung.

Möglicherweise kannst du code scanning nicht aktivieren oder deaktivieren, wenn Unternehmensbesitzende eine GitHub Code Security-Richtlinie auf Unternehmensebene festgelegt haben. Weitere Informationen finden Sie unter Erzwingen von Richtlinien für die Codesicherheit und -analyse für Unternehmen.

Code scanning ist ein Feature, das du zum Analysieren des Codes in einem GitHub-Repository verwendest, um Sicherheitsrisiken und Codefehler zu finden. Alle von der Analyse ermittelten Probleme werden im Repository angezeigt.

You can use code scanning to find, triage, and prioritize fixes for existing problems in your code. Code scanning also prevents developers from introducing new problems. You can schedule scans for specific days and times, or trigger scans when a specific event occurs in the repository, such as a push.

If code scanning finds a potential vulnerability or error in your code, GitHub displays an alert in the repository. After you fix the code that triggered the alert, GitHub closes the alert. For more information, see Problemlösung für Warnungen der Codeüberprüfung.

To monitor results from code scanning across your repositories or your organization, you can use webhooks and the code scanning API. For information about the webhooks for code scanning, see Webhook-Ereignisse und -Nutzlasten. For information about API endpoints, see REST-API-Endpunkte für die Codeüberprüfung.

To get started with code scanning, see Konfigurieren des Standardsetups für das Codescanning.

About tools for code scanning

You can configure code scanning to use the CodeQL product maintained by GitHub or a third-party code scanning tool.

About CodeQL analysis

CodeQL ist die von GitHub entwickelte Codeanalyse-Engine zum Automatisieren von Sicherheitsprüfungen. Du kannst deinen Code mithilfe von CodeQL analysieren und die Ergebnisse als code scanning-Warnungen anzeigen. For more information about CodeQL, see About code scanning with CodeQL.

About third-party code scanning tools

Code scanning ist mit Code-Scan-Werkzeugen von Drittanbietern interoperabel, welche SARIF-Daten (Static Analysis Results Interchange Format) ausgeben. SARIF ist ein Open-Source-Standard. Weitere Informationen finden Sie unter SARIF-Unterstützung für die Codeüberprüfung.

You can run third-party analysis tools within GitHub using actions or within an external CI system. For more information, see Konfigurieren des erweiterten Setups für das Codescanning or Hochladen einer SARIF-Datei in GitHub.

About the Seite mit dem Toolstatus

The Seite mit dem Toolstatus shows useful information about all of your code scanning tools. If code scanning is not working as you'd expect, the Seite mit dem Toolstatus is a good starting point for debugging problems. For more information, see Informationen zur Toolstatusseite für die Codeüberprüfung.