The audit log allows organization admins to quickly review the actions performed by members of your organization. It includes details such as who performed the action, what the action was, and when it was performed.
The audit log lists events triggered by activities that affect your organization within the last 90 days. Only owners can access an organization's audit log.
在 GitHub 的右上角,单击您的个人资料照片,然后单击 Your profile(您的个人资料)。
Contains all activities related to crediting a contributor for a security advisory in the GitHub Advisory Database. For more information, see "About GitHub Security Advisories."
Contains organization-level configuration activities for Dependabot alerts in existing repositories. For more information, see "About alerts for vulnerable dependencies."
Contains organization-level configuration activities for Dependabot security updates in existing repositories. For more information, see "Configuring Dependabot security updates."
Contains repository-level activities related to security advisories in the GitHub Advisory Database. For more information, see "About GitHub Security Advisories."
Contains repository-level activities related to enabling or disabling the dependency graph for a private repository. For more information, see "About the dependency graph."
Use the created qualifier to filter events in the audit log based on when they occurred. 日期格式必须遵循 ISO8601标准,即 YYYY-MM-DD(年-月-日)。 您也可以在日期后添加可选的时间信息 THH:MM:SS+00:00,以便按小时、分钟和秒进行搜索。 这是 T,随后是 HH:MM:SS(时-分-秒)和 UTC 偏移 (+00:00)。
When you search for a date, you can use greater than, less than, and range qualifiers to further filter results. For more information, see "Understanding the search syntax."
For example:
created:2014-07-08 finds all events that occurred on July 8th, 2014.
created:>=2014-07-08 finds all events that occurred on or after July 8th, 2014.
created:<=2014-07-08 finds all events that occurred on or before July 8th, 2014.
created:2014-07-01..2014-07-31 finds all events that occurred in the month of July 2014.
The audit log contains data for the past 90 days, but you can use the created qualifier to search for events earlier than that.
Using the qualifier country, you can filter events in the audit log based on the originating country. You can use a country's two-letter short code or its full name. Keep in mind that countries with spaces in their name will need to be wrapped in quotation marks. For example:
country:de finds all events that occurred in Germany.
country:Mexico finds all events that occurred in Mexico.
country:"United States" all finds events that occurred in the United States.
Note: The audit log GraphQL API is available for organizations using GitHub Enterprise. 更多信息请参阅“GitHub 的产品”。
To ensure a secure IP and maintain compliance for your organization, you can use the audit log GraphQL API to keep copies of your audit log data and monitor:
Access to your organization or repository settings
Changes in permissions
Added or removed users in an organization, repository, or team
Users being promoted to admin
Changes to permissions of a GitHub 应用程序
Note that you can't retrieve Git events using the GraphQL API.
The GraphQL response can include data for up to 90 to 120 days.
For example, you can make a GraphQL request to see all the new organization members added to your organization. For more information, see the "GraphQL API Audit Log."
Note: The audit log REST API is available as a limited beta for users of GitHub Enterprise Cloud only. To join the beta, talk to your services or sales contact at GitHub.
To ensure a secure IP and maintain compliance for your organization, you can use the audit log REST API to keep copies of your audit log data and monitor:
Access to your organization or repository settings
Changes in permissions
Added or removed users in an organization, repository, or team
Users being promoted to admin
Changes to permissions of a GitHub 应用程序
Git events, such as cloning, fetching, and pushing
The audit log retains Git events for 7 days. This is shorter than other audit log events, which can be retained for 90 days.
For more information about the audit log REST API, see "Organizations" in the REST API documentation.
Note: To access Git events in the audit log, you must use the audit log REST API. This functionality is available as a limited beta for users of GitHub Enterprise Cloud only. To join the beta, talk to your services or sales contact at GitHub.
For more information about the audit log REST API, see "Organizations" in the REST API documentation.
The audit log retains Git events for 7 days. This is shorter than other audit log events, which can be retained for 90 days.
Action
Description
clone
Triggered when a repository is cloned.
fetch
Triggered when changes are fetched from a repository.
push
Triggered when changes are pushed to a repository.
Triggered when an organization member requests that an organization owner install an integration for use in the organization.
close
Triggered when a request to install an integration for use in an organization is either approved or denied by an organization owner, or canceled by the organization member who opened the request.
Triggered when an organization admin creates an export of the organization audit log. If the export included a query, the log will list the query used and the number of audit log entries matching that query.
Triggered when an owner disables a two-factor authentication requirement for all members, billing managers, and outside collaborators in an organization.
Triggered when an owner changes the default repository permission level for organization members.
update_member
Triggered when an owner changes a person's role from owner to member or member to owner.
update_member_repository_creation_permission
Triggered when an owner changes the create repository permission for organization members.
update_saml_provider_settings
Triggered when an organization's SAML provider settings are updated.
update_terms_of_service
Triggered when an organization changes between the Standard Terms of Service and the Corporate Terms of Service. For more information, see "Upgrading to the Corporate Terms of Service."
Triggered when a repository owner or person with admin access to the repository disables the dependency graph for a private repository. For more information, see "About the dependency graph."
enable
Triggered when a repository owner or person with admin access to the repository enables the dependency graph for a private repository.
Triggered when a repository owner or person with admin access to the repository disables secret scanning for a private repository. For more information, see "About secret scanning."
enable
Triggered when a repository owner or person with admin access to the repository enables secret scanning for a private repository.
Triggered when GitHub creates a Dependabot alert for a repository that uses a vulnerable dependency. For more information, see "About alerts for vulnerable dependencies."
dismiss
Triggered when an organization owner or person with admin access to the repository dismisses a Dependabot alert about a vulnerable dependency.
resolve
Triggered when someone with write access to a repository pushes changes to update and resolve a vulnerability in a project dependency.
Triggered when an organization owner or a person with admin permissions to the repository updates the list of people or teams authorized to receive Dependabot alerts for vulnerable dependencies in the repository. For more information, see "Managing security and analysis settings for your repository."
disable
Triggered when a repository owner or person with admin access to the repository disables Dependabot alerts.
enable
Triggered when a repository owner or person with admin access to the repository enables Dependabot alerts.
Triggered when an organization owner disables secret scanning for all existing, private repositories. For more information, see "About secret scanning."
enable
Triggered when an organization owner enables secret scanning for all existing, private repositories.