Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
cd12480
docs(architecture): add full ADR + DDD documentation set
claude May 9, 2026
f0850bf
feat(shared): add kernel (ids, time, events) and typed error hierarchy
claude May 10, 2026
3792148
feat(ops): split health probes (live/ready/startup) and add startup c…
claude May 10, 2026
fbb9c5e
merge(swarm): shared kernel + typed error hierarchy
claude May 10, 2026
125908d
merge(swarm): split health probes + startup config validation
claude May 10, 2026
48c854d
chore(lint): consolidate eslint flat config and unblock lint:check
claude May 10, 2026
6b70784
chore(test): consolidate jest config and unblock ESM transform
claude May 10, 2026
0dddc3c
chore(types): mechanical TS error sweep across boot path
claude May 10, 2026
cf7e462
fix(app): use express 5 named wildcard for 404 handler
claude May 10, 2026
4ad7635
merge(swarm): repo hygiene — unblock lint, jest, and trim TS errors
claude May 10, 2026
9697a41
chore(format): normalise CRLF -> LF and apply eslint --fix repo-wide
claude May 10, 2026
4b1bdfd
feat(iam): rewrite JWTManager on jose with kid set + Redis denylist
claude May 10, 2026
e2c80d0
feat(iam): wire middleware and AuthService to the new JWTManager
claude May 10, 2026
fc14c67
test(iam): unit specs and verify-path benchmark for the new JWTManager
claude May 10, 2026
5629f22
feat(audit): add AuditLogEntry model with append-only invariants
claude May 10, 2026
cc72564
feat(audit): add HashChainAppender with single-writer-per-shard
claude May 10, 2026
1da5358
feat(audit): add request/header sanitiser with denylist + truncation
claude May 10, 2026
61d2eef
feat(audit): integrate sanitiser + appender into request middleware
claude May 10, 2026
fe44799
test(audit): unit tests for chain/sanitiser/middleware/events + bench
claude May 10, 2026
94e0a07
merge(swarm): ADR-0006 JWT hardening (jose + kid + denylist + rotation)
claude May 10, 2026
2e6de16
merge(swarm): ADR-0017 hash-chained audit + ADR-0018 persistence
claude May 10, 2026
55efdac
feat(iam): add PermissionResolver for ADR-0008 effective-permission set
claude May 10, 2026
8b1e5ff
feat(iam): add RedisPermissionCache with 5-minute TTL per DDD-14
claude May 10, 2026
be3167a
feat(iam): add closed condition-evaluator registry for ABAC predicates
claude May 10, 2026
bc5eaac
feat(iam): add requirePermission middleware throwing typed errors
claude May 10, 2026
d90b34a
feat(iam): wire permission cache invalidation to EventBus
claude May 10, 2026
567bd57
test(iam): unit specs for resolver, cache, evaluator, middleware, inv…
claude May 10, 2026
47b17d3
feat(iam): publish iam.* domain events from JWTManager (ADR-0018)
claude May 10, 2026
3750497
feat(audit): publish audit.request + audit.chain.broken on EventBus
claude May 10, 2026
5070d8f
feat(iam): publish iam.* events from AuthService flows (ADR-0018)
claude May 10, 2026
157ed18
feat(audit): wire composition root + audit-context EventBus subscribers
claude May 10, 2026
faba2f3
merge(swarm): ADR-0018 EventBus wiring (composition + iam.*/audit.* p…
claude May 10, 2026
f388c80
merge(swarm): ADR-0008 RBAC (resolver + cache + evaluator + middleware)
claude May 10, 2026
9713ccf
feat(iam): wire RBAC into composition root (ADR-0008)
claude May 10, 2026
93c2d91
feat(redis): shared ioredis client + lifecycle helpers (ADR-0005)
claude May 10, 2026
b41ee2d
feat(rate-limit): Redis-backed bucket limiter (ADR-0016)
claude May 10, 2026
9be056a
feat(app): wire shared Redis client into composition root (Phase 1 wa…
claude May 10, 2026
2def0eb
test(redis): cover wave-3 health probe + permission cache + rate-limi…
claude May 10, 2026
91a78bb
feat(iam): refactor MFAService for ADR-0009 (TOTP + Argon2 backup codes)
claude May 10, 2026
0aef487
feat(iam): add MFA grace-period helper and requireMFAVerified middleware
claude May 10, 2026
1968c7a
test(iam): unit specs for MFA service, grace period, and step-up midd…
claude May 10, 2026
8e3964d
test(iam): add MFA verify benchmark (1000 TOTP + 1000 backup-code)
claude May 10, 2026
ded1528
merge(swarm): shared Redis client + ADR-0016 rate-limit Redis store
claude May 10, 2026
f7d6cb2
merge(swarm): ADR-0009 MFA hardening
claude May 10, 2026
65511c9
fix(iam): keep MFAService back-compat with legacy AuthService callsites
claude May 10, 2026
1628919
feat(iam): wire MFA enforcer default into composition root (ADR-0009)
claude May 10, 2026
68cb959
feat(discovery): add domain models for Phase 2 (DDD-06)
claude May 10, 2026
90af8b0
feat(discovery): add Mongoose persistence layer
claude May 10, 2026
313110f
feat(discovery): add KubernetesAdapter ACL with retries
claude May 10, 2026
c6f34be
feat(discovery): rewrite DiscoveryService, add scheduler, HTTP edge, …
claude May 10, 2026
1c10525
feat(discovery): wire Phase 2 composition root in app.ts
claude May 10, 2026
b95f3f4
style(discovery): apply prettier formatting and lift InMemory client …
claude May 10, 2026
726bc91
test(discovery): add unit suite + snapshot-hash bench
claude May 10, 2026
5012dd2
merge(swarm): Phase 2 — Infrastructure Discovery context (DDD-06)
claude May 10, 2026
13fb2c8
feat(security): add domain models for Phase 3 (DDD-07)
claude May 10, 2026
5289be8
feat(security): add Mongoose persistence layer
claude May 10, 2026
b8c2be2
feat(security): add scanner ACL with BuiltinPolicyScanner
claude May 10, 2026
9c6cb4b
feat(security): add application services and scan orchestrator
claude May 10, 2026
91e9de4
feat(security): add HTTP edge and public API barrel
claude May 10, 2026
802b9d4
feat(security): wire Phase 3 composition root in app.ts
claude May 10, 2026
0d3d433
test(security): add unit + HTTP test suites for Phase 3
claude May 10, 2026
32a9d08
test(security): add policy-engine benchmark
claude May 10, 2026
cb1e03d
merge(swarm): Phase 3 — Security & Compliance context (DDD-07)
claude May 10, 2026
7ab832d
feat(ai): add domain layer + Anthropic ACL for Phase 4 (DDD-08)
claude May 10, 2026
c88d374
feat(ai): add RAG, Python bridge, and persistence layer (DDD-08)
claude May 10, 2026
e0e19bd
feat(ai): add application services, HTTP edge, and public API barrel
claude May 10, 2026
43b8ade
feat(ai): wire Phase 4 composition root in app.ts (DDD-08)
claude May 10, 2026
2e79f74
test(ai): add unit suites for Phase 4 (DDD-08)
claude May 10, 2026
e60a710
test(ai): add Phase 4 benchmarks for redactor + prompt composer
claude May 10, 2026
f54d16f
merge(swarm): Phase 4 — AI Analysis context (DDD-08)
claude May 10, 2026
bd25300
feat(discovery): add snapshot archive port and S3/local-fs adapters
claude May 11, 2026
e92bb83
feat(discovery): extend snapshot persistence with archive metadata
claude May 11, 2026
cbe45c6
feat(discovery): add SnapshotArchiver domain service
claude May 11, 2026
5d0951f
feat(discovery): wire archive loop into scheduler and public API
claude May 11, 2026
aaf59ad
test(discovery): add unit suites for snapshot archive tier
claude May 11, 2026
ed8e43a
test(discovery): add snapshot-archive bench
claude May 11, 2026
16d2933
merge(swarm): snapshot archiving for Discovery context
claude May 11, 2026
1e7da2a
feat(security): add subprocess runner + retry/breaker primitives
claude May 12, 2026
b89cfa5
feat(security): wire real CLI execution for scanner adapters
claude May 12, 2026
7564823
feat(security): composite scanner toggle/concurrency/partial-event
claude May 12, 2026
5d9e098
test(security): add unit suites for scanner adapters + runner
claude May 12, 2026
8054401
test(security): add contract suite for real CLI scanners
claude May 12, 2026
92ca0c2
test(security): add bench for composite scanner fan-out
claude May 12, 2026
0f00d0a
merge(swarm): real CLI scanner toggle paths (Phase 3 deferred)
claude May 12, 2026
d704824
test(ai): add Chroma contract-test harness helpers
claude May 12, 2026
c213d90
test(ai): unit-test the Chroma contract harness itself
claude May 12, 2026
97c97a0
test(ai): add ChromaAdapter live contract spec
claude May 12, 2026
32c3b56
build(test): register the contract-test jest project
claude May 12, 2026
8e86af6
test(ai): add Chroma ingest/query perf bench
claude May 12, 2026
e4c2539
docs(ai): README for the Chroma contract suite
claude May 12, 2026
e6ddf3f
merge(swarm): ChromaDB contract-test harness (Phase 4 deferred)
claude May 12, 2026
48bbd3a
refactor(iam): widen AuthService DI surface for the composition root
claude May 12, 2026
e15cc8f
refactor(iam): convert auth router to a factory with per-bucket limiters
claude May 12, 2026
3f03c1a
refactor(iam): retire the legacy RateLimitMiddleware class
claude May 12, 2026
379b103
feat(iam): compose AuthService at the application root
claude May 12, 2026
7276670
test(iam): cover AuthService DI wireup, per-bucket limiters, and logi…
claude May 12, 2026
77185ef
docs(adr): mark JWT + rate-limit ADRs as implementation complete
claude May 12, 2026
db0e2ba
merge(swarm): AuthService → composition root + JWTManager Redis wirin…
claude May 12, 2026
376e2bf
docs: PRODUCTION_READINESS.md — mission state + ADR compliance matrix
claude May 16, 2026
b4fac8c
feat(security): explicit Helmet + CORS policy middleware (ADR-0024)
claude May 16, 2026
eb30f61
docs(adr): mark ADR-0024 (Helmet/CORS) as implementation complete
claude May 16, 2026
10a1e28
merge(swarm): ADR-0024 explicit Helmet + CORS policy
claude May 16, 2026
dad1a1c
fix(types): mongoose-doc-id and model statics/methods typing
claude May 16, 2026
ed8e81b
feat(security): wire ADR-0024 explicit Helmet + CORS in composition root
claude May 16, 2026
44ea2f7
fix(types): replace withErrorHandling with withTypedErrors in auth
claude May 16, 2026
cd12132
fix(types): database layer typing — mongo Db handles + redis options
claude May 16, 2026
f668d5d
fix(types): unknown-in-catch sweep + controller/middleware cleanup
claude May 16, 2026
5838346
feat(dashboard): implement Dashboard & Reporting context (DDD-10)
claude May 16, 2026
7eb51b4
merge(swarm): Dashboard & Reporting context (DDD-10)
claude May 16, 2026
0539b71
fix(types): keep slated-for-deletion services compiling under strict …
claude May 16, 2026
8ac4e31
merge(swarm): TypeScript debt sweep — tsc --noEmit exits 0
claude May 16, 2026
1ceb93a
fix(build): retire remaining require() calls + finalise TS-debt sweep
claude May 16, 2026
75b93fb
docs(ready): mark build/typecheck/lint + ADR-0024 complete in readine…
claude May 16, 2026
db48735
feat(performance): Performance bounded context (DDD-09)
claude May 16, 2026
5961d52
merge(swarm): Performance bounded context (DDD-09)
claude May 16, 2026
ae8278b
feat(dashboard): wire DDD-10 in composition root via supplier adapters
claude May 16, 2026
270e87f
feat(secrets): ADR-0025 operational primitives — ESO + SOPS + detect-…
claude May 16, 2026
7f12b2e
merge(swarm): ADR-0025 secrets management implementation
claude May 16, 2026
9c6ed4b
feat(audit): DDD-11 bounded-context extraction + ArchiveService + tra…
claude May 16, 2026
2507ded
merge(swarm): Audit context extraction + hardening (DDD-11)
claude May 16, 2026
9ef3e9b
feat(arch): enforce ADR-0010 + ADR-0011 boundaries via eslint-plugin-…
claude May 16, 2026
2a3ddcc
merge(swarm): ADR-0010 + ADR-0022 boundary enforcement via ESLint zones
claude May 16, 2026
49e81b2
chore: gitignore husky-generated .husky/ directory
claude May 16, 2026
d03c04c
feat(observability): ADR-0023 prom-client registry + /metrics endpoint
claude May 16, 2026
425e538
merge(swarm): ADR-0023 Prometheus metric registry
claude May 16, 2026
6a43555
feat(observability): mount /metrics + httpMetricsMiddleware in compos…
claude May 16, 2026
9f0159a
feat(audit): wire composeAudit({...}) in composition root + mount /ap…
claude May 16, 2026
605a4c2
docs: rewrite README + add INSTALL/RUNBOOK/TESTING playbooks
claude May 16, 2026
4523043
merge(swarm): README rewrite + INSTALL/RUNBOOK/TESTING playbooks
claude May 16, 2026
2f3c09c
chore(deps): upgrade direct deps with high/critical CVEs
claude May 16, 2026
0fff3a7
chore(deps): add overrides for transitive CVEs - audit 0/0/0/0
claude May 16, 2026
95077dc
docs(security): add CVE audit trail + CI deterministic-deps guard
claude May 16, 2026
2586514
merge(swarm): dependency CVE patch + adds — npm audit 41 -> 0
claude May 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
# ============================================
# Node.js dependencies
node_modules/

# Husky v9 generates `.husky/_/` on install (`npm run prepare`),
# and the prepare script copies scripts/git-hooks/pre-commit into
# .husky/pre-commit. The source-of-truth hook lives in
# scripts/git-hooks/ and is the code-reviewed artifact;
# .husky/ is the install target and should not be tracked.
.husky/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
Expand Down
54 changes: 54 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# pre-commit-tool config (ADR-0025).
#
# Two scanners run on every commit and again in CI:
#
# 1. detect-secrets — high-entropy + known-pattern scan against staged
# diffs. Findings are diffed against `.secrets.baseline`; only new
# hits fail the commit. Refresh the baseline via
# `scripts/detect-secrets-update-baseline.sh` after auditing the
# new entries (and never wholesale-accepting unknown findings).
#
# 2. gitleaks — second scanner using a different rule set, catches
# patterns detect-secrets misses (especially provider-specific
# formats like Slack tokens, GitHub PATs, etc.).
#
# These hooks are tracked by the `pre-commit` (Python) framework, not
# by npm. Install once per workstation:
#
# pip install --user pre-commit detect-secrets
# pre-commit install
#
# CI runs `pre-commit run --all-files` as a gate, which protects against
# anyone bypassing the local hook with `--no-verify`.
repos:
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
name: detect-secrets (staged-only)
args:
- "--baseline"
- ".secrets.baseline"
# Exclude generated / vendored paths that would otherwise flood
# the scanner with false positives.
exclude: |
(?x)^(
package-lock\.json|
node_modules/.*|
coverage/.*|
dist/.*|
.*\.enc\.(yaml|yml|json|env)|
.*\.snap
)$

- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
hooks:
- id: gitleaks
name: gitleaks (staged-only)
# `--staged` keeps the scan scoped to the diff being committed,
# mirroring detect-secrets behaviour, so CI sees the same set.
args:
- "protect"
- "--staged"
- "--redact"
48 changes: 48 additions & 0 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"version": "1.5.0",
"plugins_used": [
{ "name": "ArtifactoryDetector" },
{ "name": "AWSKeyDetector" },
{ "name": "AzureStorageKeyDetector" },
{ "name": "Base64HighEntropyString", "limit": 4.5 },
{ "name": "BasicAuthDetector" },
{ "name": "CloudantDetector" },
{ "name": "DiscordBotTokenDetector" },
{ "name": "GitHubTokenDetector" },
{ "name": "GitLabTokenDetector" },
{ "name": "HexHighEntropyString", "limit": 3.0 },
{ "name": "IbmCloudIamDetector" },
{ "name": "IbmCosHmacDetector" },
{ "name": "IPPublicDetector" },
{ "name": "JwtTokenDetector" },
{ "name": "KeywordDetector", "keyword_exclude": "" },
{ "name": "MailchimpDetector" },
{ "name": "NpmDetector" },
{ "name": "OpenAIDetector" },
{ "name": "PrivateKeyDetector" },
{ "name": "PypiTokenDetector" },
{ "name": "SendGridDetector" },
{ "name": "SlackDetector" },
{ "name": "SoftlayerDetector" },
{ "name": "SquareOAuthDetector" },
{ "name": "StripeDetector" },
{ "name": "TelegramBotTokenDetector" },
{ "name": "TwilioKeyDetector" }
],
"filters_used": [
{ "path": "detect_secrets.filters.allowlist.is_line_allowlisted" },
{ "path": "detect_secrets.filters.common.is_baseline_file", "filename": ".secrets.baseline" },
{ "path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies", "min_level": 2 },
{ "path": "detect_secrets.filters.heuristic.is_indirect_reference" },
{ "path": "detect_secrets.filters.heuristic.is_likely_id_string" },
{ "path": "detect_secrets.filters.heuristic.is_lock_file" },
{ "path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string" },
{ "path": "detect_secrets.filters.heuristic.is_potential_uuid" },
{ "path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign" },
{ "path": "detect_secrets.filters.heuristic.is_sequential_string" },
{ "path": "detect_secrets.filters.heuristic.is_swagger_file" },
{ "path": "detect_secrets.filters.heuristic.is_templated_secret" }
],
"results": {},
"generated_at": "2026-05-16T00:00:00Z"
}
48 changes: 48 additions & 0 deletions .sops.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# SOPS configuration (ADR-0025).
#
# SOPS encrypts low-risk, low-rotation values for *dev* and *staging*
# environments so they can live in git without exposing plaintext.
# Production secrets MUST go through the External Secrets Operator
# (see k8s/secrets/external-secrets/) — SOPS is not a substitute.
#
# Only files matching the patterns below are encrypted. Convention:
# any file named `*.enc.json`, `*.enc.yaml`, or `*.enc.env` is treated
# as ciphertext at rest. The plaintext sibling (`config.dev.json`)
# never gets committed — it is gitignored — and developers run
# `sops -d` to materialise it locally.
#
# Encryption uses two redundant key sources:
#
# 1. `age` — keys distributed to engineers via 1Password. The
# placeholder fingerprint below is illustrative; the real value is
# a public recipient key produced by `age-keygen` and stored in
# the team password manager. Rotate by regenerating the key with
# `age-keygen -o ~/.config/sops/age/keys.txt` and updating the
# `age:` field below in a follow-up PR.
#
# 2. `kms` — AWS KMS Customer Managed Key, ARN below. Provides a
# break-glass decrypt path that does not require an engineer's
# personal age key (used by CI). Rotate by creating a new CMK and
# replacing the ARN; SOPS will re-encrypt on the next `sops -e`.
#
# To re-key an existing file after rotating either source:
# sops updatekeys path/to/file.enc.yaml
#
# Pattern-match order matters — first matching rule wins, so the more
# specific `.enc.env` rule appears before the catch-all `.enc.{json,yaml}`.
creation_rules:
# Per-environment .enc.env files (loaded by `dotenv` after decrypt).
- path_regex: \.enc\.env$
age: >-
age1placeholder0000000000000000000000000000000000000000000000000000
kms: "arn:aws:kms:us-east-1:000000000000:key/00000000-0000-0000-0000-000000000000"
encrypted_regex: "^.*$"

# Structured config snippets — JSON & YAML.
- path_regex: \.enc\.(json|yaml|yml)$
age: >-
age1placeholder0000000000000000000000000000000000000000000000000000
kms: "arn:aws:kms:us-east-1:000000000000:key/00000000-0000-0000-0000-000000000000"
# For YAML/JSON SOPS encrypts values only; keys remain readable so
# `git diff` shows which fields changed.
encrypted_regex: "^(password|secret|token|key|api[_-]?key|client[_-]?secret|connection[_-]?string)$"
Loading