Publicamos atualizações frequentes em nossa documentação, e a tradução desta página ainda pode estar em andamento. Para obter as informações mais recentes, acesse a documentação em inglês. Se houver problemas com a tradução desta página, entre em contato conosco.

Reviewing the audit log for your organization

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.

Neste artigo

Did this doc help you?

Accessing the audit log

The audit log lists actions performed within the last 90 days. Only owners can access an organization's audit log.

  1. In the top right corner of GitHub, click your profile photo, then click Your profile.
    Profile photo
  2. On the left side of your profile page, under "Organizations", click the icon for your organization.
    organization icons
  3. No nome da sua organização, clique em Settings.
    Botão de configurações da organização
  4. Na barra lateral Settings, clique em Audit log.
    Configurações de log de auditoria para organizações na barra lateral

Searching the audit log

O log lista as seguintes informações sobre cada ação:

  • Em qual repositório uma ação foi executada
  • O usuário que executou a ação
  • A ação que foi executada
  • Em que país a ação foi executada
  • A data e a hora que a ação foi executada

Observe que não é possível pesquisar as entradas usando texto. No entanto, é possível criar consultas de pesquisa usando diversos filtros. Muitos operadores usados ao consultar o log de auditoria, como -, >, ou <, correspondem ao mesmo formato de pesquisa no GitHub. Para obter mais informações, consulte "Searching on GitHub."

Pesquisar com base em operação

Use o qualificador operation para limitar ações a tipos específicos de operações. Por exemplo:

  • operation:access encontra todos os eventos nos quais um recurso foi acessado.
  • operation:authentication encontra todos os eventos nos quais um evento de autenticação foi executado.
  • operation:create encontra todos os eventos nos quais um recurso foi criado.
  • operation:modify encontra todos os eventos nos quais um recurso foi modificado.
  • operation:remove encontra todos os eventos nos quais um recurso foi removido.
  • operation:restore encontra todos os eventos nos quais um recurso foi restaurado.
  • operation:transfer encontra todos os eventos nos quais um recurso foi transferido.

Pesquisar com base no repositório

Use o qualificador repo para limitar ações a um repositório específico. Por exemplo:

  • repo:my-org/our-repo localiza todos os eventos que ocorreram no repositório our-repo na organização my-org.
  • repo:my-org/our-repo repo:my-org/another-repo localiza todos os eventos que ocorreram para ambos repositórios our-repo e another-repo na organização my-org.
  • -repo:my-org/not-this-repo exclui todos os eventos que ocorreram no repositório not-this-repo na organização my-org.

Observe que você deve incluir o nome da conta no qualificador repo; pesquisar somente repo:our-repo não funcionará.

Pesquisar com base no usuário

O qualificador actor pode pesquisar eventos com base em quem executou a ação. Por exemplo:

  • actor:octocat localiza todos os eventos feitos por octocat.
  • actor:octocat actor:hubot localiza todos os eventos realizados por ambos octocat e hubot.
  • -actor:hubot exclui todos os eventos realizados por hubot.

Observe que só é possível usar um nome de usuário do GitHub, e não o nome verdadeiro da pessoa.

Search based on the action performed

To search for specific events, use the action qualifier in your query. Actions listed in the audit log are grouped within the following categories:

Category NameDescription
accountContains all activities related to your organization account.
billingContains all activities related to your organization's billing.
discussion_postContains all activities related to discussions posted to a team page.
discussion_post_replyContains all activities related to replies to discussions posted to a team page.
hookContains all activities related to webhooks.
integration_installation_requestContains all activities related to organization member requests for owners to approve integrations for use in the organization.
marketplace_agreement_signatureContains all activities related to signing the GitHub Marketplace Developer Agreement.
marketplace_listingContains all activities related to listing apps in GitHub Marketplace.
members_can_create_pagesContains all activities related to disabling the publication of GitHub Pages sites for repositories in the organization. For more information, see "Restricting publication of GitHub Pages sites for your organization."
orgContains all activities related to organization membership
org_credential_authorizationContains all activities related to authorizing credentials for use with SAML single sign-on.
organization_labelContains all activities related to default labels for repositories in your organization.
payment_methodContains all activities related to how your organization pays for GitHub.
profile_pictureContains all activities related to your organization's profile picture.
projectContains all activities related to project boards.
protected_branchContains all activities related to protected branches.
repoContains all activities related to the repositories owned by your organization.
repository_content_analysisContains all activities related to enabling or disabling data use for a private repository.
repository_dependency_graphContains all activities related to enabling or disabling the dependency graph for a private repository.
repository_vulnerability_alertContains all activities related to Dependabot alerts for vulnerable dependencies.
sponsorsContains all events related to sponsor buttons (see "Displaying a sponsor button in your repository")
team_discussionsContains activities related to managing team discussions for an organization.

