Skip to content

8.8 The docs site's privacy gate

The repository is private, its docs site public: only the folders mkdocs.yml lists are published, and every build passes a gate that fails on a secret or on a private detail that is no secret before anything is deployed (ADR 0006 (docs/adr/0006-public-docs-site.md), proposed, its option 1 the working default; ci/checks.md). The reason: every page the site publishes is readable by anyone, and a value that leaves through it cannot be taken back. The gate is a second line of defence; the pre-push hook and CI's history scan stay the first (8.1).

Rules

  1. Private by default. exclude_docs excludes everything and lets each public folder back in by name; a new folder stays private until a reviewed pull request adds its line. adr/, plans/ and specs/ are not published, nor is the architecture description's writing-rules file (ci/checks.md).
  2. No link into the private repository. A link into a file or folder the site does not publish is rendered as the target's path in code style; the Markdown stays unchanged, so the link still works on GitHub. The site check fails on a relative link that resolves to no page of the site and on a link to the repository's files; links to other sites, and to the repository's issues and milestones, stay (ci/checks.md).
  3. The owner's login is masked as <owner> on every page, code blocks included; the sources keep it, as 8.2 requires (#712).
  4. The gate reads what is published: the built site, its page text and its paths, for secrets and for personal or internal details that are no secret (ci/checks.md).
  5. The gate proves it ran. A selftest makes it fail on fixture pages that must fail, and it fails while one of its inputs is unset (ci/checks.md).
  6. A finding names file, line and rule, never the value, and is fixed in the source: the value becomes a placeholder, or the page leaves the list. A false positive is allowlisted with its reason; a real secret or a person's address never is—it comes off the page, and a secret is rotated (ci/checks.md).
  7. Before the merge too. A pull request that changes the site's inputs runs the same steps without the deploy, so a finding shows before the merge (ci/checks.md).

Where it is described

Topic How-to
The workflow, its steps, the inputs and the false positives ci/checks.md
The choice of generator, hosting and gate ADR 0006 (docs/adr/0006-public-docs-site.md)
Where a page goes, and what is published authoring/writing-docs.md