Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🪤 chore: Prevent CI Path Argument Injection (#13284)
Danny Avilaa7c18f54f734
diff --git a/.github/workflows/eslint-ci.yml b/.github/workflows/eslint-ci.ymlindex f03e88a7a7..85de6fa18e 100644--- a/.github/workflows/eslint-ci.yml+++ b/.github/workflows/eslint-ci.yml@@ -44,14 +44,17 @@ jobs:echo "Base commit SHA: $BASE_SHA"# Get changed files (only JS/TS files in api/, client/, or packages/)- CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "$BASE_SHA" HEAD | grep -E '^(api|client|packages)/.*\.(js|jsx|ts|tsx)$' || true)+ mapfile -d '' -t CHANGED_FILES < <(+ git diff -z --name-only --diff-filter=ACMRTUXB "$BASE_SHA" HEAD |+ grep -zE '^(api|client|packages)/.*\.(js|jsx|ts|tsx)$' || true+ )# Debug outputecho "Changed files:"- echo "$CHANGED_FILES"+ printf '%s\n' "${CHANGED_FILES[@]}"# Ensure there are files to lint before running ESLint- if [[ -z "$CHANGED_FILES" ]]; then+ if [[ ${#CHANGED_FILES[@]} -eq 0 ]]; thenecho "No matching files changed. Skipping ESLint."exit 0fi@@ -60,7 +63,7 @@ jobs:npx eslint --no-error-on-unmatched-pattern \--config eslint.config.mjs \--max-warnings=0 \- $CHANGED_FILES+ -- "${CHANGED_FILES[@]}"# Run Prettier --check on the same set of changed files to catch# formatting drift in PRs that bypassed the local pre-commit hook@@ -68,20 +71,23 @@ jobs:- name: Run Prettier --check on changed filesrun: |BASE_SHA=$(jq --raw-output .pull_request.base.sha "$GITHUB_EVENT_PATH")- CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "$BASE_SHA" HEAD | grep -E '^(api|client|packages)/.*\.(js|jsx|ts|tsx)$' || true)+ mapfile -d '' -t CHANGED_FILES < <(+ git diff -z --name-only --diff-filter=ACMRTUXB "$BASE_SHA" HEAD |+ grep -zE '^(api|client|packages)/.*\.(js|jsx|ts|tsx)$' || true+ )- if [[ -z "$CHANGED_FILES" ]]; then+ if [[ ${#CHANGED_FILES[@]} -eq 0 ]]; thenecho "No matching files changed. Skipping Prettier."exit 0fiecho "Files to check:"- echo "$CHANGED_FILES"+ printf '%s\n' "${CHANGED_FILES[@]}"# `prettier --check` exits non-zero if any file would be reformatted.# Suggest the local fix in the failure message so contributors aren't# left guessing how to resolve.- if ! npx prettier --check --no-error-on-unmatched-pattern $CHANGED_FILES; then+ if ! npx prettier --check --no-error-on-unmatched-pattern -- "${CHANGED_FILES[@]}"; thenecho ""echo "::error::Prettier formatting drift detected. Fix locally with:"echo "::error:: npx prettier --write <files>"