apache / apache/incubator-pegasus

[Proposal] Community Threat Model & OWASP TM-BOM Artifacts

Open
#2,415 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.1k
Forks
328
PR merge metrics
No merged PRs in 30d

Description

## General Question

As open-source security standards evolve—and with upcoming regulatory frameworks like the EU Cyber Resilience Act (CRA) emphasizing documented security risk assessments—having a formal, version-controlled threat model is increasingly valuable for distributed infrastructure like Pegasus.

I would like to propose contributing community-driven threat models for key architectural components.

### What I Propose

I plan to contribute security artifacts for one or two core components initially, delivered in two complementary formats:

1. **Human-Readable Documentation:**
- Architectural summary and trust boundary definitions.
- Inline Data Flow Diagrams (DFDs) using Mermaid.js.
- A threat matrix mapping potential vulnerabilities to existing or recommended mitigations.
2. **Machine-Readable Standard (`TM-BOM` JSON):**
- A JSON file structured according to the **OWASP Threat Model Bill of Materials (TM-BOM)** specification for automated compliance tracking and auditing.

### Proposed Initial Scope

Given Pegasus's distributed architecture, I suggest starting with one of the following high-impact areas:
* **Meta Server <-> Replica Server Communication** (Cluster topology updates & state management)
* **Client <-> Server RPC Layer** (Authentication, authorization, and data ingestion)
* **Data Replication Protocol** (Cross-replica synchronization and trust boundaries)

### Proposed File Structure

Following best practices for "Threat Modeling as Code", artifacts would live alongside repository documentation:

```text
docs/security/threat-models/
├── README.md
└── components/
├── rpc-layer.md # Human-readable Markdown + Mermaid DFD
└── rpc-layer.tmbom.json # Machine-readable OWASP TM-BOM JSON
```

### Questions for Maintainers

1. Does adding formal threat model documentation align with the current project roadmap?
2. Which of the suggested initial scopes (or another component) would be most valuable to the core team right now?
3. Is `docs/security/` the preferred directory for these artifacts, or is there another location you'd prefer?

I welcome any feedback or guidance!

Contributor guide

Open the contributing guide

Research direction

Review the proposed docs/security/threat-models/ structure and compare the three candidate components: Meta–Replica communication, Client–Server RPC, and data replication. First confirm the maintainers’ chosen scope and directory; done would be a maintainer-approved Markdown threat model with Mermaid DFDs and a matching OWASP TM-BOM JSON artifact.

Written by the indexing model from the issue text.

Assessment

Domain
distributed-systems, documentation, security
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.