Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

spakky-outbox

Latest version: v13.1.1

Overview

Last scanned
25 Nov 2026
Published
25 Nov 2026
PyPI package Publisher: Spakky
16 Versions
4.9K Downloads

Scan summary

spakky-outbox was last scanned on 25 Nov 2026 at version 13.1.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 16 versions; the latest 3 were published within 7 days (19–25 Nov 2026).
  • Findings: No rules fired in version 13.1.1.
  • Downloads: 4,864 downloads.

Versions

16 versions published
Versions and the rules that fired in each
VersionPublishedStatus
13.1.1 LATEST 25 Nov 2026 No rules fired
13.1.0 19 Nov 2026 No rules fired
13.0.0 19 Nov 2026 No rules fired
12.2.0 18 Nov 2026 Not shown
12.1.0 17 Nov 2026 Not shown

No rules fired in 13.1.1

Findings

Findings for v13.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 13.1.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

spakky-outbox

Spakky Framework를 위한 트랜잭셔널 Outbox 패턴 패키지입니다. IEventBus를 @Primary outbox bus로 교체해 이벤트 저장과 외부 전송을 분리합니다.

설치

pip install spakky-outbox "spakky-sqlalchemy[outbox]"

참고: spakky-outbox는 core abstraction을 제공하고, spakky-sqlalchemy는 spakky.contributions.spakky.outbox contribution으로 Outbox storage 구현체를 제공합니다. spakky-sqlalchemy 단독 설치는 spakky-outbox를 끌어오지 않습니다.

주요 기능

  • 트랜잭셔널 Outbox: 이벤트를 비즈니스 데이터와 원자적으로 저장
  • commit 직후 발행: 메시지를 저장한 transaction이 실제로 commit되면 background relay가 바로 깨어나 외부 transport(Kafka, RabbitMQ)로 발행. rollback되었거나 commit하지 않은 transaction은 relay를 깨우지 않으며, 주기 읽기는 보내지 못한 메시지의 복구에 쓰임
  • 멈추지 않는 relay: 읽기 도중 DB 오류가 나도 로그를 남기고 계속 돎
  • 실패한 claim 즉시 해제: 보내지 못한 메시지는 claim을 바로 풀어 claim timeout을 기다리지 않고 다음 읽기에서 다시 발행
  • 재시도 지원: transport가 영구적이고 특정 레코드에 귀속되는 거부를 확정한 경우에만 설정 가능한 한도 내에서 재시도하며, connection·timeout·queue 등 transport 자체 장애는 메시지별 retry 예산을 소모하지 않음
  • 다중 인스턴스 안전성: 원자적 claim으로 중복 발행 방지
  • 파티션 키 단위 순서 보전: 파티션 키를 통째로 claim하고, 영구 거부되어 재시도 대기 중인 키의 후속 메시지를 보류
  • 발행 포기 상태: 재시도를 소진한 메시지를 abandoned 처리하여 키가 무기한 막히지 않게 함

사용법

1. 애플리케이션에서 플러그인 로드
from spakky.core.application.application import SpakkyApplication
from spakky.core.application.application_context import ApplicationContext

app = (
    SpakkyApplication(ApplicationContext())
    .load_plugins()  # outbox와 sqlalchemy plugin을 자동 로드
    .scan()
    .start()
)
2. Use case에서 이벤트 발행

IAsyncEventPublisher로 발행된 이벤트는 자동으로 라우팅됩니다.

  • AbstractDomainEvent → in-process dispatch
  • AbstractIntegrationEvent → IEventBus(Outbox가 @Primary로 가로챔)
from spakky.core.common.mutability import immutable
from spakky.core.stereotype.usecase import UseCase
from spakky.data.aspects.transactional import Transactional
from spakky.domain.models.event import AbstractIntegrationEvent
from spakky.event.event_publisher import IAsyncEventPublisher


@immutable
class OrderCreatedEvent(AbstractIntegrationEvent):
    order_id: int
    customer_id: int


@UseCase()
class CreateOrderUseCase:
    def __init__(self, event_publisher: IAsyncEventPublisher) -> None:
        self._event_publisher = event_publisher

    @Transactional()
    async def execute(self, command: CreateOrderCommand) -> Order:
        order = Order.create(...)
        # 이벤트는 order와 같은 transaction에 저장됨
        await self._event_publisher.publish(
            OrderCreatedEvent(order_id=order.id, customer_id=command.customer_id)
        )
        return order
