Skip to content

[CTX-0711] feat(sec): candidate trust/identity/secrets/roles kernels (OQ-054/055/057/084/085) - #1304

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-0711/sec-oq
Sep 23, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-0711/sec-oq

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Priority: P1 | Area: area:security | Labels: feat,P1,area:security | Milestone: v0.1.0 | RFC: OQ-054/OQ-055/OQ-057/OQ-084/OQ-085 (open) | Task: CTX-0711

Scope

Candidate kernels for the five open SEC sub-issues of epic #975: trust-level model (SEC-21), core ontology/identity (SEC-24), secret-storage tiers (SEC-22), api_key_env vs api_key_cmd semantics (SEC-23), role contract (SEC-25). Pure, bounded, tested, fail-closed types in bitty-plugin-host; no live-path wiring, no behavior change.

Per-issue verdicts

Issue OQ Verdict Link
#1090 SEC-21 trust-level model + capability domains OQ-085 open, BLOCKED EVIDENCE_ONLY — candidate TrustLevel 0-4 + CapabilityDomain admission sets only; enforcement needs the OQ-085 ruling first Relates #1090
#1093 SEC-24 core ontology/identity model OQ-084 open, BLOCKED EVIDENCE_ONLY — candidate EntityKind/OntologyId/Ownership naming only; persistence/permission need the OQ-084 ruling first Relates #1093
#1091 SEC-22 secret-storage tiers OQ-055 open, BLOCKED EVIDENCE_ONLY — candidate SecretTier + per-tier policy descriptors only; resolution/execution need the OQ-055 ruling first Relates #1091
#1092 SEC-23 api_key_env vs api_key_cmd semantics OQ-054 open, BLOCKED EVIDENCE_ONLY — candidate CredentialRef naming + exclusive-or precedence + narrow-only project boundary only; needs the OQ-054 ruling first Relates #1092
#1094 SEC-25 role contract for multi-agent work OQ-057 open, BLOCKED EVIDENCE_ONLY — candidate AgentRole table + enforcement points + sandbox flags only; authority still comes from grants via effective; needs the OQ-057 ruling first Relates #1094

Relates #1090 (EVIDENCE_ONLY: blocked on open OQ-085 owner ruling).
Relates #1093 (EVIDENCE_ONLY: blocked on open OQ-084 owner ruling).
Relates #1091 (EVIDENCE_ONLY: blocked on open OQ-055 owner ruling).
Relates #1092 (EVIDENCE_ONLY: blocked on open OQ-054 owner ruling).
Relates #1094 (EVIDENCE_ONLY: blocked on open OQ-057 owner ruling).

Contract outcome

  • Five new candidate modules (trust_levels, identity, secret_tiers, credential_ref, roles) following the [CTX-0678] feat(execution): RUN analysis batch risk class + sensitive input + lease + supervisor #1281 RUN pattern: pure data + validation, bounded constants with accepted-contract precedent, typed errors via PluginError, redacting-or-valueless diagnostics, 36 new unit tests.
  • Fail-closed throughout: unknown levels/kinds/tiers/roles deny, both-keys-set conflicts deny, project overlays narrow only, command references name without executing.
  • No live-path behavior change: nothing calls the new modules; accepted capability grammar, grant lifecycle, and secret store stay authoritative.
  • MSRV 1.85: no let-chains; cargo +1.85 check -p bitty-plugin-host clean.

Security/performance impact

No new trust transition (no socket, no new authority, no enforcement added). No hot-path code touched: the kernels are pure and deterministic. No perf-sensitive change.

Affected crates

  • bitty-plugin-host: 5 new modules + lib.rs re-exports and candidate-mapping docs.

Validation

  • cargo fmt --all -- --check clean
  • RUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets --locked clean
  • cargo check --workspace --locked clean
  • cargo test -p bitty-plugin-host --locked green (263 lib + integration suites, incl. 36 new unit tests)
  • cargo +1.85 check -p bitty-plugin-host --locked clean

@Xuepoo Xuepoo added this to the v0.1.0 milestone Sep 23, 2026
@Xuepoo Xuepoo added feat Feature P1 Priority: high area:security Area: security corpus / audit labels Sep 23, 2026
@Xuepoo
Xuepoo merged commit f49b6d6 into main Sep 23, 2026
15 checks passed
@Xuepoo
Xuepoo deleted the ctx-0711/sec-oq branch September 23, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:security Area: security corpus / audit feat Feature P1 Priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant