T09 · Insecure Skill Coding Practices
- Location
scripts/create_review.sh:36- Finding
Unvalidated API Endpoint Override Exposes Bearer Tokens and Source Code
- Content
View full analysis
"$CURL_CONFIG_FILE" printf 'header = "Content-Type: application/json"\n' >>"$CURL_CONFIG_FILE" HTTP_CODE="" for ((attempt = 1; attempt <= MAX_ATTEMPTS; attempt++)); do if ! HTTP_CODE="$( jq -n \ --rawfile diff "$DIFF_FILE" \ --arg repo "$REPO_SLUG" \ --arg base "$BASE_COMMIT" \ --arg head "$HEAD_COMMIT_SHA" \ --arg branch "$BRANCH_NAME" \ '({diff:$diff, repository:$repo, base_commit:$base} + (if $head != "" then {head_commit_sha:$head} else {} end) + (if $branch != "" then {branch:$branch} else {} end))' \ | curl -sS -o "$BODY_FILE" -w "%{http_code}" \ --config "$CURL_CONFIG_FILE" \ --data-binary @- \ "$API_URL/v1/reviews" )"; then ``` The polling and feedback scripts use the same endpoint-override pattern and attach the same credential: ```bash API_URL="${PROPEL_API_BASE_URL:-${PROPEL_API_URL:-https://api.propelcode.ai}}" ``` ```bash printf 'header = "Authorization: Bearer %s"\n' "$PROPEL_API_KEY ...[truncated 2493 chars]- Remediation
View remediation
