承接 cboxdk/laravel-siem 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cboxdk/laravel-siem

Composer 安装命令:

composer require cboxdk/laravel-siem

包简介

The SIEM log-streaming delivery engine for Laravel — a durable transactional outbox, queued batched delivery with retry/backoff/dead-letter/circuit-breaker, SSRF-guarded HTTP egress, encrypted destination secrets, and PII redaction, on top of the framework-agnostic cboxdk/siem core.

README 文档

README

Latest Version on Packagist Total Downloads PHP Version

The SIEM log-streaming delivery engine for Laravel: a durable transactional outbox, queued batched delivery with retry, dead-letter, and a per-stream circuit breaker, SSRF-guarded HTTP egress, encrypted destination secrets, and per-field PII redaction — shipping normalized security events to Splunk HEC, Elastic (ECS), Graylog (GELF), ArcSight/syslog (CEF), or any HTTP JSON collector.

This package is the Laravel wrapper over the framework-agnostic cboxdk/siem core. The core owns the event model and the formatters (the shape of the data); this package owns delivery (the network, the durability, the secrets). An audit binding in cboxdk/laravel-id consumes this layer to stream a tamper-evident audit trail — that binding is a separate package.

Installation

composer require cboxdk/laravel-siem

php artisan vendor:publish --tag="siem-migrations"
php artisan vendor:publish --tag="siem-config"   # optional
php artisan migrate

The service provider is auto-discovered. Destination secrets use Laravel's encrypter, so an APP_KEY is required (every Laravel app has one).

At a glance

use Cbox\LaravelSiem\Contracts\{LogStreams, StreamDispatcher};
use Cbox\LaravelSiem\Enums\Destination;
use Cbox\Siem\ValueObjects\SiemEvent;

// 1. Register a destination (endpoint SSRF-checked; secret encrypted, revealed once).
app(LogStreams::class)->create(
    name: 'splunk-prod',
    destination: Destination::SplunkHec,
    endpointUrl: 'https://http-inputs.example.splunkcloud.com',
    secret: 'your-hec-token',
    redaction: ['password' => 'drop', 'email' => 'hash'],
);

// 2. In your own DB transaction, write the event to the outbox (a cheap insert).
DB::transaction(function () use ($event) {
    // ... your business write ...
    app(StreamDispatcher::class)->dispatch($event, app(LogStreams::class)->enabled());
});

// 3. The queued pump batches, redacts, formats, and ships it — off the request thread.

What it guarantees

  • Deny-by-default — no enabled stream, nothing delivered.
  • At-least-once, unordered — the outbox row commits in your transaction; a rolled-back caller leaves no orphan. Duplicates are possible; dedup by event id.
  • Never blocks the request — all delivery is queued.
  • Bounded everything — triple-bounded batches (records/bytes/age), bounded exponential backoff with jitter, a hard retry cap into a dead-letter, a bounded outbox with an explicit backpressure policy, and a per-stream circuit breaker.
  • Safe egress — SSRF-guarded and DNS-pinned, TLS verification always on, secrets encrypted at rest and scrubbed from logs, PII redacted before formatting.

Destinations

Destination SIEM Framing
splunk_hec Splunk HEC NDJSON to the collector event endpoint, Authorization: Splunk <token>
elastic_ecs Elastic / Kibana ECS JSON documents (NDJSON)
graylog_gelf Graylog GELF 1.1 over HTTP (never UDP)
cef_http ArcSight / syslog CEF lines over HTTP
generic_json any HTTP collector neutral single-line JSON

Testing

Compose Cbox\LaravelSiem\Testing\InteractsWithLogStreams into your TestCase to run the whole pipeline in memory: fakeStreamSink() binds an in-memory FakeStreamSink, createLogStream(...) registers through the real registry, and pumpStream($id) runs a delivery cycle synchronously. FakeHttpTransport programs the HTTP fake for testing the real HttpStreamSink.

Requirements

  • PHP 8.4+
  • Laravel 12.x or 13.x
  • A queue connection, a database, and an APP_KEY.

Documentation

Full documentation lives in docs/.

The event core

The normalized SiemEvent, the formatters, and their escaping/threat model are provided by cboxdk/siem. This package claims only the Laravel delivery layer.

Credits

License

The MIT License (MIT). See LICENSE.md.

cboxdk/laravel-siem 适用场景与选型建议

cboxdk/laravel-siem 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 07 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「Audit」 「laravel」 「delivery」 「outbox」 「ssrf」 「circuit-breaker」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 cboxdk/laravel-siem 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 cboxdk/laravel-siem 我们能提供哪些服务?
定制开发 / 二次开发

基于 cboxdk/laravel-siem 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-15