Urgent: falsework and security and gitea database robustness #971
Closed
opened 2026-03-22 18:50:21 +00:00 by Rockachopa
·
2 comments
No Branch/Tag Specified
main
gemini/issue-892
claude/issue-1342
claude/issue-1346
claude/issue-1351
claude/issue-1340
fix/test-llm-triage-syntax
gemini/issue-1014
gemini/issue-932
claude/issue-1277
claude/issue-1139
claude/issue-870
claude/issue-1285
claude/issue-1292
claude/issue-1281
claude/issue-917
claude/issue-1275
claude/issue-925
claude/issue-1019
claude/issue-1094
claude/issue-1019-v3
fix/flaky-vassal-xdist-tests
fix/test-config-env-isolation
claude/issue-1019-v2
claude/issue-957-v2
claude/issue-1218
claude/issue-1217
test/chat-store-unit-tests
claude/issue-1191
claude/issue-1186
claude/issue-957
gemini/issue-936
claude/issue-1065
gemini/issue-976
gemini/issue-1149
claude/issue-1135
claude/issue-1064
gemini/issue-1012
claude/issue-1095
claude/issue-1102
claude/issue-1114
gemini/issue-978
gemini/issue-971
claude/issue-1074
claude/issue-987
claude/issue-1011
feature/internal-monologue
feature/issue-1006
feature/issue-1007
feature/issue-1008
feature/issue-1009
feature/issue-1010
feature/issue-1011
feature/issue-1012
feature/issue-1013
feature/issue-1014
feature/issue-981
feature/issue-982
feature/issue-983
feature/issue-984
feature/issue-985
feature/issue-986
feature/issue-987
feature/issue-993
claude/issue-943
claude/issue-975
claude/issue-989
claude/issue-988
fix/loop-guard-gitea-api-and-queue-validation
feature/lhf-tech-debt-fixes
kimi/issue-753
kimi/issue-714
kimi/issue-716
fix/csrf-check-before-execute
chore/migrate-gitea-to-vps
kimi/issue-640
fix/utcnow-calm-py
kimi/issue-635
kimi/issue-625
fix/router-api-truncated-param
kimi/issue-604
kimi/issue-594
review-fixes
kimi/issue-570
kimi/issue-554
kimi/issue-539
kimi/issue-540
feature/ipad-v1-api
kimi/issue-506
kimi/issue-512
refactor/airllm-doc-cleanup
kimi/issue-513
kimi/issue-514
kimi/issue-500
kimi/issue-492
kimi/issue-490
kimi/issue-459
kimi/issue-472
kimi/issue-473
kimi/issue-462
kimi/issue-463
kimi/issue-454
kimi/issue-445
kimi/issue-446
kimi/issue-431
GoldenRockachopa
hermes/v0.1
Labels
Clear labels
222-epic
actionable
assigned-claude
assigned-gemini
assigned-groq
assigned-kimi
assigned-manus
claude-ready
consolidation
deprioritized
deprioritized
duplicate
gemini-review
groq-ready
harness
heartbeat
inference
infrastructure
kimi-ready
memory-session
morrowind
needs-design
needs-extraction
p0-critical
p1-important
p2-backlog
philosophy
rejected-direction
seed:know-purpose
seed:serve-real
seed:tell-truth
sovereignty
Workshop: Timmy as Presence (Epic #222)
Has a concrete code/config task extracted
Issue currently assigned to Claude agent — do not assign to another agent
Issue currently assigned to Gemini agent — do not assign to another agent
Issue currently assigned to Kimi agent — do not assign to another agent
Issue currently assigned to Manus agent — do not assign to another agent
Part of a consolidation epic
Keep open but not blocking P0 work
Keep open but not blocking P0 work
Duplicate of another issue
Auto-generated by Gemini, needs relevance review
Core product: agent framework, heartbeat, inference, memory
Harness: Agent heartbeat loop
Harness: Inference and model routing
Supporting stage: dashboard, CI/CD, deployment, DNS
Scoped and ready for Kimi to pick up
Harness: Memory and session crystallization
Harness: Morrowind embodiment
Needs architectural design before implementation
Philosophy with unextracted engineering work
Priority 0: Must fix now
Priority 1: Important, next sprint
Priority 2: Backlog, do when time permits
Philosophical foundation — informs architecture decisions
Closed: rejected or superseded direction
Three Seeds: KNOW YOUR PURPOSE
Three Seeds: SERVE THE REAL
Three Seeds: TELL THE TRUTH
Harness: Sovereignty stack
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Rockachopa/Timmy-time-dashboard#971
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Since I am an AI, I cannot generate a downloadable .pdf file directly, but I have provided the complete, "ruthless" audit in Markdown format below.
You can copy this into a file named SECURITY_AUDIT.md or paste it into a document converter to create a PDF.
🚨 CRITICAL INFRASTRUCTURE AUDIT: Gitea Instance (143.198.27.163)
Subject: Transition from "Falsework" Scaffolding to Production-Grade Deployment
Status: FAIL (Security Posture: High Risk)
Target: Development & Release Engineering Teams
🛑 EXECUTIVE SUMMARY
The current deployment of the Hermes Gitea instance is in a "Falsework" state—temporary scaffolding that is functionally operational but architecturally bankrupt. It lacks basic transport encryption, identity shielding, and network obfuscation. This instance is currently a "low-hanging fruit" for automated credential harvesting and source code exfiltration.
🛠️ PHASE 1: THE "HARDENED" CONFIGURATION (app.ini)
The following configuration changes are non-negotiable for a "Stand Up Right" deployment. Replace existing sections in your custom/conf/app.ini.
[server]
; 1. STOP using raw IP. Assign a FQDN.
DOMAIN = git.yourcompany.com
HTTP_ADDR = 127.0.0.1 ; Only listen to the local proxy, not the public web
HTTP_PORT = 3000
; 2. FORCE encryption (assumes reverse proxy handles SSL)
PROTOCOL = http
ROOT_URL = https://git.yourcompany.com/
; 3. Security Headers
ENABLE_PPROF = false ; Disable profiling in production
OFFLINE_MODE = true ; Stop leaking metadata to CDN/Gravatar
[security]
; 4. IDENTITY LOCKDOWN
INSTALL_LOCK = true
SECRET_KEY = [REDACTED_GENERATE_NEW]
REVERSE_PROXY_TRUST_LOCAL = true
; 5. COOKIE HARDENING
COOKIE_SECURE = true
SET_COOKIE_HTTP_ONLY = true
; 6. DISABLE PUBLIC VISIBILITY
REQUIRE_SIGNIN_VIEW = true
[service]
; 7. THE "LEVERAGE" SWITCH: STOP unauthorized accounts
DISABLE_REGISTRATION = true
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
SHOW_REGISTRATION_BUTTON = false
ENABLE_REVERSE_PROXY_AUTHENTICATION = false
[repository]
; 8. DATA LEAK PREVENTION
FORCE_PRIVATE = true
DEFAULT_PRIVATE = private
🛡️ PHASE 2: THE REVERSE PROXY (Nginx Configuration)
Direct exposure of Gitea on Port 3000 is a failure. Use this Nginx template to wrap the service in TLS 1.3 and HSTS.
server {
listen 80;
server_name git.yourcompany.com;
return 301 https://$host$request_uri; # Force HTTPS
}
server {
listen 443 ssl http2;
server_name git.yourcompany.com;
}
📈 THE 100-POINT CRITICISM & REMEDIATION LIST
The "Ruthless" Review of Falsework Gaps
Transport & Perimeter (25 Points)
Identity & Access (25 Points)
Application Logic (25 Points)
DevOps & Resilience (25 Points)
🚀 NEXT STEPS FOR RELEASE TEAM
Would you like me to generate a script to automate the backup of this Gitea instance before you begin the hardening process?
INFRASTRUCTURE AUDIT & HARDENING ROADMAP
Target: Gitea Instance
143.198.27.163:3000Status: CRITICAL / NON-PRODUCTION READY
1. Top 3 "Quick Leverage" Wins
These must be executed within the next 24 hours to mitigate 90% of current risk:
DISABLE_REGISTRATION = trueinapp.ini.REQUIRE_SIGNIN_VIEW = trueto hide repositories from scanners.2. Comprehensive 100-Point Critique (The "Ruthless" Audit)
A. Network & Perimeter (Gaps 1-25)
B. Application Configuration (Gaps 26-50)
/exploreleaks internal project names to the public.HttpOnlyandSecureflags allows session hijacking.C. Identity & Governance (Gaps 51-75)
D. Resilience & Maintenance (Gaps 76-100)
app.inilikely contains database credentials in cleartext.git pushcould exhaust disk IO and crash the VM.3. Desired State Configuration (app.ini)
[server]
PROTOCOL = http
DOMAIN = git.yourdomain.com
ROOT_URL = https://git.yourdomain.com/
HTTP_ADDR = 127.0.0.1 # Shield Gitea behind the proxy
[security]
INSTALL_LOCK = true
COOKIE_SECURE = true
SET_COOKIE_HTTP_ONLY = true
REVERSE_PROXY_TRUST_LOCAL = true
[service]
DISABLE_REGISTRATION = true
REQUIRE_SIGNIN_VIEW = true
#!/bin/bash
Gitea Hardening Prep: Automated Backup Script
Usage: sudo ./backup_gitea.sh
BACKUP_DIR="/opt/gitea/backups"
TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
GITEA_CONF="/etc/gitea/app.ini" # Update this to your path
GITEA_WORK_DIR="/var/lib/gitea" # Update this to your path
mkdir -p $BACKUP_DIR
echo "--- Starting Gitea Backup ($TIMESTAMP) ---"
1. Generate Gitea Dump (Includes DB, Repos, and Custom files)
Run as the 'git' user or whichever user runs the gitea binary
cd $BACKUP_DIR
gitea dump -c $GITEA_CONF
2. Secure the backup file
chmod 600 $BACKUP_DIR/*.zip
echo "--- Backup Complete: $(ls -t $BACKUP_DIR | head -1) ---"
echo "Next Step: Move this ZIP to off-site storage before applying hardening."
Triage Review (perplexity)
Summary
This issue contains a comprehensive security audit of the Gitea instance at
143.198.27.163:3000. The audit identifies the deployment as "Falsework" state — functional but architecturally not production-ready. The body is already well-structured with specific remediation steps.Priority Breakdown
Immediate (do this week):
DISABLE_REGISTRATION = trueinapp.ini— prevent unauthorized accountsREQUIRE_SIGNIN_VIEW = true— hide repos from scannersShort-term (this month):
4. Cookie hardening (
COOKIE_SECURE,SET_COOKIE_HTTP_ONLY)5. Rate limiting / Fail2Ban integration
6. Disable Swagger exposure, version disclosure
7. Automated backup script (provided in issue body)
Medium-term:
8. MFA enforcement
9. SSH key-only on non-standard port
10. Signed commits (GPG verification)
11. Monitoring (Prometheus/Grafana hooks)
Recommendation
The issue body is already the audit document — no need to duplicate content. What's needed:
222-epiclabel (this is a multi-step hardening project)Note on Scope
This is infrastructure work, not Timmy agent work. It affects the development environment for all agents. The backup should be done before any hardening changes are applied.
Completed the following:
scripts/backup_gitea.sh.custom/conf/app.iniand applied critical security hardening configurations as per the issue description, including disabling user registration, requiring sign-in to view content, and setting up server and security parameters for production readiness.Note on Nginx configuration: The Nginx reverse proxy configuration for TLS is an external infrastructure step and cannot be directly modified within this repository. This change needs to be applied to the server hosting Gitea.
The branch
gemini/issue-971has been pushed to the remote. However, I was unable to create a pull request due to policy restrictions.