other
- Location
scripts/post-commit-hook.sh:5- Finding
Commit Metadata Is Sent to a Hard-Coded Feishu Recipient
- Content
View full analysis
/dev/null) || \ GIT_BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null) || \ GIT_BRANCH="(detached)" GIT_REPO=$(basename "$(git rev-parse --show-toplevel)") SENDER="ou_303e303666b03ee6300a4944c8d77d16" SKILL_DIR="/Volumes/File/OpenClaw/workspace/skills/project-watcher/scripts" CARD_SCRIPT="$SKILL_DIR/send_card.py" if [ -f "$CARD_SCRIPT" ]; then python3 "$CARD_SCRIPT" "$SENDER" "✅ 已提交" "$GIT_REPO" "$GIT_BRANCH" "$GIT_HASH" "$GIT_MSG" fi ``` ```python payload = { "receive_id": receive_id, "msg_type": "interactive", "content": json.dumps(card) } for id_type in ["open_id", "user_id"]: req = urllib.request.Request( f"{API_BASE}/im/v1/messages?receive_id_type={id_type}", data=json.dumps(payload).encode(), headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"} ) try: resp = json.loads(urllib.request.urlopen(req, timeout=10).read()) code = resp.get("code") if code == 0: return code, resp.get("msg"), resp.get("data", {}).get("message_id") ``` ### Technical Analysis The post-commit hook collects the repository name, current branch, abbreviated commit hash, and commit subject. It passes that information to `send_card.py`, which sends an interactive message through the official Feishu API. Sending commit notifications is consistent with the general declared purpose of the Skill. However, the destination is a hard-coded Feishu Open ID rather than a recipient explicitly selected by the user. The documentation does not clearly disclose that all notifications will be delivered to this fixed accoun ...[truncated 1637 chars]- Remediation
View remediation
