@@ -14,25 +14,30 @@ jobs:
1414
1515 - name : Wait for deployed site and download content
1616 run : |
17- EXPECTED=' CityGenerator' # Change if there's a better unique string in your main page
17+ EXPECTED=" CityGenerator"
1818 for i in {1..5}; do
1919 curl -sSL https://universalbit-dev.github.io/CityGenerator/ > deployed_site.html
2020 if grep -q "$EXPECTED" deployed_site.html; then
21- echo "Found expected content in deployed site ."
21+ echo "Site is live and up-to-date ."
2222 break
2323 else
24- echo "Expected content not found, waiting 15 seconds before retrying... (attempt $i/5)"
24+ echo "Expected site string not found, retrying in 15 seconds ( $i/5)... "
2525 sleep 15
2626 fi
2727 done
2828
29- - name : Scan deployed site for phishing blocklist entries
29+ - name : Extract URLs/domains from deployed site
3030 run : |
31- grep -Ff destroylist.txt deployed_site.html > destroylist_matches.txt || true
31+ grep -oE 'https?://[a-zA-Z0-9._~:/?#@!$&\'\(\)\*\+,;=%-]+' deployed_site.html | \
32+ sed 's|https\?://||' | cut -d'/' -f1 | sort | uniq > referenced_domains.txt
33+
34+ - name : Scan referenced domains against blocklist
35+ run : |
36+ grep -Ff destroylist.txt referenced_domains.txt > destroylist_matches.txt || true
3237 if [ -s destroylist_matches.txt ]; then
33- echo "Phishing domains found in deployed site! Showing matches :"
38+ echo "Blocked phishing domains found in the deployed site (by real usage) :"
3439 cat destroylist_matches.txt
3540 exit 1
3641 else
37- echo "No phishing domains found in deployed site."
42+ echo "No blocked phishing domains found in the deployed site."
3843 fi
0 commit comments