Accessing the audit log
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.
- En la esquina superior derecha de GitHub Enterprise, da clic en tu foto de perfil, posteriormente, da clic en Tu perfil.
- En la parte izquierda de tu página de perfil, debajo de "Organizaciones", da clic en el icono de tu organización.
- Debajo de tu nombre de organización, da clic en Configuración.
- En la barra lateral de Parámetros, haz clic en Audit Log (Registro de auditoría).
Searching the audit log
El registro lista la siguiente información sobre cada acción:
- En qué repositorio se realizó una acción
- El usuario que realizó la acción
- La acción que se realizó
- En qué país se realizó la acción
- La fecha y hora en que se produjo la acción
Nota que no puedes buscar entradas utilizando texto. Sin embargo, puedes construir consultas de búsqueda utilizando una variedad de filtros. Muchos operadores que se utilizan cuando se busca el registro por queries, tales como -
, >
, o <
, empatan con el mismo formato que si se busca con GitHub Enterprise. Para obtener más información, consulta la sección "Buscar en GitHub".
Búsqueda basada en el repositorio
Utiliza el calificador repo
para limitar las acciones a un repositorio específico. Por ejemplo:
repo:my-org/our-repo
encuentra todos los eventos que ocurrieron para el repositorioour-repo
en la organizaciónmy-org
.repo:my-org/our-repo repo:my-org/another-repo
encuentra todos los eventos que ocurrieron tanto para los repositoriosour-repo
comoanother-repo
en la organizaciónmy-org
.-repo:my-org/not-this-repo
excluye todos los eventos que ocurrieron para el repositorionot-this-repo
en la organizaciónmy-org
.
Nota que debes incluir el nombre de cuenta dentro del calificador repo
; no funcionará si buscas únicamente repo:our-repo
.
Búsqueda basada en el usuario
El calificador actor
puede incluir eventos que se basen en quién realizó la acción. Por ejemplo:
actor:octocat
encuentra todos los eventos realizados poroctocat
.actor:octocat actor:hubot
encuentra todos los eventos realizados tanto poroctocat
como porhubot
.-actor:hubot
excluye todos los eventos realizados porhubot
.
Ten en cuenta que solo puedes utilizar un nombre de usuario GitHub Enterprise, no el nombre real de una persona.
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 name | Description |
---|---|
discussion_post | Contains all activities related to discussions posted to a team page. |
discussion_post_reply | Contains all activities related to replies to discussions posted to a team page. |
hook | Contains all activities related to webhooks. |
integration_installation_request | Contains all activities related to organization member requests for owners to approve integrations for use in the organization. |
issue | Contains activities related to deleting an issue. |
org | Contains activities related to organization membership. |
organization_label | Contains all activities related to default labels for repositories in your organization. |
oauth_application | Contains all activities related to OAuth Apps. |
profile_picture | Contains all activities related to your organization's profile picture. |
project | Contains all activities related to project boards. |
protected_branch | Contains all activities related to protected branches. |
repo | Contains activities related to the repositories owned by your organization. |
repository_secret_scanning | Contains repository-level activities related to secret scanning. For more information, see "About secret scanning." |
secret_scanning | Contains organization-level configuration activities for secret scanning in existing repositories. For more information, see "About secret scanning." |
secret_scanning_new_repos | Contains organization-level configuration activities for secret scanning for new repositories created in the organization. |
team | Contains all activities related to teams in your organization. |
team_discussions | Contains 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 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. El formato de fecha debe seguir el estándar ISO8601, el cual es YYYY-MM-DD
(año-mes-día). También puedes agregar información de tiempo ocpional THH:MM:SS+00:00
después de la fecha, para buscar por hora, minuto y segundo. Se hace agregando T
, seguido de HH:MM:SS
(hora-minutos-segundos), y un intervalo de UTC (+00:00
).
Las fechas son compatibles con calificadores de mayor qué, menor qué y rango.
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 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.
Using the audit log API
You can interact with the audit log using the GraphQL API.
Note: The audit log GraphQL API is available for organizations using GitHub Enterprise.
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 App GitHub
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."
Audit log actions
An overview of some of the most common actions that are recorded as events in the audit log.
discussion_post
category actions
Action | Description |
---|---|
update | Triggered when a team discussion post is edited. |
destroy | Triggered when a team discussion post is deleted. |
discussion_post_reply
category actions
Action | Description |
---|---|
update | Triggered when a reply to a team discussion post is edited. |
destroy | Triggered when a reply to a team discussion post is deleted. |
hook
category actions
Action | Description |
---|---|
create | Triggered when a new hook was added to a repository owned by your organization. |
config_changed | 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. |
org
category actions
Action | Description |
---|---|
disable_member_team_creation_permission | Triggered when an organization owner limits team creation to owners. For more information, see "Setting team creation permissions in your organization." |
enable_member_team_creation_permission | Triggered when an organization owner allows members to create teams. For more information, see "Setting team creation permissions in your organization." |
invite_member | Triggered when a new user was invited to join your organization. |
remove_member | Triggered when an owner removes a member from an organization. Also triggered when an organization member removes themselves from an organization. |
remove_outside_collaborator | Triggered when an owner removes an outside collaborator from an organization. |
update_new_repository_default_branch_setting | Triggered when an owner changes the name of the default branch for new repositories in the organization. For more information, see "Managing the default branch name for repositories in your organization." |
update_default_repository_permission | 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. |
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 App OAuth is created. |
destroy | Triggered when an existing App OAuth is deleted. |
reset_secret | Triggered when an App OAuth's client secret is reset. |
revoke_tokens | Triggered when an App OAuth's user tokens are revoked. |
transfer | Triggered when an existing App OAuth is transferred to a new organization. |
profile_picture
category actions
Action | Description |
---|---|
update | Triggered when you set or update your organization's profile picture. |
project
category actions
Action | Description |
---|---|
create | Triggered when a project board is created. |
link | Triggered when a repository is linked to a project board. |
rename | Triggered when a project board is renamed. |
update | Triggered when a project board is updated. |
delete | Triggered when a project board is deleted. |
unlink | Triggered when a repository is unlinked from a project board. |
update_org_permission | Triggered when the base-level permission for all organization members is changed or removed. |
update_team_permission | Triggered when a team's project board permission level is changed or when a team is added or removed from a project board. |
update_user_permission | Triggered when an organization member or outside collaborator is added to or removed from a project board or has their permission level changed. |
protected_branch
category actions
Action | Description |
---|---|
create | Triggered when branch protection is enabled on a branch. |
destroy | Triggered 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_policy | Triggered 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. |
repo
category actions
Action | Description |
---|---|
access | Triggered when a user changes the visibility of a repository in the organization. |
add_member | Triggered when a user accepts an invitation to have collaboration access to a repository. |
add_topic | Triggered when a repository admin adds a topic to a repository. |
archived | Triggered when a repository admin archives a repository. |
create | Triggered when a new repository is created. |
destroy | Triggered when a repository is deleted. |
enable | Triggered when a repository is reenabled. |
remove_member | Triggered when a user is removed from a repository as a collaborator. |
remove_topic | Triggered when a repository admin removes a topic from a repository. |
rename | Triggered when a repository is renamed. |
transfer | Triggered when a repository is transferred. |
transfer_start | Triggered when a repository transfer is about to occur. |
unarchived | Triggered when a repository admin unarchives a repository. |
repository_secret_scanning
category actions
Action | Description |
---|---|
disable | Triggered when a repository owner or person with admin access to the repository disables secret scanning for a 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 repository. |
secret_scanning
category actions
Action | Description |
---|---|
disable | Triggered when an organization owner disables secret scanning for all existing repositories. For more information, see "About secret scanning." |
enable | Triggered when an organization owner enables secret scanning for all existing repositories. |
secret_scanning_new_repos
category actions
Action | Description |
---|---|
disable | Triggered when an organization owner disables secret scanning for all new repositories. For more information, see "About secret scanning." |
enable | Triggered when an organization owner enables secret scanning for all new repositories. |
team
category actions
Action | Description |
---|---|
add_member | Triggered when a member of an organization is added to a team. |
add_repository | Triggered when a team is given control of a repository. |
change_parent_team | Triggered when a child team is created or a child team's parent is changed. |
change_privacy | Triggered when a team's privacy level is changed. |
create | Triggered when a new team is created. |
demote_maintainer | Triggered when a user was demoted from a team maintainer to a team member. For more information, see "Giving "team maintainer" permissions to an organization member." |
destroy | Triggered when a team is deleted from the organization. |
team.promote_maintainer | Triggered when a user was promoted from a team member to a team maintainer. For more information, see "Giving "team maintainer" permissions to an organization member." |
remove_member | Triggered when a member of an organization is removed from a team. |
remove_repository | Triggered when a repository is no longer under a team's control. |
team_discussions
category actions
Action | Description |
---|---|
disable | Triggered when an organization owner disables team discussions for an organization. For more information, see "Disabling team discussions for your organization." |
enable | Triggered when an organization owner enables team discussions for an organization. |
workflows
category actions
Action | Description |
---|---|
cancel_workflow_run | Triggered when a workflow run has been cancelled. For more information, see "Canceling a workflow." |
completed_workflow_run | Triggered when a workflow status changes to completed . Can only be viewed using the REST API; not visible in the UI or the JSON/CSV export. For more information, see "Viewing workflow run history." |
created_workflow_run | Triggered when a workflow run is created. Can only be viewed using the REST API; not visible in the UI or the JSON/CSV export. For more information, see "Create an example workflow." |
delete_workflow_run | Triggered when a workflow run is deleted. For more information, see "Deleting a workflow run." |
rerun_workflow_run | Triggered when a workflow run is re-run. For more information, see "Re-running a workflow." |
prepared_workflow_job | Triggered when a workflow job is started. Includes the list of secrets that were provided to the job. Can only be viewed using the REST API; not visible in the UI or the JSON/CSV export. For more information, see "Events that trigger workflows." |