diff --git a/.github/workflows/solidity-foundry.yml b/.github/workflows/solidity-foundry.yml index cebf6cf6b67..86ada2ae107 100644 --- a/.github/workflows/solidity-foundry.yml +++ b/.github/workflows/solidity-foundry.yml @@ -419,11 +419,11 @@ jobs: rm $current_report fi else - echo "::warning::Failed to find new issues for $base_report using an LLM model, will use full report." + echo "::warning::Failed to generate a diff report with new issues for $base_report using an LLM model, will use full report." fi else - echo "::error::Failed to find current report for $base_report (file $current_file doesn't exist, but should have been generated). Please check Slither logs." + echo "::error::Failed to find current commit's equivalent of $base_report (file $current_file doesn't exist, but should have been generated). Please check Slither logs." exit 1 fi done diff --git a/contracts/scripts/ci/find_slither_report_diff.sh b/contracts/scripts/ci/find_slither_report_diff.sh index d39dbea2027..ceb21d2288d 100755 --- a/contracts/scripts/ci/find_slither_report_diff.sh +++ b/contracts/scripts/ci/find_slither_report_diff.sh @@ -23,8 +23,8 @@ else validation_prompt_path="" fi -first_report_content=$(cat "$first_report_path" | sed -E 's/\\+$//g' | sed -E 's/\\+ //g') -second_report_content=$(cat "$second_report_path" | sed -E 's/\\+$//g' | sed -E 's/\\+ //g') +first_report_content=$(cat "$first_report_path" | sed 's/"/\\"/g' | sed -E 's/\\+$//g' | sed -E 's/\\+ //g') +second_report_content=$(cat "$second_report_path" | sed 's/"/\\"/g' | sed -E 's/\\+$//g' | sed -E 's/\\+ //g') openai_prompt=$(cat "$report_prompt_path" | sed 's/"/\\"/g' | sed -E 's/\\+$//g' | sed -E 's/\\+ //g') openai_model="gpt-4o" openai_result=$(echo '{ @@ -57,7 +57,7 @@ echo "$new_issues_report_content" > "$new_issues_report_path" if [[ -n "$validation_prompt_path" ]]; then echo "::debug::Validating the diff report using the validation prompt" - report_input=$(echo "$new_issues_report_content" | sed -E 's/\\+$//g' | sed -E 's/\\+ //g') + report_input=$(echo "$new_issues_report_content" | sed 's/"/\\"/g' | sed -E 's/\\+$//g' | sed -E 's/\\+ //g') validation_prompt_content=$(cat "$validation_prompt_path" | sed 's/"/\\"/g' | sed -E 's/\\+$//g' | sed -E 's/\\+ //g') validation_result=$(echo '{ "model": "'$openai_model'",