Skip to content

Commit ecfe286

Browse files
authored
docs(security): centralize shared boundary model (#19)
- define project-wide actors, assets, trust boundaries, and proportional classification - keep executable admission and runtime mechanics with each Spoke - establish an independent ownership-correction task packet
1 parent 47f7439 commit ecfe286

4 files changed

Lines changed: 208 additions & 0 deletions

File tree

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
# Security Boundary Model
2+
3+
## Purpose
4+
5+
This document defines the shared security reasoning model for InKCre。It helps Humans and
6+
implementations distinguish a vulnerability from an ordinary bug,hardening opportunity,
7+
operational risk or accepted risk without maximizing controls for their own sake。
8+
9+
A security requirement needs an identified actor,protected asset,intended boundary,credible
10+
attack path and proportionate control。Exact protocol admission,database grants,rendering,
11+
credential handling and deployment behavior remain owned by the Unit that implements them。
12+
External vulnerability reporting remains owned by the applicable repository `SECURITY.md` and
13+
organization policy。
14+
15+
## Shared Deployment Model
16+
17+
```mermaid
18+
flowchart LR
19+
owner["Deployment owner"] -->|"operates and configures"| deployment["InKCre deployment"]
20+
peer["Admitted Peer"] -->|"admitted protocol"| deployment
21+
caller["Untrusted caller"] -->|"public or protocol surface"| deployment
22+
source["External source and untrusted content"] -->|"collection"| deployment
23+
extension["Reviewed Extension artifact"] -->|"declared runtime capability"| deployment
24+
deployment -->|"selected requests and data"| provider["External provider"]
25+
deployment -->|"persists"| infobase["Info-base"]
26+
```
27+
28+
The arrows are trust and authority boundaries,not a promise that every deployment exposes every
29+
path。Host isolation,transport termination,backups and provider custody are supplied by the
30+
selected deployment and must be assessed with its Unit-owned runtime documentation。
31+
32+
## Actors And Authority
33+
34+
| Actor | Shared posture |
35+
| --- | --- |
36+
| Deployment owner | Trusted administrator of one deployment。Can configure its Peers,inspect deployment-owned persistence and replace deployed artifacts。 |
37+
| Admitted Peer | Inside the deployment trust domain after satisfying one executable Peer protocol。Peer equality does not imply identical execution capability,but the current product does not promise per-user or per-tenant isolation between admitted Peers。 |
38+
| Untrusted caller | Has no deployment authority until admitted by the relevant public,Peer or Extension protocol。A public observation grants only its documented result。 |
39+
| Extension protocol caller | Untrusted until the Extension-owned admission mechanism succeeds。Successful Extension admission grants only that protocol's intended authority。 |
40+
| External source and collected content | Untrusted data。Collection does not make malformed,adversarial,stale or misleading content executable or trustworthy。 |
41+
| Reviewed Extension artifact | Trusted application code within the runtime that admits it。An Extension registry is an organization mechanism,not a sandbox or tenant boundary。 |
42+
| External provider | Outside the deployment boundary。It receives requests and data deliberately sent by configured capability code,subject to its own policy and credentials。 |
43+
44+
## Protected Assets
45+
46+
- confidentiality and integrity of info-base Blocks,Relations,stored bytes and derived output;
47+
- credentials and signing material used to admit Peers,Extension callers,Sources,Storages and
48+
external providers;
49+
- the deployment owner's control over collection,organization,retrieval,configuration and
50+
deletion;
51+
- artifact,migration and dependency integrity;
52+
- availability where an otherwise untrusted actor can cause meaningful denial,resource exhaustion
53+
or external cost。
54+
55+
## Shared Boundaries And Invariants
56+
57+
### Admission
58+
59+
Core,database,Peer and Extension protocols may expose different admission surfaces。Authority
60+
granted by one surface does not silently grant another surface's authority。Public routes reveal
61+
only their intentionally public observations。
62+
63+
CORS,obscurity,route naming and possession of a non-secret client identifier are not authorization
64+
boundaries。Exact claims,roles,credentials and denial behavior belong to the implementing Unit's
65+
executable contract。
66+
67+
### Persistence And Credentials
68+
69+
Persistence operated by the deployment is inside the deployment trust boundary unless a more
70+
specific topology says otherwise。Persisting a credential in access-controlled deployment
71+
configuration is not by itself a boundary violation。The relevant questions are whether an
72+
unauthorized actor can obtain or exercise it through responses,logs,public artifacts,backups or
73+
unrelated protocols,and whether its replacement and lifetime match the product need。
74+
75+
Encryption at rest,an external secret manager or non-persistence may become justified when a
76+
deployment introduces an untrusted persistence operator,independently exposed backups,multiple
77+
users,delegated administration,regulatory duties or another concrete boundary。They are not
78+
automatic requirements without that boundary。
79+
80+
### Data And Code
81+
82+
Collected content,filenames,metadata,provider responses,resolver input and AI input are data
83+
controlled partly or wholly by external parties。They must not become code,filesystem paths,SQL,
84+
templates,privileged commands or authorization decisions without an explicit validating boundary。
85+
86+
Storing or interpreting adversarial content is not itself a vulnerability。Executing it,letting it
87+
escape its intended data context or allowing it to drive privileged behavior may be one。Each
88+
presentation Unit remains responsible for safe rendering and interaction at its own boundary。
89+
90+
### Extensions And Artifacts
91+
92+
A reviewed Extension shares the authority of the runtime or Peer that loads it unless that runtime
93+
explicitly supplies a stronger isolation boundary。Runtime installation of unreviewed code is not
94+
part of the current shared product contract。Artifact construction,dependency admission and release
95+
integrity remain owned and enforced by the delivering repository。
96+
97+
### Privileged Operators
98+
99+
The deployment owner,host administrator,migration authority and anyone able to replace a running
100+
artifact already hold high authority within their scope。Protecting a deployment from its own fully
101+
privileged operator is not a default product goal;a deployment that separates these roles must
102+
document the new boundary explicitly。
103+
104+
## Security Classification
105+
106+
A vulnerability requires both security harm and a credible attack path。Examples include an actor
107+
crossing an intended boundary to:
108+
109+
- read,create,change or delete protected data without the authority granted by the relevant
110+
protocol;
111+
- forge or bypass admission and gain materially greater authority;
112+
- cause attacker-controlled data to execute code or privileged commands;
113+
- expose credentials or private content through responses,logs,artifacts,caches,backups or
114+
providers;
115+
- compromise artifact,migration or dependency integrity in a way that reaches users;
116+
- cause material denial of service or external cost from an otherwise untrusted position。
117+
118+
A surprising behavior,best-practice deviation,missing defense-in-depth layer or hypothetical
119+
consequence without a boundary crossing is insufficient by itself。It may still be an ordinary bug,
120+
privacy issue,hardening opportunity,operational risk or accepted risk。
121+
122+
## Common Non-Boundaries
123+
124+
Unless another topology introduces a different actor or authority boundary,the following are not
125+
vulnerabilities by themselves:
126+
127+
- a deployment owner reading or changing its own configuration,persistence,backups or process
128+
memory;
129+
- one admitted Peer exercising a capability intentionally shared with admitted Peers;
130+
- reviewed Extension code reaching resources intentionally available to its runtime;
131+
- a credential being persisted within access-controlled deployment configuration;
132+
- absence of encryption at rest or an extra authentication layer without a demonstrated
133+
unauthorized reader or caller;
134+
- malformed or hostile collected content being stored as inert data;
135+
- an architectural hardening proposal without an exploit path or user harm;
136+
- behavior requiring prior host-administrator,migration-authority or artifact-replacement access。
137+
138+
Accurate classification does not prohibit improvement。It prevents reliability,privacy or
139+
hardening work from borrowing false urgency from the word “vulnerability”。
140+
141+
## Proportionality Method
142+
143+
Before requiring a control or classifying a report,establish:
144+
145+
1. **Actor and capability**:who acts,and what authority do they already possess?
146+
2. **Asset and harm**:what protected interest changes,leaks,executes or becomes unavailable?
147+
3. **Boundary**:what intended separation is crossed?
148+
4. **Attack path**:what reproducible or technically credible steps connect actor to harm?
149+
5. **Existing controls**:which executable,deployment or operational mechanisms already reduce
150+
the risk?
151+
6. **Control cost**:what dependency,obscurity,failure mode,user friction or operational burden
152+
would the proposed control introduce?
153+
7. **Classification**:vulnerability,ordinary bug,hardening,operational risk or accepted risk?
154+
155+
Prefer the least complex control that materially changes the identified risk。Re-evaluate when an
156+
actor,asset,deployment assumption or trust boundary changes;do not preserve a conditional answer
157+
as a timeless rule。
158+
159+
## Ownership
160+
161+
- Shared actors,assets,boundaries and classification method:this document。
162+
- Product authority and cross-Unit topology:[System State And Authority](system-state-and-authority.md)
163+
and [Unit Topology](unit-topology.md)。
164+
- Exact admission,persistence,rendering,runtime and deployment mechanics:the implementing Unit's
165+
executable contract and local durable documentation。
166+
- External vulnerability reporting:the applicable repository `SECURITY.md` and organization policy。
167+
168+
Update this model when a shared actor,asset,deployment assumption or trust boundary changes。Do
169+
not duplicate Unit-local mechanics here merely because they are security-relevant。

‎20-product-tdd/unit-topology.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ Define cross-unit technical boundaries and ownership so changes do not leak resp
2222
- Peer equality does not imply identical execution ability. A business facade may execute
2323
locally on a capable Peer or delegate one exact synchronous capability to another live
2424
Peer without turning the deployment into a fixed frontend/backend hierarchy.
25+
- Shared actors,assets,trust boundaries and proportional security classification use the
26+
[Security Boundary Model](security-boundary-model.md)。Each Unit still owns its executable
27+
admission,rendering,runtime and deployment mechanics。
2528

2629
## Knowledge Capability Topology
2730

‎docs/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- [Product requirements](../10-prd/index.md)
66
- [Unit topology](../20-product-tdd/unit-topology.md)
7+
- [Security boundary model](../20-product-tdd/security-boundary-model.md)
78
- [System state and authority](../20-product-tdd/system-state-and-authority.md)
89
- [Cross-unit contracts](../20-product-tdd/cross-unit-contracts.md)
910
- [Knowledge capability contract](../20-product-tdd/knowledge-capability-contract.md)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Shared security model ownership
2+
3+
- **Objective**: move InKCre-wide actors,assets,trust boundaries and proportional security-classification method from
4+
`core-py` into the shared Hub,then leave core-py with only its runtime-specific application of that model。
5+
- **Guardrails**: this is an independent ownership correction,not a `knowledge-lifecycle-capabilities` Unit,security audit,
6+
control expansion or behavior change。Hub truth must remain meaningful without FastAPI,PostgREST,Alembic,one concrete
7+
Extension or one repository's CI。External reporting remains owned by each repository's `SECURITY.md` and organization
8+
policy;Spokes retain executable admission,rendering,runtime and deployment mechanics。
9+
- **Verification**: every migrated claim has one durable owner;Hub navigation reaches the shared model;core-py no longer
10+
presents the shared model as repository-local truth;Hub is committed and pushed before the Spoke shared ref moves;Hub and
11+
Spoke diffs pass their declared static checks。
12+
- **Current Truth**: `core-py/docs/30-unit-tdd/security-model.md` mixes stable project-wide reasoning with core-py actors,
13+
runtime vocabulary,deployment links and a Memos PAT worked example。Its project-wide content is already consumed as a
14+
collaboration boundary across InKCre,so repository-local ownership is misleading。
15+
- **Next Step**: publish a Hub-owned `20-product-tdd/security-boundary-model.md` containing only shared truth。After Human
16+
review and Hub push,bump core-py's `docs/_shared` ref and replace the local monolith with a thin core runtime boundary note。
17+
18+
## Ownership split
19+
20+
### Hub-owned
21+
22+
- deployment owner,admitted Peer,untrusted caller/content,Extension protocol caller,Extension artifact and external
23+
provider as shared actor categories;
24+
- protected info-base,credentials,owner authority,artifact integrity and attacker-reachable availability/cost;
25+
- admission,persistence,data/code,Extension and privileged-operator trust boundaries;
26+
- vulnerability versus bug,hardening,operational risk and accepted-risk classification;
27+
- actor → asset/harm → boundary → attack-path → existing-controls → control-cost reasoning;
28+
- the rule that deployment topology changes may change a security conclusion without changing the method。
29+
30+
### Spoke-owned
31+
32+
- exact routes,claims,roles,database grants,processes,migrations,logs,probes and deployment sequencing;
33+
- renderer,native-client and transport-specific data handling;
34+
- concrete Extension credentials and protocol admission;
35+
- repository CI/dependency admission and local worked examples。

0 commit comments

Comments
 (0)