[claude] Add Gitea hardening: disable registration + require sign-in (#988) #997

Closed
Rockachopa wants to merge 1 commits from claude/issue-988 into main
Owner

Fixes #988

Summary

  • Added deploy/gitea/app.ini with hardened [service] settings (disable registration, require sign-in)
  • Added scripts/harden_gitea.sh — automated script to apply config changes on the server
    • Backs up existing config before patching
    • Supports bare-metal (systemd) and Docker deployments
    • Verifies settings after restart

Settings applied

[service]
DISABLE_REGISTRATION = true
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
SHOW_REGISTRATION_BUTTON = false
REQUIRE_SIGNIN_VIEW = true

Usage

# Bare-metal
sudo bash scripts/harden_gitea.sh --config /etc/gitea/app.ini

# Docker
sudo bash scripts/harden_gitea.sh --docker gitea-container

Test plan

  • Run script on server to apply config
  • Verify registration page returns error or is hidden
  • Verify /explore redirects to login when not authenticated
  • Verify existing accounts still work
Fixes #988 ## Summary - Added `deploy/gitea/app.ini` with hardened `[service]` settings (disable registration, require sign-in) - Added `scripts/harden_gitea.sh` — automated script to apply config changes on the server - Backs up existing config before patching - Supports bare-metal (systemd) and Docker deployments - Verifies settings after restart ## Settings applied ```ini [service] DISABLE_REGISTRATION = true ALLOW_ONLY_EXTERNAL_REGISTRATION = false SHOW_REGISTRATION_BUTTON = false REQUIRE_SIGNIN_VIEW = true ``` ## Usage ```bash # Bare-metal sudo bash scripts/harden_gitea.sh --config /etc/gitea/app.ini # Docker sudo bash scripts/harden_gitea.sh --docker gitea-container ``` ## Test plan - [ ] Run script on server to apply config - [ ] Verify registration page returns error or is hidden - [ ] Verify `/explore` redirects to login when not authenticated - [ ] Verify existing accounts still work
Rockachopa added 1 commit 2026-03-22 22:39:25 +00:00
fix: add Gitea hardening config and script to disable registration + require sign-in
Some checks failed
Tests / lint (pull_request) Failing after 5s
Tests / test (pull_request) Has been skipped
110f67c567
Adds deploy/gitea/app.ini with hardened [service] settings and
scripts/harden_gitea.sh to apply them on the server. The script
backs up the existing config, patches the four required settings,
restarts Gitea, and verifies the changes.

Settings applied:
- DISABLE_REGISTRATION = true
- ALLOW_ONLY_EXTERNAL_REGISTRATION = false
- SHOW_REGISTRATION_BUTTON = false
- REQUIRE_SIGNIN_VIEW = true

Fixes #988

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Timmy closed this pull request 2026-03-23 15:11:39 +00:00
Owner

[loop-cycle-5] Closing — large feature PR from a previous agent session. Lines of code are a liability. Features need smaller, tested increments. Reopen linked issue if still wanted.

[loop-cycle-5] Closing — large feature PR from a previous agent session. Lines of code are a liability. Features need smaller, tested increments. Reopen linked issue if still wanted.
Some checks failed
Tests / lint (pull_request) Failing after 5s
Tests / test (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#997