-
Notifications
You must be signed in to change notification settings - Fork 0
Security and Trust Model
StackCendra observes and eventually changes developer machines and production infrastructure. Security is therefore a product capability and a release gate, not a later hardening exercise.
AI proposes
→ user reviews
→ deterministic policy validates
→ an authorized constrained runner executes
→ audit records the action
→ health checks verify the outcome
No component may collapse these stages into an unrestricted AI-to-shell path.
Trusted for:
- user-approved local filesystem access;
- local-only credential decryption;
- OS keychain integration;
- interactive terminal and SSH operations;
- signing device-originated requests.
Not automatically trusted for:
- organization-wide administration;
- unattended production automation;
- exporting credential material.
Trusted for:
- product metadata;
- workflow coordination;
- policy and approval state;
- encrypted artifact references;
- audit indexing.
It should not possess plaintext local-only private keys.
Temporarily trusted for:
- a narrowly scoped target;
- a versioned action;
- short-lived authorization;
- the minimum referenced credentials;
- a bounded execution window.
It must not accept arbitrary unsanctioned commands from the AI service.
Untrusted for authorization.
It receives only approved, minimized evidence and returns hypotheses, explanations, and draft actions. Its output is treated as untrusted input to deterministic validation.
A protected execution target. Customer-hosted runners use outbound control connections and do not require public inbound SSH.
- Private keys are never stored or transmitted as plaintext.
- Passwords, tokens, private keys, and secret values are never written to ordinary logs.
- Secret values do not enter standard AI prompts.
- Credential APIs return references and metadata, not secret material.
- SSH host-key changes are never accepted silently.
- Production execution requires explicit environment context.
- Every privileged action is versioned, attributable, reviewable, and auditable.
- Default permissions deny access.
- Device and runner credentials are short-lived or revocable.
- User-visible previews distinguish reads from writes and destructive operations.
- Local discovery never executes repository code.
Privileged operations require a capability token bound to:
- actor;
- device or runner;
- organization and project;
- environment;
- target resource;
- action version;
- permitted parameters;
- issue and expiry times;
- correlation and approval references;
- replay protection.
Signatures prove origin; they do not replace authorization.
- encryption and decryption occur on the device;
- master material is protected by the OS keychain;
- cloud synchronization, if enabled, contains ciphertext only;
- the backend cannot initiate unattended sessions.
- envelope encryption separates data-encryption and key-encryption keys;
- decryption occurs only within an authorized runner context;
- access uses short-lived identity and policy checks;
- every access produces an audit event;
- plaintext is not exposed through ordinary APIs.
The two modes remain visibly distinct so users understand whether unattended execution is possible.
| Threat | Required controls |
|---|---|
| Malicious repository files | No code execution during scan, parser limits, path canonicalization, sandboxed parsers where justified |
| Symlink or junction escape | Resolve paths and enforce trusted-root containment |
| Prompt injection in source/logs | Treat evidence as untrusted data, isolate instructions, deterministic tool policy |
| Secret leakage | Structured redaction, entropy/pattern scanning, minimal evidence, no raw prompt inclusion |
| Runner takeover | Short-lived identity, outbound connection, capability scoping, revocation, isolation |
| SSH interception | Known-host verification, explicit fingerprint changes, modern algorithms |
| Cross-tenant access | Tenant-scoped queries, authorization tests, opaque identifiers, audit |
| Replay of approved commands | Nonces, expiry, action-version binding, idempotency keys |
| Supply-chain compromise | Lockfiles, signatures/checksums, dependency review, SBOM, provenance |
| Audit tampering | Append-oriented records, integrity protection, restricted access, external export |
| Destructive user error | Preview, policy, typed confirmation where appropriate, backup and rollback gates |
Redaction is applied:
- at collection boundaries;
- before persistence;
- before telemetry export;
- before AI evidence preparation;
- before user-shareable reports.
Redaction must preserve structure useful for diagnosis, such as protocol, host class, value presence, and validation outcome, without preserving secret literals.
Every security-relevant event includes:
- actor and authentication context;
- device or runner;
- organization, project, and environment;
- action and target;
- credential reference, never credential value;
- requested and effective parameters after redaction;
- policy and approval decisions;
- outcome and verification;
- timestamp, trace ID, and correlation ID.
No release containing privileged access ships without:
- threat-model update;
- negative authorization tests;
- redaction tests;
- dependency and secret scanning;
- recovery and revocation procedure;
- audit coverage;
- documented data retention;
- safe failure behavior.
StackCendra is currently in Phase 0. The complete Phase 0–13 plan is versioned in the main repository under docs/wiki; later-phase pages describe intended behavior, not current implementation.
- Phase 0 foundation
- Phase 0 backlog
- Release 0.1 discovery
- Phase delivery framework
- Roadmap
- Wiki review guide
- Risks and decisions