GitHub audit logs should be archived
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 48
- Forks
- 36
- Avg merge
- 2m
- Merged PRs (30d)
- 3
Description
GitHub audit logs only go back 180 days. As we discovered during the response to GHSA-67f2-674w-6g63, that can be exceptionally inconvenient when a long‐dormant security risk comes to light.
GitHub Enterprise lets us stream audit logs to S3 for long‐term storage. It seems like it shouldn’t be hard for @NixOS/org and @NixOS/infra to arrange to get these stored for the long term. I believe we should also consider enabling audit log streaming of security‐sensitive API requests.
I expect that the size of these logs will not be significant compared to the growth of the cache; if it is, we could look into doing some kind of filtering, or potentially use the audit log API to cook up a custom solution.
Additionally, only org owners have any access to the audit logs, which can slow down incident response and reduces transparency. Given the wide importance of repositories in the NixOS organization, I think it would make sense for at least the security team to have access to the S3 bucket, but even better would be if we had publicly‐accessible logs for at least a subset of actions by privileged users (e.g. at least org owners, probably repository admins, perhaps even committers in general?). These should of course be filtered to remove personal information like location. This would make it easier to ensure that org owner actions are logged publicly as required, and reduce the toil in doing so.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with doc/github-org-owners.md and the linked GitHub Enterprise audit-log streaming and API documentation. Coordinate with @NixOS/org and @NixOS/infra to define storage, access, filtering, and retention requirements for S3 archives. Done means an agreed implementation and documented policy for security-team or public access.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, github
- Domain
- cloud, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100