
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
w3gram-server
Advanced tools
This is a node.js server for the W3gram push notification protocol.
The server was designed to be deployed to Heroku using free resources, so it fits in a single dyno. The code has great test coverage using mocha.
Click the ''Deploy to Heroku'' button at the top of this page to create your own W3gram server running on Heroku. Don't worry, the project only uses free add-ons!
Get your server's MAK and store it somewhere safely.
curl -i https://w3gram-test.herokuapp.com/mak
# Response example:
# { "mak": "G-TPkmtKOczXx203po1NblklXsK5OXUylUOGkQUxRQk" }
Create an application and note its API key and secret.
curl -i -X POST -H 'Content-Type: application/json' \
-d '{"mak": "G-TPkmtKOczXx203po1NblklXsK5OXUylUOGkQUxRQk", "app": { "name": "Testing", "origin": "*"}}' \
https://w3gram-test.herokuapp.com/apps
# Response example:
# {
# "key":"uUJPS3zgIpQjDnxn",
# "secret":"7cAXyVAYEhRbQ0UFCFI4qJAWOmXLZaPC1xX6niNIxCE",
# "origin":"*",
# "name":"Testing"
# }
Create a token for a device ID.
echo -n "device-id|my-tablet" | \
openssl dgst -sha256 -hmac "7cAXyVAYEhRbQ0UFCFI4qJAWOmXLZaPC1xX6niNIxCE" \
-binary | base64
# Output example:
# EVwwWmwiIfLbTDV8OWsHVc4r/p2WUpKXIJcXCdtoFxM
Register the device.
curl -i -X POST -H 'Content-Type: application/json' \
-d '{"app": "uUJPS3zgIpQjDnxn", "device": "my-tablet", "token": "EVwwWmwiIfLbTDV8OWsHVc4r_p2WUpKXIJcXCdtoFxM"}' \
https://w3gram-test.herokuapp.com/register
# Response example:
# {
# "receiver":"1.my-tablet.WMF5TISqRYYkUr5GJWunmP40FvXI1yU_Qb5kXc907TY",
# "push":"https://w3gram-test.herokuapp.com/push",
# }
Do the routing step.
curl -i -X POST -H 'Content-Type: application/json' \
-d '{"app": "uUJPS3zgIpQjDnxn", "device": "my-tablet", "receiver": "1.my-tablet.WMF5TISqRYYkUr5GJWunmP40FvXI1yU_Qb5kXc907TY", "token": "EVwwWmwiIfLbTDV8OWsHVc4r_p2WUpKXIJcXCdtoFxM"}' \
https://w3gram-test.herokuapp.com/route
# Response example:
# {
# "listen":"wss://w3gram-test.herokuapp.com/ws/1.my-tablet.HwVTM_07vSbHzrQHCBeHeLygUuvm5esJa2yzOjwmJwQ"
# }
Start a WebSocket connection:
wscat -c "wss://w3gram-test.herokuapp.com/ws/1.my-tablet.HwVTM_07vSbHzrQHCBeHeLygUuvm5esJa2yzOjwmJwQ"
Send a notification:
curl -i -X POST -H 'Content-Type: application/json' \
-d '{"receiver": "1.my-tablet.WMF5TISqRYYkUr5GJWunmP40FvXI1yU_Qb5kXc907TY", "message": { "data": "Hello push world" } }' \
https://w3gram-test.herokuapp.com/push
Install all dependencies and create PostgreSQL database for development and testing.
npm install
createdb w3gram_test
createdb w3gram_dev
Run the server in developmentm mode.
npm start
This project is Copyright (c) 2014 Victor Costan, and distributed under the MIT License.
FAQs
W3gram Push Notification Server
We found that w3gram-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.