feat: enforce dot-prefixed repos as always private #75

Closed
opened 2026-05-13 00:13:15 +00:00 by jmiller · 1 comment
Owner

Summary

Repositories with names starting with . (dot repos) should be treated as system/internal repos and always enforced as private. No user, including admins, should be able to make them public.

Requirements

  • Force IsPrivate=true at creation time for dot-prefixed repo names in services/repository/create.go
  • Block visibility changes to public for dot repos in services/repository/repository.go (MakeRepoPrivate() and updateRepository())
  • Apply enforcement in all creation paths: API create, web create, push-create, migration, fork
  • Return a clear error message when attempting to make a dot repo public
  • Add tests for the enforcement

Context

Dot-prefixed repos (e.g. .profile, .github) are considered system repos. Making them public could expose internal configuration or workflows unintentionally.


Authored-by: Moko Consulting

## Summary Repositories with names starting with `.` (dot repos) should be treated as system/internal repos and always enforced as private. No user, including admins, should be able to make them public. ## Requirements - [ ] Force `IsPrivate=true` at creation time for dot-prefixed repo names in `services/repository/create.go` - [ ] Block visibility changes to public for dot repos in `services/repository/repository.go` (`MakeRepoPrivate()` and `updateRepository()`) - [ ] Apply enforcement in all creation paths: API create, web create, push-create, migration, fork - [ ] Return a clear error message when attempting to make a dot repo public - [ ] Add tests for the enforcement ## Context Dot-prefixed repos (e.g. `.profile`, `.github`) are considered system repos. Making them public could expose internal configuration or workflows unintentionally. --- *Authored-by: Moko Consulting*
Author
Owner

Completed

Dot-prefixed repos are enforced as always-private in the MokoGitea v1.26.1 build.

This was part of the upstream merge (commit 96eb394a17).

Verified in production: v1.26.1+244

Authored-by: Claude Opus 4.6 (1M context)

## Completed Dot-prefixed repos are enforced as always-private in the MokoGitea v1.26.1 build. This was part of the upstream merge (commit 96eb394a17). Verified in production: v1.26.1+244 *Authored-by: Claude Opus 4.6 (1M context)*
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoGitea#75