Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/added-securing-your-hive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Publish Hive's first-time operator security guide under Security, synced from `hivecommons/hive@v5`, and keep links to it from the Introduction and Security model pages on the documentation site.
7 changes: 7 additions & 0 deletions docs/content/hive/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ Start with [Zero to Automation: Getting Started with Hive](/docs/hive/getting-st
- [Architecture](/docs/hive/architecture)
- [Getting started](/docs/hive/getting-started)
- [Operator reference](https://github.com/hivecommons/hive/blob/v5/src/docs/operator-reference.md)
- [Maintainer commands](https://github.com/hivecommons/hive/blob/v5/src/docs/maintainer-commands.md) β€” slash commands for un-parking
issues, requesting help, confirming fixes, reopening issues, and using label
or assignment helpers.
- [Release channels](/docs/hive/release-channels) β€” what `stable`, `candidate`, and `edge` each mean and what to expect from them.
- [Security model](/docs/hive/security-model)
- [Data collection and telemetry](https://github.com/hivecommons/hive/blob/v5/src/docs/telemetry.md)
- [Securing your hive: a first-time operator's guide](/docs/hive/securing-your-hive)
- [Community and support](https://github.com/hivecommons/hive/blob/v5/src/docs/community.md)
- [Documentation map](/docs/hive/documentation-map)

Current docs target branch `v5`; use the [documentation map](/docs/hive/documentation-map) for v2 β†’ v4 and v4 β†’ v5 migration pointers.
465 changes: 465 additions & 0 deletions docs/content/hive/securing-your-hive.md

Large diffs are not rendered by default.

34 changes: 29 additions & 5 deletions docs/content/hive/security-model.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions scripts/sync-hive-docs.main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ describe("sync-hive-docs main()", () => {
"Edit the canonical source in the Hive repository.\n\n# README.md\n"
);

const securityGuide = readOut("securing-your-hive.md");
expect(securityGuide).toContain("/blob/v5/src/docs/securing-your-hive.md)");
expect(securityGuide).toContain("# securing-your-hive.md\n");

const backup = readOut("backup-dr.md");
expect(backup).toContain("/blob/v5/src/docs/backup-restore.md)");
expect(backup).toContain("# backup-restore.md\n");
Expand Down
9 changes: 9 additions & 0 deletions scripts/sync-hive-docs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ describe("rewriteLinkTarget β€” Case 1: in-tree synced docs -> site route", () =
);
});

it.each([README, "src/docs/security-model.md"])(
"keeps the operator security guide link internal from %s",
source => {
expect(rewriteLinkTarget("securing-your-hive.md", source)).toBe(
"/docs/hive/securing-your-hive"
);
}
);

it("rewrites a synced ADR sibling from adr/README.md to its adr/ route", () => {
expect(
rewriteLinkTarget("0001-record-architecture-decisions.md", ADR_README)
Expand Down
1 change: 1 addition & 0 deletions scripts/sync-hive-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const files: Array<{ source: string; target?: string }> = [
{ source: "release-channels.md" },
{ source: "contributor-relay.md" },
{ source: "security-model.md" },
{ source: "securing-your-hive.md" },
{ source: "troubleshooting.md" },
{ source: "backup-restore.md", target: "backup-dr.md" },
// Third-party integration guide (hivecommons/hive#10171).
Expand Down
13 changes: 13 additions & 0 deletions src/__tests__/page-map-hive-arm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ describe("buildPageMap('hive') β€” getNavStructure switch arm", () => {
expect(titles).toContain('Operations')
})

it('publishes the operator security guide in the Security section', () => {
const { pageMap, routeMap, filePaths } = buildPageMap('hive') as unknown as BuildResult
const security = pageMap.find((node) => node.name === 'Security')
expect(flatten(security?.children || [])).toContainEqual(expect.objectContaining({
kind: 'MdxPage',
name: 'Securing your hive',
route: '/docs/hive/security/securing-your-hive',
}))
expect(routeMap['security/securing-your-hive']).toBe('securing-your-hive.md')
expect(routeMap['securing-your-hive']).toBe('securing-your-hive.md')
expect(filePaths).toContain('securing-your-hive.md')
})

it('registers hive-specific pages such as architecture.md and governor.md', () => {
const { routeMap, filePaths } = buildPageMap('hive') as unknown as BuildResult
expect(filePaths).toContain('architecture.md')
Expand Down
1 change: 1 addition & 0 deletions src/app/docs/page-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ const NAV_STRUCTURE_HIVE: Array<{ title: string; items: NavItem[] }> = [
{
title: 'Security',
items: [
{ 'Securing your hive': 'securing-your-hive.md' },
{ 'Security model': 'security-model.md' },
{ 'Security threat model': 'security-threat-model.md' },
{ 'ACMM policy matrix': 'acmm-policy-matrix.md' },
Expand Down
Loading