3. 환경변수로 설정
변수 기본값 설명
SPAKKY_OUTBOX__POLLING_INTERVAL_SECONDS 1.0 보내지 못한 메시지를 다시 읽는 복구 주기. commit된 메시지는 이 주기를 기다리지 않음
SPAKKY_OUTBOX__BATCH_SIZE 100 batch당 message 수
SPAKKY_OUTBOX__MAX_RETRY_COUNT 5 포기 전 최대 retry 횟수
SPAKKY_OUTBOX__CLAIM_TIMEOUT_SECONDS 300.0 crash recovery용 claim 만료

구성 요소

구성 요소 설명
IOutboxStorage / IAsyncOutboxStorage Outbox message storage port
OutboxEventBus / AsyncOutboxEventBus Outbox pattern용 event bus 경계(@Primary가 DirectEventBus 대체)
OutboxRelayBackgroundService / AsyncOutboxRelayBackgroundService background relay service(commit 직후 깨어남 + 복구용 주기 읽기, send)
OutboxRelayWakeup bus가 저장한 메시지의 transaction이 commit되면 relay를 깨우는 framework 내부 신호. 애플리케이션은 호출하지 않음
OutboxConfig 환경변수 기반 설정
OutboxMessage Outbox message model

OutboxEventBus와 AsyncOutboxEventBus는 메시지를 저장할 때 DirectEventBus와 같은 outbound metadata 정책을 사용합니다. 기존 tracing header는 보존하고, auth snapshot 전파가 활성화된 request-scope에서는 spakky.auth.context_snapshot에 signed AuthContextSnapshot envelope를 저장합니다. Raw bearer token은 Outbox headers에 저장하지 않습니다.

커스텀 Storage 구현

custom storage backend를 구현하려면 다음 interface를 구현합니다. release_claim()은 abstract method이므로 기존 custom storage도 구현해야 합니다.

from spakky.outbox.ports.storage import IAsyncOutboxStorage
from spakky.outbox.common.message import OutboxMessage

class MyCustomStorage(IAsyncOutboxStorage):
    async def save(self, message: OutboxMessage) -> None:
        # 현재 transaction 안에서 저장
        ...

    async def fetch_pending(self, limit: int, max_retry: int) -> list[OutboxMessage]:
        # pending message를 atomic claim 후 반환.
        # 파티션 키가 있는 메시지는 그 키에서 아직 발행되지도 포기되지도 않은
        # 가장 오래된 메시지를 함께 claim할 때만 넘긴다 — 그러지 않으면 릴레이
        # 인스턴스 둘이 같은 키를 병렬 발행하여 키가 보장하려던 순서를 잃는다.
        ...

    async def mark_published(self, message_id: UUID) -> None:
        ...

    async def increment_retry(self, message_id: UUID) -> None:
        ...

    async def mark_abandoned(self, message_id: UUID) -> None:
        # 재시도를 소진한 메시지를 발행 대기열에서 빼되 레코드는 남긴다.
        # 이 상태가 없으면 그 메시지가 같은 키의 후속 메시지를 영구히 막는다.
        ...

    async def release_claim(self, message: OutboxMessage) -> None:
        # 릴레이가 보내지 못한 메시지의 claim을 풀어 다음 읽기에서 다시 나가게 한다.
        # retry count는 그대로 두고, 발행 완료·발행 포기 메시지는 건드리지 않는다.
        # message.claimed_at이 저장된 claim과 같을 때만 푼다 — claim timeout 뒤
        # 다른 인스턴스가 다시 잡은 claim을 지우면 같은 메시지가 병렬로 나간다.
        ...

    async def purge_published(self, older_than: datetime) -> int:
        # published_at이 older_than보다 이른 발행 완료 메시지만 지우고 지운 수를 반환한다.
        # 미발행 메시지와 발행 포기 메시지는 지우지 않는다.
        ...

개발 검증

패키지 단위 검증은 해당 패키지 디렉토리에서 실행합니다.

uv run ruff format .
uv run ruff check .
uv run pyrefly check
uv run pytest

pytest는 각 패키지 pyproject.toml의 coverage 설정을 사용합니다.

라이선스

MIT License

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases spakky-outbox

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229