Skip to content

Commit f7f018c

Browse files
author
Neo
committed
Rename security-package references matrix_security -> morpheus_security
The private security package was renamed matrix_security -> morpheus_security in its own repo. Update the public seam + call sites to import it by the new name so the deploy contract stays consistent: - runtime/security seam: from morpheus_security import ... / SECURITY_BACKEND - gateway + runtime call-site references and 2 docs - Matrix-Security-System repo-name references -> Morpheus-Security-System Interface names only — no security rules or internals added. The bridge sanitizer/exporter leak-filter patterns are deliberately left untouched. Verified: seam falls back to noop when the package is absent, binds SECURITY_BACKEND=morpheus_security when the renamed core is on the path.
1 parent ac49533 commit f7f018c

8 files changed

Lines changed: 23 additions & 23 deletions

File tree

CREDENTIALS_NEEDED.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The only remaining work is *you* supplying the credentials/accounts below and ru
55
the deploy. Nothing here ships with real secrets — every value is an env-var / config
66
placeholder. Default network is **Base Sepolia (testnet, chain 84532)**; nothing
77
touches mainnet, and the security layer stays in **OBSERVE** until you review it
8-
(see `Matrix-Security-System/ENFORCEMENT.md`).
8+
(see `Morpheus-Security-System/ENFORCEMENT.md`).
99

1010
Status legend used across the final report: **WORKING** (tested, runs) ·
1111
**CREDENTIAL-GATED** (code complete, needs the secret to function) · **UNVERIFIED**
@@ -19,7 +19,7 @@ Status legend used across the final report: **WORKING** (tested, runs) ·
1919
|---|---|---|
2020
| `MTRX` (iOS app) | private | `Config/PendingCredentials.swift` (all blank by default) |
2121
| `0pnMatrx` (platform) | public | `openmatrix.config.json` (copy from `.example`) + env vars |
22-
| `Matrix-Security-System` (security core) | private | env vars only (never committed) |
22+
| `Morpheus-Security-System` (security core) | private | env vars only (never committed) |
2323

2424
---
2525

@@ -79,7 +79,7 @@ Set under `services.<name>.*` in `openmatrix.config.json`. Each service returns
7979
| ccip | `services.ccip.router_address` (Base Sepolia CCIP router) + per-bridge addresses | CCIP/Hyperlane/Wormhole/Axelar/Stargate |
8080
| auctions | `services.auctions.auction_address` + `.orderbook_address` | Dutch/English/sealed-bid + orderbook |
8181

82-
## 5. Security layer (private `Matrix-Security-System`) — env only, never committed
82+
## 5. Security layer (private `Morpheus-Security-System`) — env only, never committed
8383

8484
| Credential | Env var | Unlocks |
8585
|---|---|---|
@@ -96,7 +96,7 @@ Set under `services.<name>.*` in `openmatrix.config.json`. Each service returns
9696

9797
| Credential | Where | Unlocks |
9898
|---|---|---|
99-
| Deploy key / fine-grained PAT with read on `Matrix-Security-System` | deploy CI / image build | `pip install git+ssh://…/Matrix-Security-System` so the seam binds real enforcement. Absent → platform runs with `SECURITY_BACKEND=noop` (safe, inert). See `Matrix-Security-System/DEPLOY_ASSEMBLY.md`. |
99+
| Deploy key / fine-grained PAT with read on `Morpheus-Security-System` | deploy CI / image build | `pip install git+ssh://…/Morpheus-Security-System` so the seam binds real enforcement. Absent → platform runs with `SECURITY_BACKEND=noop` (safe, inert). See `Morpheus-Security-System/DEPLOY_ASSEMBLY.md`. |
100100

101101
## 7. Per-component contract addresses (app) — fill AFTER `deploy_all.py`
102102

@@ -115,9 +115,9 @@ The full chain is wired in code: **app → gateway → agent → dispatcher →
115115
gate → tool → chain**. To exercise it end-to-end on Base Sepolia:
116116

