Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/webscrubbing/simple-activitypub-spam-filter
webscrubbing808/simple-activitypub-spam-filter - Docker Image | Docker Hub
All configurations are managed via environment variables.
BLOCK_WORDS
BLOCK_WORDS=THE_EXAMPLE_SPAM_URL.org,EXAMPLE_WORDS
LISTEN_ADDRESS
LISTEN_ADDRESS=:80
LISTEN_ADDRESS=0.0.0.0:8080
WHEN_DETECT_SPAM
WHEN_DETECT_SPAM=output
WHEN_DETECT_SPAM=block
WHEN_DETECT_SPAM=soft
output
: If spam is detected, the content is output to standard output and the delivery continues.block
: If spam is detected, sends a 400 to the originating server and stops the delivery.soft
: If spam is detected, send a 200 to the origin server and cancel the delivery. This is useful to prevent redelivery.PROXY_TARGET
PROXY_TARGET=http://localhost:3000
PROXY_TARGET=http://mastodon:8080
PROXY_TARGET=http://your-mastodon-apache.mastodon.svc.cluster.local
The spam filter functions as a reverse proxy. Please insert the image between the network entrance and your Mastodon or Misskey server.
Here is a sample for operating with the following configuration:
services:
mastodon-db:
restart: always
image: 'postgres:alpine'
mastodon-redis:
restart: always
image: 'redis:alpine'
mastodon-web:
restart: always
image: 'tootsuite/mastodon'
command: 'bundle exec rails s -p 3000'
ports:
- "3000:3000"
mastodon-sidekiq:
restart: always
image: 'tootsuite/mastodon'
command: 'bundle exec sidekiq'
To insert the spam-filter into the communication path, change the port.
mastodon-web:
restart: always
image: 'tootsuite/mastodon'
command: 'bundle exec rails s -p 3050' # Change to 3050
# All POST flows through Docker's Default network, so opening ports here is basically unnecessary.
# ports:
# - "3050:3050"
Add the image. Ensure the port matches the original Mastodon port, 3000
.
spam-filter:
image: webscrubbing808/simple-activitypub-spam-filter
ports:
- "3000:3000"
environment:
- BLOCK_WORDS="THE_EXAMPLE_SPAM_URL.org,EXAMPLE_WORDS"
- LISTEN_ADDRESS="0.0.0.0:3000"
- WHEN_DETECT_SPAM="block"
- PROXY_TARGET="http://mastodon-web:3050" # set service key name
> docker compose up -d
> docker compose logs -f
apiVersion: apps/v1
kind: Deployment
metadata:
name: spam-filter
spec:
replicas: 1
selector:
matchLabels:
app: spam-filter
template:
metadata:
labels:
app: spam-filter
spec:
containers:
- name: spam-filter
image: docker.io/webscrubbing808/simple-activitypub-spam-filter:v0.1.0
env:
- name: BLOCK_WORDS
value: "THE_EXAMPLE_SPAM_URL.org,EXAMPLE_WORDS"
- name: LISTEN_ADDRESS
value: "0.0.0.0:80"
- name: WHEN_DETECT_SPAM
value: "block"
- name: PROXY_TARGET
value: "http://your_mastodon_web.namespace.svc.cluster.local"
---
apiVersion: v1
kind: Service
metadata:
name: spam-filter
spec:
selector:
app: spam-filter
ports:
- protocol: TCP
port: 80
targetPort: 80
type: ClusterIP
Applying the above and swapping the target service with Ingress is recommended.
Welcome. Better spam check methods and documentation improvements are needed.
CC0
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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.