> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase25-session07-mission-archive-actions/security-compliance.md).

# Security Compliance

**Session ID**: `phase25-session07-mission-archive-actions` **Started**: 2026-06-08 16:59 **Last Updated**: 2026-06-08 18:06

***

## Security Scope

This session adds a mission set-active/reactivate path. The write is limited to the `missions.json.active` pointer after validating the target mission exists. Mission documents, schemas, archive membership, and file locations must remain unchanged.

***

## Guardrails Reviewed

* [x] Admin writes remain local-dev only and require `HERMES_DASHBOARD_ADMIN=1`.
* [x] Write endpoints keep loopback and `X-Claude-OS-Token` preflight.
* [x] Demo UI state must never issue a bridge write.
* [x] UI writes must flow through `useHermesAdmin` instead of direct fetch calls.
* [x] Bridge request bodies must be bounded and schema-validated before file access.
* [x] Missing or malformed mission IDs must not change the active pointer.
* [x] Browser-visible feedback must redact tokens, local paths, and raw bridge details.

***

## Review Log

### Task T003 - Scaffold active-pointer security review

**Status**: Complete **Reviewed**: 2026-06-08 16:59

**Notes**:

* Created the security tracking file before implementing the set-active bridge, hook, and UI.
* Established pointer-only, admin-gated, redacted-feedback, and no-schema-drift review criteria.

***

## Final Review

* [x] Set-active writes are pointer-only and preserve mission documents.
* [x] Bridge writes remain protected by POST, loopback, token, admin-enabled, non-production, bounded body, ID validation, target existence, and replacement confirmation checks.
* [x] Current-active requests are idempotent and do not rewrite the mission store.
* [x] UI writes are gated through `useHermesAdmin` and disabled for demo, offline, token-failure, admin-disabled, and busy states.
* [x] Browser-visible errors flow through existing bounded/redacted feedback helpers.
* [x] Focused bridge, hook, parser, component, typecheck, script typecheck, lint, diff, ASCII/LF, and manual desktop/mobile review checks passed.


---

# 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://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase25-session07-mission-archive-actions/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.