117117
1. **Install both layers together** (per `DEPLOY_ASSEMBLY.md`): check out `0pnMatrx`,
118-
then `pip install -e .` of `Matrix-Security-System` alongside it (deploy key).
118+
then `pip install -e .` of `Morpheus-Security-System` alongside it (deploy key).
119119
Confirm `python -c "import runtime.security as s; print(s.SECURITY_BACKEND)"`
120-
prints `matrix_security` (not `noop`).
120+
prints `morpheus_security` (not `noop`).
121121
2. **Set the env** (sections 1, 3, 5): RPC, chain 84532, deploy key, platform wallet,
122122
`ANTHROPIC_API_KEY`, `OPENMATRIX_API_KEY`, owner + Twilio. Keep
123123
`OPNMATRX_MORPHEUS_MODE=observe`.

gateway/security_gate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
security seam (``runtime.security``).
1212
1313
The decision — allow / deny / classification — is made entirely inside the private
14-
``matrix_security`` package. When that package is not installed the seam is an inert
14+
``morpheus_security`` package. When that package is not installed the seam is an inert
1515
OBSERVE no-op and this gate allows everything (the platform still boots).
1616
1717
The one piece of routing metadata here, ``action_type_for``, maps a public service

gateway/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def __init__(self, config: dict):
257257
self._security_flush_task: asyncio.Task | None = None
258258
# Security OTP services — phone verification (owner + consumer phone connect).
259259
try:
260-
from runtime.security import OTPService, OwnerVerification # seam → matrix_security or no-op
260+
from runtime.security import OTPService, OwnerVerification # seam → morpheus_security or no-op
261261
self._otp = OTPService(self.config)
262262
self._owner = OwnerVerification(self.config, otp_service=self._otp)
263263
except Exception:
@@ -1330,7 +1330,7 @@ async def _start_cleanup_task(self, app: web.Application) -> None:
13301330
# and load durable bans before serving; then flush its durable state
13311331
# (bans -> DB/on-chain, breach alerts -> SMS/on-chain) on a short timer.
13321332
try:
1333-
from runtime.security import get_morpheus_security # seam → matrix_security or no-op
1333+
from runtime.security import get_morpheus_security # seam → morpheus_security or no-op
13341334
self._morpheus = get_morpheus_security(
13351335
{**self.config, "db": self.react_loop.memory.db}
13361336
)

runtime/access_policy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
This module is the coarse PUBLIC floor. The authoritative, finer-grained policy
1111
(exact per-agent sets, ban/freeze integration, the closed-source nuance) lives in
12-
the private ``matrix_security.agent_access`` package and supersedes this when it
12+
the private ``morpheus_security.agent_access`` package and supersedes this when it
1313
is installed. The security seam (``runtime.security.agent_access_allowed``) binds
1414
the two: private if present, else this default. Either way the boundary holds.
1515

runtime/config/validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class ConfigValidationError(RuntimeError):
7676
("notifications.webhook.bearer_token", "NOTIFY_WEBHOOK_BEARER", False),
7777
# NOTE: owner-verification secrets (OWNER_APPLE_ID / OWNER_WALLET /
7878
# OWNER_PHONE_NUMBER) are declared and validated by the private security
79-
# package (matrix_security), not here — the public platform never references
79+
# package (morpheus_security), not here — the public platform never references
8080
# the owner-auth factors. All env-only; never committed.
8181
# Observability
8282
("monitoring.sentry_dsn", "SENTRY_DSN", False),

runtime/protocols/integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def _init_protocols(self) -> None:
119119
# config is passed so the layer resolves owner/blockchain/db subtrees (the
120120
# gateway creates the singleton first, at startup, with the DB handle).
121121
try:
122-
from runtime.security import get_morpheus_security # seam → matrix_security or no-op
122+
from runtime.security import get_morpheus_security # seam → morpheus_security or no-op
123123
self._morpheus_security = get_morpheus_security(self.config)
124124
except Exception:
125125
logger.exception("Failed to initialise MorpheusSecurity")