You can search for specific sets of actions using these terms. For example:

  • action:team finds all events grouped within the team category.
  • -action:hook excludes all events in the webhook category.

Each category has a set of associated events that you can filter on. For example:

  • action:team.create finds all events where a team was created.
  • -action:hook.events_changed excludes all events where the events on a webhook have been altered.

This list describes the available categories and associated events:

The account category
ActionDescription
billing_plan_changeTriggered when an organization's billing cycle changes.
plan_changeTriggered when an organization's subscription changes.
pending_plan_changeTriggered when an organization owner or billing manager cancels or downgrades a paid subscription.
pending_subscription_changeTriggered when a GitHub Marketplace free trial starts or expires.
The billing category
ActionDescription
change_billing_typeTriggered when your organization changes how it pays for GitHub.
change_emailTriggered when your organization's billing email address changes.
The discussion_post category
ActionDescription
updateTriggered when a team discussion post is edited.
destroyTriggered when a team discussion post is deleted.
The discussion_post_reply category
ActionDescription
updateTriggered when a reply to a team discussion post is edited.
destroyTriggered when a reply to a team discussion post is deleted.
The hook category
ActionDescription
createTriggered when a new hook was added to a repository owned by your organization.
config_changedTriggered when an existing hook has its configuration altered.
destroyTriggered when an existing hook was removed from a repository.
events_changedTriggered when the events on a hook have been altered.
The integration_installation_request category
ActionDescription
createTriggered when an organization member requests that an organization owner install an integration for use in the organization.
closeTriggered 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.
The issue category
ActionDescription
destroyTriggered when an organization owner or someone with admin permissions in a repository deletes an issue from an organization-owned repository.
The marketplace_agreement_signature category
ActionDescription
createTriggered when you sign the GitHub Marketplace Developer Agreement.
The marketplace_listing category
ActionDescription
approveTriggered when your listing is approved for inclusion in GitHub Marketplace.
createTriggered when you create a listing for your app in GitHub Marketplace.
delistTriggered when your listing is removed from GitHub Marketplace.
redraftTriggered when your listing is sent back to draft state.
rejectTriggered when your listing is not accepted for inclusion in GitHub Marketplace.
The members_can_create_pages category

For more information, see "Restricting publication of GitHub Pages sites for your organization."

