
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
github.com/keploy/samples-go/go-twilio
A sample application that sends an SMS using Twilio API.
git clone https://github.com/keploy/samples-go.git && cd samples-go/go-twilio
go mod download
curl -O https://raw.githubusercontent.com/keploy/keploy/main/keploy.sh && source keploy.sh
TWILIO_ACCOUNT_SID
=your_account_sidTWILIO_AUTH_TOKEN
=your_auth_tokenTWILIO_NUMBER
=your_twilio_phone_number.env
file.go build .
sudo -E keploy record -c "./go-twilio"
To generate test suites with Keploy, you can use tools like Hoppscotch, Postman, or cURL to send API requests. Keploy will capture these API calls and create comprehensive test suites, including detailed test cases and data mocks, allowing for easier testing and validation of your application.
curl --location 'http://127.0.0.1:8080/send-sms/' \
--header 'Content-Type: application/json' \
--data-raw '{
"Body": "Keploy is awesome!",
"To": "<YOUR_REGISTERED_PERSONAL_PHONE_NUMBER>"
}'
Replace <YOUR_REGISTERED_PERSONAL_PHONE_NUMBER>
with your registered personal phone number.
<SOME_WRONG_PHONE_NUMBER>
with an invalid phone number of your choice.curl --location 'http://127.0.0.1:8080/send-sms/' \
--header 'Content-Type: application/json' \
--data-raw '{
"Body": "Keploy is awesome!",
"To": "<SOME_WRONG_PHONE_NUMBER>"
}'
Both API calls have now been captured as test cases and should be visible within the Keploy CLI. You should see an app directory labeled keploy
containing the test cases that were just recorded, along with the corresponding data mocks that were generated.
Now, let’s execute the application in test mode.
sudo -E keploy test -c "./go-twilio" --delay 10
Our Testcases has passed and we can see the results in the CLI.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.