Ensure inactive repositories are archived

Framework Reference: A.8.9 (Configuration Management) Integration: GitHub – Repository Management

Why this matters

Inactive repositories often contain outdated code, unpatched dependencies, and old configurations that no longer meet current security standards.
Unmaintained repositories can also become attack vectors if they reference deprecated packages, contain exposed credentials, or are forked and reused without review.

Archiving inactive repositories ensures that:

  • Only actively maintained codebases remain modifiable
  • Security and dependency management efforts focus on relevant projects
  • Outdated repositories are clearly marked as read-only, reducing accidental updates or use

Without archiving, dormant repositories may persist unnoticed, creating unnecessary risk and maintenance overhead.


What this check does

This check identifies repositories with no recent activity (such as commits, pull requests, or issues) and verifies whether they are archived in GitHub.
A repository is considered archived if the “Archive this repository” setting is enabled.
Archived repositories become read-only and cannot be pushed to or modified, preserving their state for reference.


How to fix it

From the GitHub Web Console

  1. Go to the repository on GitHub.
  2. Navigate to Settings → General.
  3. Scroll to the Danger Zone section.
  4. Click Archive this repository.
  5. Confirm by clicking I understand the consequences, archive this repository.

After archiving, the repository becomes read-only. You can unarchive it later if active development resumes.

From the GitHub REST API (Optional)

You can also archive a repository via the API:

PATCH /repos/{owner}/{repo} {  "archived": true }


Exceptions

  • Repositories that are still used for documentation, CI templates, or dependency references should not be archived until verified.
  • Archiving removes write permissions; only administrators can unarchive a repository if future changes are required.
  • Automated archiving based on inactivity thresholds should include manual review to avoid disrupting active workflows.

Further Resources

 

Was this article helpful?