Guide
GitHub Audit Log: How to Use It in an Access Review
What the GitHub audit log records, who can open it, how to search and export it, what it leaves out, and how to use it in a user access review.
Part of the guide User Access Review: How to Run One, Step by Step
Your auditor picked GitHub for a sample and asked two things: who was given access since the last review, and did the removals from that review really happen. Both answers can come from the GitHub audit log, as long as the events are less than 180 days old or you exported them earlier. This guide explains what the log records, how to search and export it, what it leaves out, and how it fits into a user access review.
The GitHub audit log is an organization’s record of events, mostly changes, from the last 180 days: who joined or left, whose role changed, which team got which repository, and who did it, when. Only organization owners can open it, under Settings, then Logs. It shows changes, not who has access today.
A few GitHub words come up on this page:
- An organization is a shared GitHub account for a company or a team. Its repositories, people and teams live under it.
- An owner is a person with full administrative access to the organization.
- An outside collaborator has access to one or more of the organization’s repositories without being a member of it.
- A team is a group of members. Giving a team access to a repository gives it to everyone in the team.
- An event is one line in the audit log. Its name is a category and an operation, such as
team.add_member.
What the GitHub audit log records
GitHub’s page on reviewing the audit log for your organization says each entry can show the organization, the person who acted (the actor), the person affected, the repository, the action, the country it came from, and the date and time.
The log covers far more than access: billing, webhooks, security alerts, Copilot and more. For an access review, a short list of events matters. GitHub’s list of audit log events for an organization describes each one. These are the ones to know:
| Event | What GitHub says it records | Why it matters in a review |
|---|---|---|
| org.invite_member | A new user was invited to join the organization. | Who invited each new member, and when. |
| org.add_member | A user joined the organization. | Every new member since the last review. |
| org.remove_member | A member was removed, by hand or because of a two-factor authentication requirement. | That a removal you decided on was made, and when. |
| org.update_member | A role changed from owner to member, or from member to owner. | Who became an owner, and who made them one. |
| org.add_outside_collaborator | An outside collaborator was added to a repository. | People outside the company who got access. |
| org.remove_outside_collaborator | An outside collaborator was removed from the organization. | Removals of people outside the company. |
| repo.add_member, repo.update_member | A collaborator was added to a repository, or their permission to it changed. | Direct grants on one repository, which the team pages do not show. |
| team.add_member, team.add_repository | A member was added to a team, or a team was given access to a repository. | Access that arrives through a team, which the person may not know they have. |
| team.change_parent_team | A child team was created, or a child team's parent was changed. | Access passed down from a parent team to the teams under it. |
| organization_role.assign | An organization role was assigned to a user or a team. | Powers across the organization given without making someone an owner. |
| team.update_repository_permission | A team's permission to a repository changed. | A team raised to Admin or Write. |
| org.update_default_repository_permission | The base permission for all members changed. | One change that gives every member more, or less, access. |
| integration_installation.create | A GitHub App was installed. | Programs that got access, which need an owner too. |
| personal_access_token.access_granted | A fine-grained personal access token was granted access to resources. | Tokens that reach the organization's repositories. |
The GitHub collaborator permissions guide explains the roles these events grant, from Read to Admin, and where a person’s access can come from.
How to open the GitHub audit log
Owners can open the organization audit log. The path, from GitHub’s page:
- In the upper-right corner of GitHub, click your profile picture, then click Organizations.
- Click the organization.
- Under its name, click Settings. If you do not see the tab, open the dropdown menu and click Settings.
- In the “Archive” section of the sidebar, click Logs, then Audit log.
The page opens on the last three months. Older events, up to 180 days back, appear only when you add a date range with the created qualifier.
How to search the audit log
You cannot search the audit log for free text, such as a person’s real name. You build a query from qualifiers instead. GitHub documents these:
action:an event or a whole category.action:teamfinds every team event.action:team.add_memberfinds one kind.actor:the GitHub username of the person who acted. A real name does not work.repo:one repository, always with the organization in front:repo:my-org/payments.repo:paymentsalone finds nothing.created:a date or a range, writtenYYYY-MM-DD.created:>=2026-06-01means on or after that day.created:2026-06-01..2026-11-30means between the two.operation:a type of change, such ascreate,modify,removeoraccess.country:where the action came from, as a two-letter code or a full name.
A minus sign in front excludes: -actor:octocat leaves out everything that account did. Here are queries a reviewer can paste. The organization name and the dates are an example: use your own.
| Question | Query |
|---|---|
| Who joined since the last review? | action:org.add_member created:>=2026-06-01 |
| Whose role changed between owner and member? | action:org.update_member created:>=2026-06-01 |
| Which outside collaborators were added? | action:org.add_outside_collaborator created:>=2026-06-01 |
| Whose permission on one repository changed? | repo:my-org/payments action:repo.update_member |
| Which teams got new repositories? | action:team.add_repository created:>=2026-06-01 |
| Were the removals made? | action:org.remove_member created:>=2026-11-01 |
| What did one admin change? | actor:jsmith created:>=2026-06-01 |
What the GitHub audit log does not tell you
The log is useful, and it is easy to ask too much of it. Five limits to keep in mind:
- It is not a list of who has access. It records changes. Someone who was added two years ago and never touched since does not appear in any recent event, yet still has access. The list of who has access today comes from the People page and each repository’s settings.
- It forgets after 180 days. An addition made before that window is gone from the log. If your reviews are six months apart, the start of the period you are reviewing may already be out of reach on the day you review. Export at least every few months, so that no stretch of more than 180 days goes unexported, and keep the files.
- It does not say why. An
org.add_memberevent names who added the person, not who approved it or for what reason. Match each addition to the request or ticket where someone said yes. - It is not a good record of use. It does not tell you when each person last used their access. GitHub’s events page says that on GitHub Enterprise Cloud, Git events such as clones and pushes are kept for seven days, and they are not shown in the web page, only through the API, streaming or exports.
- Only owners see it, by default. On GitHub Enterprise Cloud, an owner can give your compliance lead a custom organization role with the View organization audit log permission. Otherwise an owner has to run the searches and send the exports.
How to use the audit log in a user access review
The review itself starts from the current list. The audit log then answers the two questions an auditor tends to ask about it: was each new access asked for, and was each removal made. Here is how the two fit together.
- Take the current list first. On the organization’s People page, the Export menu downloads a CSV or JSON file of every member, with whether each one is an owner and has two-factor authentication on. Add the outside collaborators and each repository’s people and teams. The collaborator permissions guide has a script for that list.
- Find every change since the last review. Search each of these with
created:>=and the day of your last review:action:org.add_member,action:org.update_member,action:org.add_outside_collaborator,action:repo.add_member,action:repo.update_member,action:team.add_member,action:team.add_repository,action:team.update_repository_permission,action:team.change_parent_team,action:organization_role.assignandaction:org.update_default_repository_permission. Export each result. - Match each addition to an approval. For every person added or raised to owner, find the request where someone approved it. An addition with no approval is a finding for the reviewer, even if the access is fine today.
- Send the current list to the reviewers. Each manager or repository owner decides keep or remove for each line. The audit log helps them here: it shows who added an access and when, which often tells the reviewer why it exists.
- Make the removals at their source. Your GitHub admins remove the person, the team membership or the direct grant that gave the access.
- Check the removals in the log. Search
action:org.remove_member,action:org.remove_outside_collaborator,action:repo.remove_member,action:team.remove_memberandaction:team.remove_repositoryfrom the day the decisions were made, andaction:repo.update_memberandaction:team.update_repository_permissionfor access you decided to lower. Each removal you decided on should have its event. Then take the current list again to see that the access is gone, because a person can keep access through a second route, such as another team. - Keep the files together. Save the first list, the decisions with who made them and when, the audit log exports and the second list. That set is the evidence pack an auditor asks for.
Watch for people the log shows as removed from a team but who are still in the organization. Their base permission may still reach every repository. And watch for outside collaborators whose contract ended: they often sit outside your leaver process, and if nobody removes them, they become an orphaned account.
How to export the audit log
On the audit log page, search first to narrow the events, then open the Export menu and choose JSON or CSV. GitHub says the search qualifiers action, actor, user, org, repo and created apply to the export. Other parts of a query, such as operation:, country: or a minus sign, are not on that list, so open the file and check it holds what you expect. An export stops at a 100 MB compressed file or 10 minutes of processing, so a filtered export is the safer one.
Each event in the file has keys such as action, actor, user (the person affected), org, repo, actor_location.country_code, created_at and a few data. fields. The created_at value is a timestamp in milliseconds since 1 January 1970, not a date. In a spreadsheet, with the value in A2, =A2/86400000+DATE(1970,1,1) gives the date and time in UTC once you format the cell as a date.
Write on each export the query you ran and the day you ran it. An auditor who sees an export with no query cannot tell what was left out.
Reading the audit log with the API
GitHub says organizations on GitHub Enterprise Cloud can also read the audit log through the REST and GraphQL APIs. The REST endpoint takes the same search phrase, returns up to 100 events a page, and needs an owner’s token: a classic token needs the read:audit_log scope, a fine-grained one the organization’s Administration permission, read. This example, for the engineer who runs the export, lists the members added since a date as tab-separated text, with the date and time in UTC:
ORG=my-org
gh api -X GET --paginate "orgs/$ORG/audit-log" \
-f phrase='action:org.add_member created:>=2026-06-01' -F per_page=100 \
--jq '.[] | [(.created_at / 1000 | floor | todate), .action, .actor, .user] | @tsv'
It only reads. It uses the GitHub CLI, logged in as an owner. Change the phrase to run any query from the table above. The API returns Git events only when you add -f include=git or -f include=all. On an organization that is not on Enterprise Cloud, the web page and its export are the way to get the events.
How often to review, and how long to keep the log
SOC 2 and ISO 27001 set no interval for access reviews: your access control policy sets one. If PCI DSS applies to your GitHub organization, PCI DSS v4.0.1 requirement 7.2.4 says user accounts and access privileges are reviewed at least once every six months. The PCI DSS user access review guide reads that requirement line by line.
Whatever the interval, the log keeps 180 days. If you want the history of a full review period, export the access events at least every few months and keep them with your review records. On GitHub Enterprise Cloud, enterprise owners can also stream the audit log to a storage or logging system of their own, where it lasts as long as that system keeps it.
Where Acciew fits
Acciew, in early access, runs the listing and asking steps of this review for GitHub organizations, and for Keycloak and AWS. It reads the current members, the teams and who is in them, and which people and teams have access to each repository and at what level, then sends each manager a link to their own short list. It only reads, so removing access, and checking the audit log after, stays with your admins.
Have an access review coming up?
Acciew is in early access. We are looking for design partners: teams with a user access review ahead of them.
Apply as a design partnerQuestions and answers
How long does GitHub keep the organization audit log?
GitHub lists the events of the last 180 days. The web page shows the last three months by default, and you reach older events by adding a created date range to your search. On GitHub Enterprise Cloud, Git events such as clones and pushes are kept for seven days only. Export what you need before it ages out.
Who can see the GitHub audit log of an organization?
Organization owners. On GitHub Enterprise Cloud, an owner can also give someone a custom organization role with the View organization audit log permission, so a compliance lead can read the log without being an owner. Otherwise an owner has to run the searches and exports for the person running your review.
How do I check the audit log for one repository?
Search the organization audit log with the repo qualifier, written with the organization name in front, such as repo:my-org/payments. Searching repo:payments alone does not work. Add an action, such as action:repo.update_member, to see only the permission changes on that repository.
Can I export the GitHub audit log?
Yes. On the audit log page, search first to narrow the events, then choose JSON or CSV from the Export menu. An export stops at a 100 MB compressed file or 10 minutes of processing, so filter by action and date before you export.
Does the GitHub audit log show who currently has access?
No. It records changes: who was added, removed or given a new role, by whom and when. To know who has access today, export the member list from the People page and list each repository's collaborators and teams. Use the audit log to explain how that list came to be.
This guide is part of User Access Review: How to Run One, Step by Step. Read the whole guide there.