In the fast-paced ecosystem of modern software development, the "outside collaborator" is a double-edged sword. While these partnerships—ranging from professional service engagements to product trials—are essential for innovation and growth, they introduce a persistent administrative burden. Repository owners must constantly monitor who retains access, update permissions as project scopes shift, and identify stale repositories that have outlived their utility.
At scale, this manual housekeeping becomes a bottleneck. It is the type of work that is easy to defer, yet dangerous to ignore from a security standpoint. Recognizing this, GitHub engineers developed Evergreen, an internal tool that transforms routine organization hygiene from a dreaded chore into an automated, reliable, and "fail-secure" process. By leveraging native GitHub features, the team created a blueprint for organizations to maintain security posture without adding friction to the developer experience.
The Philosophy of "Evergreen": Fail-Secure by Design
The development of Evergreen was guided by two uncompromising design principles: "Fail-secure" and "Never destroy anything."
In traditional manual workflows, if a repository owner forgets to audit permissions, excessive access persists indefinitely. Evergreen flips this paradigm. If a collaborator fails to respond to an access review, the system does not "hope for the best"; it defaults to revocation. This ensures that the organization remains secure by default.
Simultaneously, the system respects the reality that human error is inevitable. Evergreen never permanently deletes data. Archived repositories remain fully recoverable, and every access change is meticulously documented within a repository’s tracking issue. This transparency allows for rapid remediation—a "copy-paste" fix that even GitHub Copilot can assist with, should a mistake occur.

A Chronology of Maintenance: The Controller’s Cadence
At its core, Evergreen is a Go-based webhook server running within a container. However, its true ingenuity lies in its "choreography"—the way it orchestrates native GitHub features like scheduled actions, webhooks, and custom properties.
The system utilizes a central "controller repository" that acts as the organization’s clock and memory. This controller triggers four distinct workflows on a quarterly cadence, creating a predictable cycle of maintenance:
- Day 1 (Stale Repo Review): The system scans for repositories showing no recent human activity, automatically opening a "warning issue" to alert owners.
- Day 8 (Access Review): The system captures a snapshot of all outside collaborators and generates a checklist issue for each repository.
- Day 16 (Stale Repo Cleanup): Repositories that remained stagnant throughout the grace period are archived.
- Day 23 (Access Cleanup): The system executes the revocation of any access that was not explicitly renewed by the repository owners.
This cadence provides a two-week window for human intervention, ensuring that no action is taken without ample opportunity for review. Furthermore, the system supports workflow_dispatch, allowing administrators to trigger any phase of the process manually if an emergency arises.
Supporting Data: State You Can git blame
One of the most elegant features of Evergreen is its approach to state management. Rather than relying on an external database or a complex, opaque audit pipeline, Evergreen records the status of every repository as a JSON file, committed directly to the controller repository.
This design choice turns the Git commit history into the ultimate audit trail. By using git log, an engineer can trace the entire lifecycle of a collaborator’s access—from the initial snapshot to the final decision. This is not merely a technical convenience; it is a profound shift in organizational transparency. It ensures that every decision regarding access or archival is linked to a specific moment in time and a specific decision-maker.

The Mechanics of "Issue-Ops"
Evergreen communicates exclusively through the interface developers already use: the GitHub issue. When an access review begins, the repository owner is presented with a simple checklist. The instruction is intuitive: "Check the boxes for who stays, then close the issue."
When the issue is closed, the system captures the issues.closed webhook event, parses the remaining checkboxes, and performs the necessary API calls to prune access. It then leaves a "receipt comment" detailing exactly what was retained and what was removed.
To prevent unauthorized access changes, Evergreen includes a robust verification layer. If an individual who lacks the proper permissions attempts to close a review issue, the application immediately reopens it and provides a clarifying comment. This "guardrail" ensures that only authorized personnel can make security-impacting decisions.
Solving the Ownership Problem
A common challenge in large-scale organizations is identifying the correct point of contact for a repository. Evergreen solves this through a sophisticated "fallback chain." If the primary owner is unavailable or undefined, the system automatically traverses team associations and metadata to find the appropriate stakeholder. This eliminates the need for maintaining cumbersome, error-prone spreadsheets of "who owns what," ensuring that the right people are always notified at the right time.
Implications for Large-Scale Organizations: Lessons from the Rollout
Rolling out such an automation tool across an organization with over 1,400 employees and thousands of external partners requires extreme caution. The team implemented several strategies to ensure a seamless deployment:

- Dry-Run Mode: Before any actual changes were made, Evergreen was run in a
DRY_RUNmode. This allowed the engineering team to monitor the logs and ensure the system’s logic aligned with organizational policies. - Overcommunication: The team recognized that in large organizations, information requires repetition. They broadcasted the impending changes across multiple channels to ensure that no developer was caught off guard by an automated archive or revocation.
- Observability: By emitting structured
logfmtlogs into a dedicated Splunk index, the team could identify edge cases—such as repositories with unusual configurations—and refine the logic before they impacted the wider user base. - Platform Awareness: Automation at scale must respect API rate limits. Evergreen was designed with "proactive avoidance," pacing its requests and utilizing batches to ensure it never triggers secondary rate limits.
The Future of Repository Hygiene
The success of Evergreen highlights a critical shift in how modern software organizations should view maintenance. Rather than viewing repository hygiene as a task to be performed during "heroic" cleanup sprints, it should be integrated into the daily flow of development.
The core lesson from the GitHub team is that you do not need exotic tools to solve complex administrative problems. By leveraging the native capabilities of the platform—using issues as the interface, Git as the database, and Actions as the engine—organizations can create systems that are not only effective but also user-friendly and transparent.
For any organization struggling with the bloat of stale repositories and unmanaged collaborator access, the message is clear: stop treating hygiene as a one-off event. By building or adopting a "friendly" automation that provides clear instructions and easy undo buttons, companies can maintain a secure, organized, and efficient development environment. As GitHub has demonstrated, the path to a cleaner organization is found by making the "boring, safe thing" the easiest path for everyone to follow.







