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.
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.
Accessing the audit log
The audit log lists events triggered by activities that affect your organization within the current month and previous six months. Only owners can access an organization's audit log.
By default, only events from the past three months are displayed. To view older events, you must specify a date range with the created parameter. Para obter mais informações, consulte "Entender a sintaxe de pesquisa".
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Ao lado da organização, clique em Configurações.
In the "Archives" section of the sidebar, click
Logs, then click Audit log.
Searching the audit log
The name for each audit log entry is composed of the action object or category qualifier, followed by an operation type. For example, the repo.create entry refers to the create operation on the repo category.
Cada entrada do log de auditoria mostra informações aplicáveis sobre um evento, como:
The organization an action was performed in
The user (actor) who performed the action
The user affected by the action
Em qual repositório uma ação foi executada
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:
Contains all activities related to crediting a contributor for a security advisory in the Banco de Dados Consultivo GitHub. For more information, see "About GitHub Security Advisories."
Contains organization-level configuration activities for Alertas do Dependabot in existing repositories. For more information, see "About Alertas do Dependabot."
Contains repository-level activities related to security advisories in the Banco de Dados Consultivo GitHub. 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."
Contains activities related to GitHub Actions workflows.
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 actions 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.
Search based on time of action
Use the created qualifier to filter events in the audit log based on when they occurred. O formato de data deve seguir o padrão ISO8601, que é YYYY-MM-DD (ano-mês-dia). Você também pode adicionar informações de tempo opcionais THH:MM:SS+00:00 após a data, para pesquisar por hora, minuto e segundo. Isso se faz adicionando T, seguido de HH:MM:SS (hora-minutos-segundos) e um intervalo de UTC (+00:00).
Ao pesquisar uma data, você pode usar qualificadores de maior que, menor que e intervalo para filtrar os resultados ainda mais. Para obter mais informações, consulte "Entender a sintaxe de pesquisa".
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.
Note: The audit log contains data for the current month and every day of the previous six months.
Search based on location
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.
Exporting the audit log
Você pode exportar o log como dados JSON ou um valor separado por vírgulas (CSV) do arquivo.
Para filtrar os resultados em sua exportação, pesquise por um ou mais destes qualificadores suportados antes de usar o menu suspenso Export.
Qualifier
Valor de exemplo
Ação
team.create
actor
octocat
usuário
codertocat
org
octo-org
repo
octo-org/documentation
created
2019-06-01
After you export the log, you'll see the following keys and values in the resulting file.
Tecla
Valor de exemplo
Ação
team.create
actor
octocat
usuário
codertocat
actor_location.country_code
US
org
octo-org
repo
octo-org/documentation
created_at
1429548104000 (o registro de data e hora mostra o tempo desde a era Epoch em milissegundos.)
Organizations that use GitHub Enterprise Cloud can interact with the audit log using the GraphQL API and REST API. For more information, see the GitHub Enterprise Cloud documentation.
Audit log actions
An overview of some of the most common actions that are recorded as events in the audit log.
account category actions
Action
Description
billing_plan_change
Triggered when an organization's billing cycle changes.
plan_change
Triggered when an organization's subscription changes.
Acionada quando o executor é atualizado. Pode ser visto usando a API REST e a interface do usuário; não visível na exportação de JSON/CSV. Para obter mais informações, consulte "Sobre executores auto-hospedados."
self_hosted_runner_online
Acionada quando o aplicativo do executor é iniciado. Só pode ser visto usando a API REST. Não é visível na interface do usuário ou na exportação do JSON/CSV. Para obter mais informações, consulte "Verificar o status de um executor auto-hospedado".
self_hosted_runner_offline
Acionada quando o aplicativo do executor é interrompido. Só pode ser visto usando a API REST. Não é visível na interface do usuário ou na exportação do JSON/CSV. Para obter mais informações, consulte "Verificar o status de um executor auto-hospedado".
environment category actions
Action
Description
create_actions_secret
Triggered when a secret is created in an environment. For more information, see "Environment secrets."
Triggered when a secret is removed from an environment. For more information, see "Environment secrets."
update_actions_secret
Triggered when a secret in an environment is updated. For more information, see "Environment secrets."
git category actions
Note: To access Git events in the audit log, you must use the audit log REST API. The audit log REST API is available for users of GitHub Enterprise Cloud only. For more information, see "Organizations."
The audit log retains Git events for seven days. This is shorter than other audit log events, which can be retained for up to seven months.
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 existing hook has its configuration altered.
destroy
Triggered when an existing hook was removed from a repository.
events_changed
Triggered when the events on a hook have been altered.
integration_installation_request category actions
Action
Description
create
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.
issue category actions
Action
Description
destroy
Triggered when an organization owner or someone with admin permissions in a repository deletes an issue from an organization-owned repository.
marketplace_agreement_signature category actions
Action
Description
create
Triggered when you sign the GitHub Marketplace Developer Agreement.
marketplace_listing category actions
Action
Description
approve
Triggered when your listing is approved for inclusion in GitHub Marketplace.
create
Triggered when you create a listing for your app in GitHub Marketplace.
delist
Triggered when your listing is removed from GitHub Marketplace.
redraft
Triggered when your listing is sent back to draft state.
reject
Triggered when your listing is not accepted for inclusion in GitHub Marketplace.
Triggered when an organization owner enables publication of GitHub Pages sites for repositories in the organization.
disable
Triggered when an organization owner disables publication of GitHub Pages sites for repositories in the organization.
org category actions
Action
Description
add_member
Triggered when a user joins an organization.
advanced_security_policy_selected_member_disabled
Triggered when an enterprise owner prevents Segurança Avançada GitHub features from being enabled for repositories owned by the organization. Para obter mais informações, consulte "Aplicar políticas para Segurança Avançada na sua empresa".
advanced_security_policy_selected_member_enabled
Triggered when an enterprise owner allows Segurança Avançada GitHub features to be enabled for repositories owned by the organization. Para obter mais informações, consulte "Aplicar políticas para Segurança Avançada na sua empresa".
audit_log_export
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 the runner application is started. Can only be viewed using the REST API; not visible in the UI or JSON/CSV export. For more information, see "Checking the status of a self-hosted runner."
self_hosted_runner_offline
Triggered when the runner application is stopped. Can only be viewed using the REST API; not visible in the UI or JSON/CSV export. For more information, see "Checking the status of a self-hosted runner."
self_hosted_runner_updated
Triggered when the runner application is updated. Can be viewed using the REST API and the UI; not visible in the JSON/CSV export. For more information, see "About self-hosted runners."
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."
organization_label category actions
Action
Description
create
Triggered when a default label is created.
update
Triggered when a default label is edited.
destroy
Triggered when a default label is deleted.
oauth_application category actions
Action
Description
create
Triggered when a new aplicativo OAuth is created.
destroy
Triggered when an existing aplicativo OAuth is deleted.
reset_secret
Triggered when an aplicativo OAuth's client secret is reset.
revoke_tokens
Triggered when an aplicativo OAuth's user tokens are revoked.
transfer
Triggered when an existing aplicativo OAuth is transferred to a new organization.
Triggered when GitHub Actions is enabled for a repository. Can be viewed using the UI. This event is not included when you access the audit log using the REST API. For more information, see "Using the REST API."
Triggered when the runner application is started. Can only be viewed using the REST API; not visible in the UI or JSON/CSV export. For more information, see "Checking the status of a self-hosted runner."
self_hosted_runner_offline
Triggered when the runner application is stopped. Can only be viewed using the REST API; not visible in the UI or JSON/CSV export. For more information, see "Checking the status of a self-hosted runner."
self_hosted_runner_updated
Triggered when the runner application is updated. Can be viewed using the REST API and the UI; not visible in the JSON/CSV export. For more information, see "About self-hosted runners."
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.
repository_vulnerability_alert category actions
Action
Description
create
Triggered when GitHub creates a Dependabot alert for a repository that uses a vulnerable dependency. For more information, see "About Alertas do Dependabot."
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.
repository_vulnerability_alerts category actions
Action
Description
authorized_users_teams
Triggered when an organization owner or a person with admin permissions to the repository updates the list of people or teams authorized to receive Alertas do Dependabot 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 Alertas do Dependabot.
enable
Triggered when a repository owner or person with admin access to the repository enables Alertas do Dependabot.
sponsors category actions
Action
Description
custom_amount_settings_change
Triggered when you enable or disable custom amounts, or when you change the suggested custom amount (see "Managing your sponsorship tiers")
Triggered when an organization owner enables team discussions for an organization.
workflows category actions
Ação
Descrição
cancel_workflow_run
Acionada quando uma execução do fluxo de trabalho foi cancelada. Para obter mais informações, consulte "Cancelando um fluxo de trabalho".
completed_workflow_run
Acionada quando um status de fluxo de trabalho é alterado para concluído. Só pode ser visto usando a API REST; não visível na interface do usuário ou na exportação do JSON/CSV. Para obter mais informações, consulte "Visualizar histórico de execução de fluxo de trabalho".
created_workflow_run
Acionada quando uma execução do fluxo de trabalho é criada. Só pode ser visto usando a API REST; não visível na interface do usuário ou na exportação do JSON/CSV. Para obter mais informações, consulte "Criar um exemplo de um fluxo de trabalho".
Acionada quando um trabalho no fluxo de trabalho é iniciado. Inclui a lista de segredos que foram fornecidos ao trabalho. Só pode ser visto usando a API REST. Não é visível na interface da web de GitHub ou incluído na exportação do JSON/CSV. Para obter mais informações, consulte "Eventos que acionam fluxos de trabalho".
approve_workflow_job
Acionada quando um trabalho no fluxo de trabalho foi aprovado. Para obter mais informações, consulte "Revisando implantações."
reject_workflow_job
Acionada quando um trabalho no fluxo de trabalho foi rejeitado. Para obter mais informações, consulte "Revisando implantações".