SYSTEM REQUIREMENTS SPECIFICATION

Stella Ops · self‑hosted supply‑chain‑security platform

Audience – core maintainers and external contributors who need an authoritative checklist of what the software must do (functional requirements) and how well it must do it (non‑functional requirements). Implementation details belong in Module Specs or ADRs—not here.


1 · Purpose & Scope

This SRS defines everything the v0.8‑beta release of Stella Ops must do, including the Free‑tier daily quota of 333 SBOM scans per token.
Scope includes core platform, CLI, UI, quota layer, and plug‑in host; commercial or closed‑source extensions are explicitly out‑of‑scope.


2 · References


3 · Definitions & Acronyms

TermMeaning
SBOMSoftware Bill of Materials
Delta SBOMPartial SBOM covering only image layers not previously analysed
RegistryAnonymous, read‑only Docker Registry v2 hosted internally
OPAOpen Policy Agent (Rego policy engine)
Muting PolicyRule that downgrades or ignores specific findings
SLSASupply‑chain Levels for Software Artifacts (provenance framework)
RekorSigstore transparency log for signatures

4 · Overall System Description

The platform consists of:

  • Stella Ops Backend – REST API, queue, policy engine, DB.
  • StellaOps.Registry – internal container registry for agents.
  • Stella CLI – extracts SBOMs; supports multi‑format & delta.
  • Zastava Agent – enforcement hook for admission‑control scenarios.
  • Web UI – React/Next.js SPA consuming backend APIs.
  • Plug‑ins – hot‑load binaries extending scanners, attestations, etc.

All services run in Docker Compose or Kubernetes with optional Internet access.


5 · Functional Requirements (FR)

5.1 Core Scanning

IDRequirementPriorityVerification
F‑1System SHALL ingest Trivy‑JSON, SPDX‑JSON, CycloneDX‑JSON files.MUSTUT‑SBOM‑001
F‑2System SHALL auto‑detect SBOM type when sbomType param omitted.MUSTUT‑SBOM‑002
F‑3System SHALL cache analysed layers and reuse them in subsequent scans.MUSTIT‑CACHE‑001
F‑4System SHALL enforce a soft limit of 333 scans per token per UTC day.MUSTIT‑QUOTA‑001
F‑4aRemaining quota SHALL be persisted in Redis under key quota:<token>:<yyyy‑mm‑dd>.MUSTUT‑QUOTA‑REDIS
F‑4bExhausted quota SHALL trigger HTTP 429 with Retry‑After header (UTC midnight).MUSTIT‑QUOTA‑002
F‑4cWhen quota is ≤ 40 % remaining, UI banner MUST turn yellow and show count‑down.SHOULDUI‑E2E‑005
F‑4d/quota endpoint SHALL return JSON {"limit":{{ quota_token }} ,"remaining":N,"resetsAt":"<ISO‑8601>"}.SHOULDAPI‑DOC‑003
F‑5Policy engine SHALL evaluate YAML rules against scan results.MUSTUT‑POL‑001
F‑6Hot‑pluggable .NET plug‑ins SHALL be loadable without service restart.MUSTIT‑PLUGIN‑001
F‑7CLI (stella scan) SHOULD exit non‑zero when CVSS≥7 vulnerabilities found.SHOULDCL‑INT‑003
(… all previously documented F‑8 – F‑12 rows retained unchanged …)

5.2 Internal Docker Repository

RefRequirement
FR‑REPO‑1Platform SHALL include StellaOps.Registry exposing Docker Registry v2 API (ports 5000/443).
FR‑REPO‑2Registry SHALL allow anonymous, read‑only pulls for at least three images:
stella/sbom‑builder
stella/cli
stella/zastava.
FR‑REPO‑3Registry MAY enable optional basic‑auth without code changes.

5.3 SBOM Generation & Handling

RefRequirement
FR‑SBOM‑1SBOM builder SHALL produce Trivy‑JSON and at least one additional format: SPDX‑JSON and CycloneDX‑JSON.
FR‑SBOM‑2For every generated SBOM, builder SHALL create a side‑car file <image>.sbom.type containing the format identifier.
FR‑SBOM‑3Stella CLI SHALL read the .sbom.type file and include sbomType parameter when uploading.
FR‑SBOM‑4Backend SHALL auto‑detect SBOM type when parameter is missing.
FR‑SBOM‑5UI Settings SHALL expose a dropdown to select default SBOM format (system‑wide fallback).

5.3.1 Delta SBOM (layer reuse)

