> For the complete documentation index, see [llms.txt](https://faction-os.gitbook.io/faction-os-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase19-session09-heroes-and-lineage/security-compliance.md).

# Security & Compliance Report

**Session ID**: `phase19-session09-heroes-and-lineage` **Package**: cross-cutting (`Package: null`) **Reviewed**: 2026-06-26 **Result**: PASS

## Scope

**Files reviewed** (session-touched deliverables and supporting tests/docs):

* `apps/hooks/src/_lib.js` - hook redaction and bounded metadata helpers.
* `apps/hooks/src/factionos-hero-spawn.js` - hero lifecycle hook metadata.
* `apps/hooks/src/factionos-subagent-start.js` - subagent lifecycle hook metadata.
* `apps/hooks/tests/hookRuntime.test.js` - hook metadata privacy coverage.
* `apps/server/src/lib/commandCenterValidation.ts` - lifecycle and lineage route validation.
* `apps/server/src/lib/guardedActionValidation.ts` - guarded-action validation maps.
* `apps/server/src/managers/executorRegistry.ts` - lifecycle executor posture.
* `apps/server/src/managers/heroLifecycleManager.ts` - lifecycle command audit manager.
* `apps/server/src/managers/missionGraph.ts` - lineage roster derivation.
* `apps/server/src/managers/orchestrationCommandCenter.ts` - lifecycle command-center integration.
* `apps/server/src/routes/commandCenter.ts` - lifecycle and lineage routes.
* `apps/server/src/routes/event.ts` - hook lifecycle promotion.
* `apps/server/src/server.ts` - command-center dependency wiring.
* `apps/server/tests/commandCenterManager.test.ts` - lifecycle manager integration coverage.
* `apps/server/tests/commandCenterRoutes.test.ts` - route and WebSocket coverage.
* `apps/server/tests/commandCenterValidation.test.ts` - route validation coverage.
* `apps/server/tests/eventIngest.test.ts` - hook ingest coverage.
* `apps/server/tests/executorRegistry.test.ts` - executor posture coverage.
* `apps/server/tests/heroLifecycleManager.test.ts` - lifecycle manager coverage.
* `apps/server/tests/missionGraph.test.ts` - roster derivation coverage.
* `apps/web/src/components/orchestration/CommandCenterPanes.tsx` - Hero/Lineage pane wiring.
* `apps/web/src/components/orchestration/HeroLineageWorkbench.tsx` - Hero/Lineage UI.
* `apps/web/src/components/orchestration/OrchestrationShell.tsx` - lifecycle and roster handlers.
* `apps/web/src/components/orchestration/OrchestrationTabs.tsx` - tab wiring.
* `apps/web/src/lib/commandCenterUi.ts` - redaction, labels, tab counts.
* `apps/web/src/lib/orchestrationApi.ts` - lifecycle mutation and roster fetch helpers.
* `apps/web/src/lib/orchestrationUi.ts` - guarded-action UI labels.
* `apps/web/tests/HeroLineageWorkbench.test.tsx` - Hero/Lineage component coverage.
* `apps/web/tests/OrchestrationPanel.test.tsx` - Orchestration panel coverage.
* `apps/web/tests/commandCenterStore.test.ts` - duplicate in-flight mutation coverage.
* `apps/web/tests/commandCenterUi.test.ts` - UI helper coverage.
* `apps/web/tests/orchestrationApi.test.ts` - web API helper coverage.
* `docs/api/README_api.md` - lifecycle and lineage API documentation.
* `packages/protocol/src/guardedActions.ts` - guarded-action contracts.
* `packages/protocol/src/lineage.ts` - lineage roster contracts.
* `packages/protocol/src/orchestrationCommandCenter.ts` - lifecycle contracts.
* `packages/protocol/tests/guardedActions.test.ts` - guarded-action contract tests.
* `packages/protocol/tests/lineage.test.ts` - lineage contract tests.
* `packages/protocol/tests/orchestrationCommandCenter.test.ts` - command-center contract tests.

Spec-system artifacts and `.spec_system/state.json` were excluded from the runtime security review because they are workflow metadata, not application execution paths.

**Review method**: Static analysis of changed deliverables, focused source inspection, full test suite, secret scan, and dependency-change check. Dependency audit was not applicable because dependency manifests and lockfiles were unchanged.

**Review evidence**:

* Command/check: `npm run security:secrets` under Node `v26.2.0`
  * Result: PASS
  * Evidence: `Secret scan passed (1785 tracked text files checked).`
* Command/check: `git diff --name-only HEAD -- package.json package-lock.json 'apps/*/package.json' 'packages/*/package.json' 'public-website/package.json'`
  * Result: PASS
  * Evidence: no dependency manifest or lockfile paths were returned.
* Command/check: targeted sensitive-pattern search with `rg -n "(process\\.env|Authorization|Bearer|token|secret|password|api[_-]?key|private[_-]?key|exec\\(|spawn\\(|child_process|eval\\(|new Function|innerHTML|dangerouslySetInnerHTML|localStorage|sessionStorage|document\\.cookie)" ...`
  * Result: PASS
  * Evidence: matches were expected hook environment reads, listener spawn in the pre-existing hook listener path, auth header forwarding, documentation privacy text, and redaction functions. No hardcoded secrets, browser storage of sensitive values, eval, or unsafe HTML sinks were found in session UI/server paths.
* Command/check: targeted privacy and validation search with `rg -n "(prompt|transcript|terminal output|command body|file contents|provider payload|absolute path|raw path|secret|token|redact|sanitize|safe[A-Z]|bounded|idempotency|in[- ]flight|expectedRevision|parseCommandCenter|parseLineage|unavailable|approved_not_executing)" ...`
  * Result: PASS
  * Evidence: lifecycle and lineage inputs are parsed through protocol validators, hook/server text is redacted or sanitized, lifecycle mutations use idempotency/expected revision fields, and unsupported executor families return unavailable or approved-not-executing states.
* Command/check: `npm test` under Node `v26.2.0`
  * Result: PASS
  * Evidence: 235 test files passed, 1 skipped; 2833 tests passed, 1 skipped.

## Security Assessment

### Overall: PASS

| Category                      | Status | Severity | Details                                                                                                                                                                                                                  |
| ----------------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Injection (SQLi, CMDi, LDAPi) | PASS   | --       | No SQL/database layer is present. Targeted search found no new dynamic shell execution in server/web routes; hook listener spawn remains a bounded local listener path using `process.execPath` and a fixed script path. |
| Hardcoded Secrets             | PASS   | --       | `npm run security:secrets` passed. Targeted search found no hardcoded credentials or API keys in session deliverables.                                                                                                   |
| Sensitive Data Exposure       | PASS   | --       | Lifecycle and lineage metadata uses bounded labels, `redactSensitiveText`, `sanitizeHookText`, protocol parser blocked-field checks, and tests asserting raw paths/tokens/transcripts do not appear.                     |
| Insecure Dependencies         | PASS   | --       | No dependency manifests or lockfiles changed in this session.                                                                                                                                                            |
| Security Misconfiguration     | PASS   | --       | No CORS, auth middleware, debug mode, or production security configuration changes were introduced. Lifecycle routes remain local command-center state only.                                                             |

### Security Findings

No security findings.

## GDPR Compliance Assessment

### Overall: N/A

*N/A because this session did not introduce new personal data collection or storage. It added bounded operational metadata for local hero lifecycle and subagent lineage state.*

**Categories reviewed**: Data Collection & Purpose, Consent Mechanism, Data Minimization, Right to Erasure, PII in Logs, Third-Party Data Transfers.

### Personal Data Inventory

No personal data collected or processed in this session.

### GDPR Findings

No GDPR findings.

## Recommendations

None - session is compliant.

## Sign-Off

* **Result**: PASS
* **Reviewed by**: AI validation (validate)
* **Date**: 2026-06-26


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase19-session09-heroes-and-lineage/security-compliance.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
