From 8a3340884d13ed25255742a8c646f9b17eeb0c45 Mon Sep 17 00:00:00 2001 From: AnalogMaker Date: Wed, 12 Aug 2026 20:28:57 -0400 Subject: [PATCH] Add: CI site build, header search, corpus filter, and SECURITY.md CI now builds the site (INDEXNOW=0) and runs the lineage-caption gate, matching AGENTS.md. The dormant YouTube nav link is parked. Header search submits to /search/?q= and PagefindUI preloads that term. The homepage corpus list filters All / Verified / Draft client-side. SECURITY.md states how to report issues for a public static archive. No verification.status or wiring_claim was changed. Signed-off-by: AnalogMaker --- .github/workflows/ci.yml | 10 +++++--- SECURITY.md | 20 ++++++++++++++++ site/src/layouts/Base.astro | 31 +++++++++++++++++-------- site/src/pages/index.astro | 46 ++++++++++++++++++++++++++++++++++++- site/src/pages/search.astro | 6 ++++- 5 files changed, 98 insertions(+), 15 deletions(-) create mode 100644 SECURITY.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0764498..4945dcc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,10 @@ jobs: # numbers cannot drift from the code that produced them. - run: node scripts/check-tonestack-spice.mjs working-directory: site - # Phase-0 roadmap for this workflow: - # - kiutils round-trip of amps/*/schematic.kicad_sch - # - schematic SVG rendering via kicad-cli + # The lineage caption gate reads the built page and proves the prose still + # names every derivation arrow the SVG draws. INDEXNOW=0 so a slow + # search-engine ping cannot fail CI (the ping is not a corpus claim). + - run: INDEXNOW=0 npm run build + working-directory: site + - run: node scripts/check-lineage-caption.mjs + working-directory: site diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..487f587 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,20 @@ +# Security + +Circuit Codex is a public static archive. There are no user accounts and no +authentication. The published site is generated files; being able to read this +repository is the product, not a vulnerability. + +## Reporting a vulnerability + +Report security issues privately via +[GitHub Security Advisories](https://github.com/TheAnalogMaker/circuit-codex/security/advisories/new) +on TheAnalogMaker/circuit-codex. If advisories are unavailable, [open an +issue](https://github.com/TheAnalogMaker/circuit-codex/issues/new). + +## What is not a vulnerability + +- **Public source.** Circuit data, the site, the Worker, and the CI config are + meant to be readable. Do not file “I can see the source” as a vulnerability. +- **Lethal voltages.** Tube amplifiers carry hundreds of volts, and filter + capacitors hold charge after power-off. That is a safety topic, not a software + bug. See the [high-voltage safety primer](https://circuitcodex.com/reference/safety/). diff --git a/site/src/layouts/Base.astro b/site/src/layouts/Base.astro index f84c82a..1c0c67f 100644 --- a/site/src/layouts/Base.astro +++ b/site/src/layouts/Base.astro @@ -112,15 +112,25 @@ const ldBlocks = [ a:hover,a:focus-visible{text-decoration:underline} :focus-visible{outline:2px solid var(--amber);outline-offset:2px;border-radius:2px} nav{border-bottom:1px solid var(--line);position:sticky;top:0;background:rgba(23,19,16,.94);backdrop-filter:blur(6px);z-index:9} - .nav-in{display:flex;align-items:baseline;gap:28px;padding:14px 0;flex-wrap:wrap} + .nav-in{display:flex;align-items:center;gap:28px;padding:14px 0;flex-wrap:wrap} .brand{font-family:var(--disp);text-transform:uppercase;letter-spacing:.22em;font-size:15px;color:var(--ink)} .brand b{color:var(--amber);font-weight:600} - /* Eight links do not fit one phone-width row: unwrapped, they pushed the whole - document 150 px wider than the viewport, so every page — not just the nav — - scrolled sideways, and a figure with its own sideways scroll had to compete - with the page for the same gesture. */ - .nav-links{display:flex;flex-wrap:wrap;gap:8px 20px;margin-left:auto;font-family:var(--disp);text-transform:uppercase;letter-spacing:.14em;font-size:12.5px} + /* Links plus the search field do not fit one phone-width row: unwrapped, they + pushed the whole document wider than the viewport, so every page — not just + the nav — scrolled sideways, and a figure with its own sideways scroll had + to compete with the page for the same gesture. Wrap is the fix; the field + shrinks rather than forcing a horizontal page scroll. */ + .nav-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;margin-left:auto;font-family:var(--disp);text-transform:uppercase;letter-spacing:.14em;font-size:12.5px} .nav-links a{color:var(--muted)} + .nav-search{flex:0 1 11rem;min-width:0;margin:0} + .nav-search input{ + appearance:none;-webkit-appearance:none;box-sizing:border-box;width:100%;min-width:0; + font-family:var(--body);font-size:13px;letter-spacing:0;text-transform:none; + color:var(--ink);background:var(--well);border:1px solid var(--line);border-radius:99px; + padding:4px 12px; + } + .nav-search input::placeholder{color:var(--faint);font-family:var(--disp);font-size:12px;letter-spacing:.1em;text-transform:uppercase} + .nav-search input:focus{outline:2px solid var(--amber);outline-offset:2px;border-color:var(--amber-dim)} h1,h2,h3{font-family:var(--disp);text-transform:uppercase;font-weight:600;letter-spacing:.06em;text-wrap:balance} .chip{font-family:var(--disp);text-transform:uppercase;letter-spacing:.1em;font-size:10.5px;border:1px solid var(--line);border-radius:99px;padding:2px 9px;color:var(--muted);white-space:nowrap} .chip.v{color:var(--amber);border-color:var(--amber-dim)} @@ -138,16 +148,17 @@ const ldBlocks = [