
Research
Security News
Malicious npm Packages Use Telegram to Exfiltrate BullX Credentials
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Declarative orchestration of asynchronous queue-based tasks
from q.pipelines import Tasks, Task
# Input types for tasks
class Image:
img: str
class Annotated(Image):
annotation: str
# State machine declaration
# Task(INPUT_TYPES, *NEXT_TASK_IDs)
# Tasks({ taskID -> Task })
# 'output' is a special task ID
TASKS = Tasks(
input_task='classify', Output=Result,
tasks=(
classify=Task(Image, 'annotate_digit', 'annotate_word'),
annotate_digit=Task(Image, 'output'),
annotate_work=Task(Image, 'output'),
)
)
def codegen():
TASKS.codegen(__file__, 'TASKS')
# generated/
# types.py
# local.py
# __init__.py
TASKS.codegen_pipelines(__file__)
# pipelines/
# _classify.py
# _annotate_digit.py
# _annotate_word.py
# __init__.py
Generated code:
# pipelines/_classify.py
from ..generated import Classify
def classify(Qin: Classify.QueueIn, Qout: Classify.QueueOut):
...
E.g. implementation:
# pipelines/_classify.py
from fastapi import FastAPI
import uvicorn
from ..generated import Classify
def classify(Qin: Classify.QueueIn, Qout: Classify.QueueOut):
app = FastAPI()
@app.get('/tasks')
async def tasks():
return await Qin.items()
@app.post('/annotate')
async def annotate(annotation: Literal['digit', 'word']):
id, task = await Qin.read()
if annotation == 'digit':
next = Classify.next('digit', task)
else:
next = Classify.next('word', task)
await Qout.push(id, next)
await Qin.pop(id)
uvicorn.run(app)
from mypkg.pipelines import PIPELINES
from mypkg.generated import run, input_queue, output_queue, queues
def main(input_path: str, output_path: str, queues_path: str):
Qin = input_queue(queues_path)
Qout = output_queue(queues_path)
Qs = queues(queues_path)
run(Qin, Qout, Qs, **PIPELINES)
FAQs
Declarative orchestration of asynchronous queue-based tasks
We found that queue-pipelines demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.
Security News
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.