1# vi: set ft=conf23# Test SSRF protection in webhook creation45# start soft serve6exec soft serve &7# wait for SSH server to start8ensureserverrunning SSH_PORT910# create a repo11soft repo create test-repo12stderr 'Created repository test-repo.*'1314# Try to create webhook with localhost - should fail15! soft repo webhook create test-repo http://localhost:8080/webhook -e push1617# Try to create webhook with 127.0.0.1 - should fail18! soft repo webhook create test-repo http://127.0.0.1:8080/webhook -e push1920# Try to create webhook with AWS metadata service - should fail21! soft repo webhook create test-repo http://169.254.169.254/latest/meta-data/ -e push2223# Try to create webhook with private network - should fail24! soft repo webhook create test-repo http://192.168.1.1/webhook -e push2526# Try to create webhook with private 10.x network - should fail27! soft repo webhook create test-repo http://10.0.0.1/webhook -e push2829# Create webhook with valid public IP - should succeed30new-webhook WH_PUBLIC31soft repo webhook create test-repo $WH_PUBLIC -e push3233# List webhooks - should show only the valid one34soft repo webhook list test-repo35stdout 'webhook.site'3637# Try to update webhook to localhost - should fail38! soft repo webhook update test-repo 1 --url http://localhost:9090/hook3940# stop the server41[windows] stopserver