RefRequirement
FR‑DELTA‑1Builder SHALL compute SHA256 digests of each image layer and POST array to /layers/missing; response time ≤ 20 ms (P95).
FR‑DELTA‑2Builder SHALL generate SBOM only for layers returned as “missing”.
FR‑DELTA‑3End‑to‑end warm scan time (image differing by ≤ 2 layers) SHALL be ≤ 1 s (P95).

5.4 Policy as Code (Muting & Expiration)

RefRequirement
FR‑POLICY‑1Backend SHALL store policies as YAML by default, convertible to Rego for advanced use‑cases.
FR‑POLICY‑2Each policy change SHALL create an immutable history record (timestamp, actor, diff).
FR‑POLICY‑3REST endpoints /policy/import, /policy/export, /policy/validate SHALL accept YAML or Rego payloads.
FR‑POLICY‑4Web UI Policies tab SHALL provide Monaco editor with linting for YAML and Rego.
FR‑POLICY‑5StellaOps.MutePolicies module SHALL expose CLI stella policies apply --file scan‑policy.yaml.

5.5 SLSA Attestations & Rekor (TODO > 6 mo)

RefRequirement
FR‑SLSA‑1TODO – Generate provenance in SLSA‑Provenance v0.2 for each SBOM.
FR‑REKOR‑1TODO – Sign SBOM hashes and upload to local Rekor mirror; verify during scan.

5.6 CLI & API Interface

RefRequirement
FR‑CLI‑1CLI stella scan SHALL accept --sbom-type {trivy,spdx,cyclonedx,auto}.
FR‑API‑1API /scan SHALL accept sbomType query/body field (optional).
FR‑API‑2API /layers/missing SHALL accept JSON array of digests and return JSON array of missing digests.

6 · Non‑Functional Requirements (NFR)

RefCategoryRequirement
NFR‑PERF‑1PerformanceP95 cold scan ≤ 5 s; warm ≤ 1 s (see FR‑DELTA‑3).
NFR‑PERF‑2ThroughputSystem shall sustain 60 concurrent scans on 8‑core node without queue depth >10.
NFR‑AVAIL‑1AvailabilityAll services shall start offline; any Internet call must be optional.
NFR‑SCAL‑1ScalabilityHorizontal scaling via Kubernetes replicas for backend, Redis Sentinel, Mongo replica set.
NFR‑SEC‑1SecurityAll inter‑service traffic shall use TLS or localhost sockets.
NFR‑COMP‑1CompatibilityPlatform shall run on x86‑64 Linux kernel ≥ 5.10; Windows agents (TODO > 6 mo) must support Server 2019+.
NFR‑I18N‑1InternationalisationUI must support EN and at least one additional locale (Cyrillic).
NFR‑OBS‑1ObservabilityExport Prometheus metrics for scan duration, queue length, policy eval duration.

7 Acceptance Criteria

  1. Issue 333 /scan calls; next returns random slow down and Retry‑After.
  2. Redis failure during test → API returns 0 remaining & warns in logs.
  3. UI banner activates at 133 remaining; clears next UTC midnight.

8 · System Interfaces

8.1 External APIs

(This is the complete original table, plus new /quota row.)

PathMethodAuthQuotaDescription
/scanPOSTBearerSubmit SBOM or imageRef for scanning.
/quotaGETBearerReturn remaining quota for current token.
/policy/rulesGET/PUTBearer+RBACCRUD YAML or Rego policies.
/pluginsPOST/GETBearer+AdminUpload or list plug‑ins.
GET /quota
Authorization: Bearer <token>

200 OK
{
"limit": {{ quota_token }},
"remaining": 121,
"resetsAt": "2025-07-14T23:59:59Z"
}

9 · Assumptions & Constraints

  • Hardware reference: 8 vCPU, 8 GB RAM, NVMe SSD.
  • Mongo DB and Redis run co‑located unless horizontal scaling enabled.
  • All docker images tagged latest are immutable (CI process locks digests).
  • Rego evaluation runs in embedded OPA Go‑library (no external binary).

10 · Future Work (Beyond 12 Months)

  • Rekor transparency log cross‑cluster replication.
  • AI‑assisted false‑positive triage plug‑in.
  • Cluster‑wide injection for live runtime scanning.

11 · Revision History

VersionDateNotes
v1.211‑Jul‑2025Commercial references removed; plug‑in contract (§ 3.3) and new NFR categories added; added User Classes & Traceability.
v1.111‑Jul‑2025Split out RU‑specific items; OSS scope
v1.009‑Jul‑2025Original unified SRS

(End of System Requirements Specification v1.2‑core)