runtime/security/SECURITY_INTERFACE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ owners, or sanitizes — are **not in this repository** and never will be.
2020

2121
## Two backends
2222

23-
- **`matrix_security` installed** → real enforcement (the private package,
23+
- **`morpheus_security` installed** → real enforcement (the private package,
2424
co-installed at deploy).
2525
- **not installed** (open-source clone, local dev) → an inert **OBSERVE no-op**:
2626
every action is allowed and logged, nothing is enforced. The platform boots
2727
and runs normally; it simply has no real security layer.
2828

29-
`SECURITY_BACKEND` (`"matrix_security"` or `"noop"`) reports which is active.
29+
`SECURITY_BACKEND` (`"morpheus_security"` or `"noop"`) reports which is active.
3030

3131
## Status
3232

runtime/security/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
This package is a BOUNDARY, not an implementation. It exposes the security
44
contract the open platform calls (the Morpheus gate, OTP, owner verification)
5-
and binds it to the private ``matrix_security`` package **if that package is
5+
and binds it to the private ``morpheus_security`` package **if that package is
66
installed**. If it is not — an open-source clone, or local dev — the seam falls
77
back to an inert OBSERVE no-op: every action is allowed and logged, nothing is
88
enforced. The platform boots either way.
@@ -11,7 +11,7 @@
1111
rules for HOW it decides (detection, classification, bans, owner/OTP internals,
1212
sanitizer patterns) live only in the private package and never appear here.
1313
14-
- Real enforcement → install ``matrix_security`` (private), co-located at deploy.
14+
- Real enforcement → install ``morpheus_security`` (private), co-located at deploy.
1515
- No private package → OBSERVE no-op (safe, non-blocking, no enforcement).
1616
1717
The Glasswing contract auditor (``audit.py``) is a separate, open feature and is
@@ -29,9 +29,9 @@
2929
logger = logging.getLogger(__name__)
3030

3131
try:
32-
# Real enforcement core (private repo: Matrix-Security-System). Present only
32+
# Real enforcement core (private repo: Morpheus-Security-System). Present only
3333
# when co-installed at deploy. The seam imports names, never logic.
34-
from matrix_security import ( # type: ignore
34+
from morpheus_security import ( # type: ignore
3535
MorpheusMode,
3636
MorpheusSecurity,
3737
OTPService,
@@ -41,16 +41,16 @@
4141
evaluate_agent_access as _private_agent_access,
4242
)
4343

44-
SECURITY_BACKEND = "matrix_security"
45-
logger.info("Security backend: matrix_security (real enforcement available)")
44+
SECURITY_BACKEND = "morpheus_security"
45+
logger.info("Security backend: morpheus_security (real enforcement available)")
4646

4747
except Exception: # ImportError, or any load error → inert OBSERVE no-op.
4848
SECURITY_BACKEND = "noop"
4949
_private_agent_access = None
5050
logger.warning(
51-
"Security backend: noop. The private matrix_security package is not "
51+
"Security backend: noop. The private morpheus_security package is not "
5252
"installed; the platform runs with security in OBSERVE (no enforcement). "
53-
"Install matrix_security for real enforcement (see SECURITY_INTERFACE.md)."
53+
"Install morpheus_security for real enforcement (see SECURITY_INTERFACE.md)."
5454
)
5555

5656
class MorpheusMode(str, Enum): # type: ignore[no-redef]
@@ -133,7 +133,7 @@ def agent_access_allowed(
133133
134134
The ToolDispatcher calls this on EVERY tool call, keyed on the trusted
135135
``agent`` from the request context. The authoritative policy lives in the
136-
private ``matrix_security`` package when installed; otherwise the public
136+
private ``morpheus_security`` package when installed; otherwise the public
137137
coarse default (``runtime.access_policy``) applies. Either way the per-agent
138138
boundary is enforced — a subverted agent cannot reach another agent's tools.
139139

0 commit comments

Comments
 (0)