tinysocs-architecture-contract

Documents verified load-bearing design invariants and weak points of the TinySocs detection architecture.

Updated Oct 12, 2025
One-click install
npx skills add https://github.com/lukefitzg/tinysocs --skill tinysocs-architecture-contract-lukefitzg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tinysocs-architecture-contract
Source: https://github.com/lukefitzg/tinysocs/tree/main/.claude/skills/tinysocs-architecture-contract
Command: npx skills add https://github.com/lukefitzg/tinysocs --skill tinysocs-architecture-contract-lukefitzg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Engineers modifying TinySocs detection, rule-loading, FIM, or federation code risk breaking hidden invariants — like the dual-engine split where only the C# engine fires alerts, or the signed-pack loader that is implemented but dormant — because the real behavior differs from comments and design docs. This Skill provides a code-verified map of how the system actually behaves before you touch those subsystems. ## Core Features & Use Cases - Dual-engine contract: Explains that only the C# agent engine (threshold_by_key rules, inline in the shipper batch loop) fires alerts, while the Python KQL catalogue never runs on a schedule. - Rule-loading trust chain: Details the legacy unsigned RuleLoader versus the signed-but-dormant PackLoader path, including Ed25519 verification, key_id pinning, licence gating, and refuse-and-freeze failure semantics. - Known weak points register: Names open issues plainly — no allowlist runtime, schema-only baselines, unauthenticated dashboard and /storage/purge endpoints, and the TS-080 direct-alert duplication. - Use Case: Before editing DetectionEngine.cs, PackLoader.cs, FileIntegrityInput.cs, or node.py, load this Skill to avoid silently disabling rules, breaking the TS-113 host-key grouping, or misrepresenting the signed-pack path as active. ## Quick Start Load the TinySocs architecture contract before modifying DetectionEngine.cs or PackLoader.cs and explain which invariants my change could violate.

Frequently Asked Questions about tinysocs-architecture-contract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Which detection engine actually fires alerts in TinySocs?

Only the C# agent engine fires alerts, evaluating threshold_by_key rules inline in the OpenSearchBulkShipper batch loop before events are posted. The Python KQL rules.yaml catalogue has no scheduler and never fires alerts in production.

How do signed detection packs work in TinySocs?

PackLoader verifies an Ed25519 signature over canonical JSON bytes, pins the key_id, and licence-gates before loading rules. However, ContentPackConfig.Enabled defaults to false, so this signed path is implemented and tested but dormant in every real install.

Does TinySocs enforce the runs_on field on detection rules?

No, runs_on is an authoring convention only. Neither RuleLoader nor PackLoader checks it; a runs_on: backend rule with detection.type threshold_by_key would load and fire as an agent rule. Adding real enforcement is open work.

Why does event 1102 sometimes produce two alerts in TinySocs?

EventLogInput.cs has a hard-coded TS-080 direct-alert fast path that bypasses the detection engine, while rules.yml also defines a regular TS-080 engine rule. The two paths are not reconciled, so one real-world event can yield two alert documents.

What are the known security weak points in TinySocs?

Documented weak points include no allowlist runtime, schema-only baselines outside FIM, mostly unauthenticated dashboard rule CRUD endpoints, and /storage/purge shipping unauthenticated by default since it uses the conditional HMAC gate.

When should I not use the TinySocs architecture contract?

Do not use it for build or deployment steps, symptom-first debugging triage, rule threshold semantics, external positioning claims, or change-approval decisions. Those belong to the build-and-env, debugging-playbook, detection-engineering, external-positioning, and change-control references respectively.