ActionDescription
enableTriggered when an organization owner enables publication of GitHub Pages sites for repositories in the organization.
disableTriggered when an organization owner disables publication of GitHub Pages sites for repositories in the organization.
The org category
ActionDescription
audit_log_exportTriggered 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.
block_userTriggered when an organization owner blocks a user from accessing the organization's repositories.
cancel_invitationTriggered when an organization invitation has been revoked.
disable_oauth_app_restrictionsTriggered when an owner disables aplicativo OAuth access restrictions for your organization.
disable_samlTriggered when an organization admin disables SAML single sign-on for an organization.
disable_member_team_creation_permissionTriggered when an organization owner limits team creation to owners. For more information, see "Setting team creation permissions in your organization."
disable_two_factor_requirementTriggered when an owner disables a two-factor authentication requirement for all members, billing managers, and outside collaborators in an organization.
enable_oauth_app_restrictionsTriggered when an owner enables aplicativo OAuth access restrictions for your organization.
enable_samlTriggered when an organization admin enables SAML single sign-on for an organization.
enable_member_team_creation_permissionTriggered when an organization owner allows members to create teams. For more information, see "Setting team creation permissions in your organization."
enable_two_factor_requirementTriggered when an owner requires two-factor authentication for all members, billing managers, and outside collaborators in an organization.
invite_memberTriggered when a new user was invited to join your organization.
oauth_app_access_approvedTriggered when an owner grants organization access to an aplicativo OAuth.
oauth_app_access_deniedTriggered when an owner disables a previously approved aplicativo OAuth's access to your organization.
oauth_app_access_requestedTriggered when an organization member requests that an owner grant an aplicativo OAuth access to your organization.
remove_billing_managerTriggered when an owner removes a billing manager from an organization or when two-factor authentication is required in an organization and a billing manager doesn't use 2FA or disables 2FA.
remove_memberTriggered when an owner removes a member from an organization or when two-factor authentication is required in an organization and an organization member doesn't use 2FA or disables 2FA. Also triggered when an organization member removes themselves from an organization.
remove_outside_collaboratorTriggered when an owner removes an outside collaborator from an organization or when two-factor authentication is required in an organization and an outside collaborator does not use 2FA or disables 2FA.
revoke_external_identityTriggered when an organization owner revokes a member's linked identity. For more information, see "Viewing and managing a member's SAML access to your organization."
revoke_sso_sessionTriggered when an organization owner revokes a member's SAML session. For more information, see "Viewing and managing a member's SAML access to your organization."
unblock_userTriggered when an organization owner unblocks a user from an organization.
update_default_repository_permissionTriggered when an owner changes the default repository permission level for organization members.
update_memberTriggered when an owner changes a person's role from owner to member or member to owner.
update_member_repository_creation_permissionTriggered when an owner changes the create repository permission for organization members.
update_saml_provider_settingsTriggered when an organization's SAML provider settings are updated.
update_terms_of_serviceTriggered 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."
The org_credential_authorization category
ActionDescription
grantTriggered when a member authorizes credentials for use with SAML single sign-on.
deauthorizedTriggered when a member deauthorizes credentials for use with SAML single sign-on.
revokeTriggered when an owner revokes authorized credentials.
The organization_label category
ActionDescription
createTriggered when a default label is created.
updateTriggered when a default label is edited.
destroyTriggered when a default label is deleted.
The oauth_application category
ActionDescription
createTriggered when a new aplicativo OAuth is created.
destroyTriggered when an existing aplicativo OAuth is deleted.
reset_secretTriggered when an aplicativo OAuth's client secret is reset.
revoke_tokensTriggered when an aplicativo OAuth's user tokens are revoked.
transferTriggered when an existing aplicativo OAuth is transferred to a new organization.
The payment_method category
ActionDescription
clearTriggered when a payment method on file is removed.
createTriggered when a new payment method is added, such as a new credit card or PayPal account.
updateTriggered when an existing payment method is updated.
The profile_picture category
ActionDescription
updateTriggered when you set or update your organization's profile picture.
The project category
ActionDescription
createTriggered when a project board is created.
linkTriggered when a repository is linked to a project board.
renameTriggered when a project board is renamed.
updateTriggered when a project board is updated.
deleteTriggered when a project board is deleted.
unlinkTriggered when a repository is unlinked from a project board.
update_org_permissionTriggered when the base-level permission for all organization members is changed or removed.
update_team_permissionTriggered when a team's project board permission level is changed or when a team is added or removed from a project board.
update_user_permissionTriggered when an organization member or outside collaborator is added to or removed from a project board or has their permission level changed.
The protected_branch category
ActionDescription
create Triggered when branch protection is enabled on a branch.
destroyTriggered when branch protection is disabled on a branch.
update_admin_enforced Triggered when branch protection is enforced for repository administrators.
update_require_code_owner_review Triggered when enforcement of required Code Owner review is updated on a branch.
dismiss_stale_reviews Triggered when enforcement of dismissing stale pull requests is updated on a branch.
update_signature_requirement_enforcement_level Triggered when enforcement of required commit signing is updated on a branch.
update_pull_request_reviews_enforcement_level Triggered when enforcement of required pull request reviews is updated on a branch.
update_required_status_checks_enforcement_level Triggered when enforcement of required status checks is updated on a branch.
update_strict_required_status_checks_policyTriggered when the requirement for a branch to be up to date before merging is changed.
rejected_ref_update Triggered when a branch update attempt is rejected.
policy_override Triggered when a branch protection requirement is overridden by a repository administrator.
update_allow_force_pushes_enforcement_level Triggered when force pushes are enabled or disabled for a protected branch.
update_allow_deletions_enforcement_level Triggered when branch deletion is enabled or disabled for a protected branch.
update_linear_history_requirement_enforcement_level Triggered when required linear commit history is enabled or disabled for a protected branch.
The repo category
ActionDescription
accessTriggered when a repository owned by an organization is switched from "private" to "public" (or vice versa).
add_memberTriggered when a user accepts an invitation to have collaboration access to a repository.
add_topicTriggered when a repository admin adds a topic to a repository.
archivedTriggered when a repository admin archives a repository.
createTriggered when a new repository is created.
destroyTriggered when a repository is deleted.
disableTriggered when a repository is disabled (e.g., for insufficient funds).
enableTriggered when a repository is reenabled.
remove_memberTriggered when a user is removed from a repository as a collaborator.
remove_topicTriggered when a repository admin removes a topic from a repository.
renameTriggered when a repository is renamed.
transferTriggered when a repository is transferred.
transfer_startTriggered when a repository transfer is about to occur.
unarchivedTriggered when a repository admin unarchives a repository.
The repository_content_analysis category
ActionDescription
enableTriggered when an organization owner or person with admin access to the repository enables data use settings for a private repository.
disableTriggered when an organization owner or person with admin access to the repository disables data use settings for a private repository.
The repository_dependency_graph category
ActionDescription
enableTriggered when a repository owner or person with admin access to the repository enables the dependency graph for a private repository.
disableTriggered when a repository owner or person with admin access to the repository disables the dependency graph for a private repository.
The repository_vulnerability_alert category
ActionDescription
createTriggered when GitHub creates a Dependabot alert for a vulnerable dependency in a particular repository.
resolveTriggered when someone with write access to a repository pushes changes to update and resolve a vulnerability in a project dependency.
dismissTriggered when an organization owner or person with admin access to the repository dismisses a Dependabot alert about a vulnerable dependency.
authorized_users_teamsTriggered when an organization owner or a member with admin permissions to the repository updates the list of people or teams authorized to receive Dependabot alerts for vulnerable dependencies in the repository.
The sponsors category
ActionDescription
repo_funding_link_button_toggleTriggered when you enable or disable a sponsor button in your repository (see "Displaying a sponsor button in your repository")
repo_funding_links_file_actionTriggered when you change the FUNDING file in your repository (see "Displaying a sponsor button in your repository")
The team_discussions category
ActionDescription
disableTriggered when an organization owner disables team discussions for an organization. For more information, see "Disabling team discussions for your organization."
enableTriggered when an organization owner enables team discussions for an organization.

Search based on time of action

Use the created qualifier to filter actions in the audit log based on when they occurred. Date formatting must follow the ISO8601 standard, which is YYYY-MM-DD (year-month-day). You can also add optional time information THH:MM:SS+00:00 after the date, to search by the hour, minute, and second. That's T, followed by HH:MM:SS (hour-minutes-seconds), and a UTC offset (+00:00).

Dates support greater than, less than, and range qualifiers. 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.

Search based on location

Using the qualifier country, you can filter actions 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.

Exporting the audit log

Você pode exportar o log como dados JSON ou um valor separado por vírgulas (CSV) do arquivo.

Botão de exportação

Para filtrar os resultados em sua exportação, pesquise por um ou mais destes qualificadores suportados antes de usar o menu suspenso Export.

QualifierValor de exemplo
Açãoteam.create
actoroctocat
usuáriocodertocat
orgocto-org
repoocto-org/documentation
created2019-06-01

Depois de exportar o log como JSON ou CSV, você verá as seguintes chaves e valores no arquivo resultante.

TeclaValor de exemplo
Açãoteam.create
actoroctocat
usuáriocodertocat
orgocto-org
repoocto-org/documentation
created_at1429548104000 (o registro de data e hora mostra o tempo desde a era Epoch em milissegundos.)
data.hook_id245
data.events["issues", "issue_comment", "pull_request", "pull_request_review_comment"]
data.events_were["push", "pull_request", "issues"]
data.target_loginoctocat
data.old_userhubot
data.teamocto-org/engineering

Using the Audit log API

Note: The Audit log API is available for organizations using GitHub Enterprise. Para obter mais informações, consulte os "produtos do GitHub".

To ensure a secure IP and maintain compliance for your organization, you can use the Audit log 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 App.

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."

Further reading

Did this doc help you?