@su-sws/synthetic-web-team 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/AGENTS.md +149 -0
  2. package/README.md +321 -0
  3. package/package.json +58 -0
  4. package/packages/cli/bin/sws.mjs +722 -0
  5. package/packages/cli/src/axe.mjs +164 -0
  6. package/packages/cli/src/browser.mjs +192 -0
  7. package/packages/cli/src/checks.mjs +1254 -0
  8. package/packages/cli/src/github.mjs +131 -0
  9. package/packages/cli/src/history.mjs +137 -0
  10. package/packages/cli/src/perf.mjs +245 -0
  11. package/packages/cli/src/preflight.mjs +185 -0
  12. package/packages/cli/src/report.mjs +315 -0
  13. package/packages/cli/src/states.mjs +556 -0
  14. package/packages/wizard/bin/wizard.mjs +767 -0
  15. package/packages/wizard/src/detect.mjs +135 -0
  16. package/packages/wizard/src/emit.mjs +553 -0
  17. package/skills/role-accessibility-lead/SKILL.md +183 -0
  18. package/skills/role-api-architect/SKILL.md +65 -0
  19. package/skills/role-backend-developer/SKILL.md +66 -0
  20. package/skills/role-compliance-officer/SKILL.md +73 -0
  21. package/skills/role-content-designer/SKILL.md +145 -0
  22. package/skills/role-devops/SKILL.md +200 -0
  23. package/skills/role-discoverability/SKILL.md +164 -0
  24. package/skills/role-frontend-developer/SKILL.md +167 -0
  25. package/skills/role-fullstack-developer/SKILL.md +56 -0
  26. package/skills/role-identity-engineer/SKILL.md +77 -0
  27. package/skills/role-information-architect/SKILL.md +136 -0
  28. package/skills/role-infrastructure-architect/SKILL.md +60 -0
  29. package/skills/role-qa-engineer/SKILL.md +81 -0
  30. package/skills/role-security-operations/SKILL.md +56 -0
  31. package/skills/role-software-architect/SKILL.md +75 -0
  32. package/skills/role-staff-technical-architect/SKILL.md +73 -0
  33. package/skills/role-strategist/SKILL.md +122 -0
  34. package/skills/role-user-researcher/SKILL.md +66 -0
  35. package/skills/role-ux-designer/SKILL.md +159 -0
  36. package/skills/sws-compliance-check/SKILL.md +153 -0
  37. package/skills/sws-decanter/SKILL.md +191 -0
  38. package/skills/sws-deploy/SKILL.md +162 -0
  39. package/skills/sws-diverge/SKILL.md +131 -0
  40. package/skills/sws-github/SKILL.md +171 -0
  41. package/skills/sws-install/SKILL.md +97 -0
  42. package/skills/sws-netlify/SKILL.md +110 -0
  43. package/skills/sws-onboard/SKILL.md +85 -0
  44. package/skills/sws-preflight/SKILL.md +87 -0
  45. package/skills/sws-prior-art/SKILL.md +137 -0
  46. package/skills/sws-vercel/SKILL.md +117 -0
  47. package/standards/fragments/global-footer.yml +137 -0
  48. package/standards/fragments/identity-bar.yml +180 -0
  49. package/standards/hosting/capabilities.yml +215 -0
  50. package/standards/hosting/github-pages.yml +306 -0
  51. package/standards/hosting/netlify.yml +234 -0
  52. package/standards/hosting/vercel.yml +284 -0
  53. package/standards/patterns/components.md +162 -0
  54. package/standards/patterns/content.md +130 -0
  55. package/standards/patterns/decanter.md +352 -0
  56. package/standards/patterns/discoverability.md +121 -0
  57. package/standards/patterns/forms.md +116 -0
  58. package/standards/patterns/ia.md +126 -0
  59. package/standards/patterns/motion.md +267 -0
  60. package/standards/patterns/sws-conventions.md +225 -0
  61. package/standards/policy/accessibility.md +241 -0
  62. package/standards/policy/brand.md +213 -0
  63. package/standards/policy/escalation.md +53 -0
  64. package/standards/policy/identity.md +96 -0
  65. package/standards/policy/minsec.md +119 -0
  66. package/standards/policy/minweb.md +87 -0
  67. package/standards/policy/privacy.md +114 -0
  68. package/standards/policy/procurement.md +79 -0
  69. package/standards/prior-art/README.md +205 -0
  70. package/standards/prior-art/catalog.yml +409 -0
  71. package/standards/prior-art/patterns/INDEX.md +53 -0
  72. package/standards/prior-art/repos.yml +734 -0
  73. package/standards/recipes/astro-ssr/RECIPE.md +274 -0
  74. package/standards/recipes/astro-ssr/acceptance.yml +168 -0
  75. package/standards/recipes/astro-static/RECIPE.md +468 -0
  76. package/standards/recipes/astro-static/acceptance.yml +800 -0
  77. package/standards/recipes/next-ssr/RECIPE.md +407 -0
  78. package/standards/recipes/next-ssr/acceptance.yml +187 -0
  79. package/standards/scope.md +111 -0
  80. package/standards/stack/performance-budget.yml +95 -0
  81. package/standards/stack/reference-versions.yml +168 -0
  82. package/standards/stack/requirements.yml +154 -0
@@ -0,0 +1,213 @@
1
+ ---
2
+ policy: brand
3
+ title: Brand and the Stanford Identity Guide
4
+ reviewed: 2026-09-01
5
+ ---
6
+
7
+ # Brand and identity
8
+
9
+ Governed by the **Stanford Identity Guide**. Two pieces of page furniture are
10
+ non-negotiable; everything between them is yours to design.
11
+
12
+ ## What is actually binding, which is less than people assume
13
+
14
+ This distinction matters more than anything else in this file, and getting it
15
+ wrong makes the whole toolchain feel like an obstacle:
16
+
17
+ | Binding | Not binding |
18
+ |---|---|
19
+ | The Global Footer: exact link set, exact order, nothing else inside | Which components you build, and how they look |
20
+ | The Identity Bar, with nothing above it but a skip link | Page composition, layout, motion, imagery |
21
+ | The required Privacy and Accessibility links | Whether you match `www.stanford.edu` |
22
+ | Stanford type and colour as the site's visual basis | Every specific Decanter class and token choice |
23
+
24
+ **Policy governs only a sliver of the aesthetic.** Decanter is the *easiest
25
+ compliant path* — it hands you the footer, the Identity Bar and the tokens for
26
+ free — but it is **not a hard line on design choices**. A unit that wants to be
27
+ creative above the page furniture should be encouraged, not corrected. That
28
+ includes adopting a pattern seen on `www.stanford.edu` that has not yet landed in
29
+ Decanter 8: fine, go ahead, just know you own it until it does.
30
+
31
+ Stanford runs on carrots rather than sticks, and a person who feels blocked by
32
+ brand guidance goes their own way entirely — which is a worse outcome for brand
33
+ than a slightly unusual card component. Report the footer problem. Leave the
34
+ design alone.
35
+
36
+ The byte-exact contract lives in
37
+ `standards/fragments/global-footer.yml`. **Read it; do not type the footer from
38
+ memory.** Two of its ten URLs were wrong in this project's own first draft
39
+ because they were typed from memory.
40
+
41
+ ## Page furniture, in this order
42
+
43
+ 1. **Skip navigation link.** The only thing permitted above the Identity Bar.
44
+ 2. **Stanford Identity Bar.** Nothing above it but the skip link.
45
+ 3. Local header, navigation, page content. **Design freely here.**
46
+ 4. Optional **local footer**. Unit links go here.
47
+ 5. **Stanford Global Footer.** Immutable, exact.
48
+
49
+ ## The Identity Bar has a fixed height
50
+
51
+ It is brand furniture, not a design opportunity. It appears on every Stanford
52
+ site, so an inconsistent one is obvious the moment two sites sit side by side.
53
+
54
+ The exact markup is `standards/fragments/identity-bar.yml`. Use it verbatim:
55
+
56
+ ```html
57
+ <div class="bg-cardinal-red px-20 pt-5 pb-1 sm:px-30 md:px-50 lg:px-30">
58
+ <a class="logo inline-block text-20 leading-none text-white no-underline hocus:text-white hocus:underline"
59
+ href="https://www.stanford.edu">Stanford University<span class="sr-only"> (link is external)</span></a>
60
+ </div>
61
+ ```
62
+
63
+ Three things people get wrong, all of which this project got wrong first:
64
+
65
+ - **`pt-5 pb-1`, not `py-*`.** Five pixels above and one below on Decanter's
66
+ scale, giving a bar about 29px tall. A `py-12` container measures roughly 44px.
67
+ - **`logo`, not `font-serif`.** `.logo` is a Decanter *component* class carrying
68
+ `--font-stanford` and its discretionary ligatures. `font-serif` renders in
69
+ Source Serif 4 and loses them. `.logo` also forces cardinal red on hover and
70
+ focus, which is why `hocus:text-white` is needed inside the red bar.
71
+ - **No centred wrapper.** The padding sits directly on the red container.
72
+ Wrapping the link in `mx-auto max-w-*` moves the logo relative to every other
73
+ Stanford site.
74
+
75
+ `brand.identity-bar.exact` verifies this by **classes, not measured pixels** —
76
+ the bar still drifts about 0.7px across viewports, and a brand check that wobbles
77
+ gets switched off.
78
+
79
+ ### The ligature font is required, not optional
80
+
81
+ **Load the Stanford font wherever the Identity Bar appears.** Decanter's
82
+ `--font-stanford` is `Stanford, "Source Serif 4", Georgia, Times, …`, and
83
+ **Decanter 8 publishes no font assets** — `static/fonts/stanford.woff2` is in its
84
+ repository but not in the npm package. So a project that installs Decanter and
85
+ does nothing else gets the Source Serif 4 fallback: the wordmark renders in the
86
+ wrong typeface and the bar measures 28.8px instead of 30.8px. Nothing errors,
87
+ which is why `brand.identity-bar.font-loaded` exists.
88
+
89
+ ```css
90
+ @font-face {
91
+ font-family: 'Stanford';
92
+ src:
93
+ url('https://www-media.stanford.edu/assets/fonts/stanford.woff2') format('woff2'),
94
+ url('https://www-media.stanford.edu/assets/fonts/stanford.woff') format('woff');
95
+ font-weight: 300;
96
+ font-display: swap;
97
+ }
98
+ ```
99
+
100
+ Plus `<link rel="preconnect" href="https://www-media.stanford.edu" crossorigin>`,
101
+ since it is a separate origin and the bar is the first thing painted. That origin
102
+ will appear in `sws perf`'s third-party list: one 3.8 KB Stanford-hosted font, so
103
+ not a MinPriv concern, but expect to see it.
104
+
105
+ **A correction worth recording.** An earlier version of this file said not to add
106
+ the font, reasoning that the Decanter documentation site loads only Google Fonts
107
+ and renders the fallback too. That took current practice on one site as intent —
108
+ the error pattern in
109
+ [`../patterns/sws-conventions.md`](../patterns/sws-conventions.md). Decanter v7
110
+ shipped a `fonts.css` that loaded this exact font from this exact CDN.
111
+
112
+ ## The Global Footer is immutable
113
+
114
+ Per the Identity Guide, its links **may not be altered, reordered, or added to,
115
+ and nothing else may go inside it**.
116
+
117
+ **Unit links in the Global Footer is the single most common brand violation.**
118
+ They belong in the local footer above it.
119
+
120
+ Structural facts that a check must get right, and that an earlier draft here got
121
+ wrong:
122
+
123
+ - The links are in **two lists inside one `<nav>`**, not one list of ten. A check
124
+ written against a flat list produces false failures on correct markup.
125
+ - `nav` carries `aria-label="global footer menu"`.
126
+ - A stacked white Stanford logo, which is a link.
127
+ - Two copyright lines: `© Stanford University.` and
128
+ `Stanford, California 94305.`
129
+
130
+ **List one, Stanford-wide wayfinding, four links in this order:** Stanford Home,
131
+ Maps & Directions, Search Stanford, Emergency Info.
132
+
133
+ **List two, policy and compliance, six links in this order:** Terms of Use,
134
+ Privacy, Copyright, Trademarks, Non-Discrimination, Accessibility.
135
+
136
+ Two of those targets are corrections worth knowing, because the obvious guess is
137
+ wrong in both cases:
138
+
139
+ | Link | Canonical target | The wrong guess |
140
+ |---|---|---|
141
+ | Trademarks | Admin Guide policy 1.5.4 | `trademarks.stanford.edu` |
142
+ | Non-Discrimination | Student Services student policies | `equity.stanford.edu` |
143
+
144
+ Two links carry compliance weight beyond brand:
145
+
146
+ - **Privacy** satisfies the cookie disclosure obligation. See
147
+ [`privacy.md`](privacy.md).
148
+ - **Accessibility** satisfies the MinWeb barrier-reporting requirement. See
149
+ [`accessibility.md`](accessibility.md).
150
+
151
+ ## Type, colour, and links
152
+
153
+ Decanter supplies all of it as tokens. **Use the token, never the hex.** The
154
+ mechanics, token file paths, and entry points are in
155
+ [`../patterns/decanter.md`](../patterns/decanter.md).
156
+
157
+ `--color-cardinal-red` is `#8C1515`. If you find yourself typing that string,
158
+ use the token instead.
159
+
160
+ Contrast is the trap: Decanter's palette contains **both passing and failing
161
+ combinations, and the token name will not tell you which**. Check pairings at
162
+ design time.
163
+
164
+ ## A specific trap: www.stanford.edu is not Decanter
165
+
166
+ The Stanford homesite runs **its own design system**, derived from Decanter and
167
+ currently influencing Decanter 8. It sits **upstream** of the design system
168
+ rather than downstream, and it has no `decanter` dependency. That absence is a
169
+ deliberate architecture, not an oversight.
170
+
171
+ So:
172
+
173
+ - Its **brand furniture is authoritative**, because brand is brand and it is the
174
+ canonical site.
175
+ - Its **tokens and CSS are a parallel vocabulary.** Copying them into a Decanter
176
+ project produces something that looks approximately right and does not use the
177
+ design system. **That failure passes visual review and is invisible in a
178
+ screenshot**, which is what makes it worth naming.
179
+ - It is a **preview of where Decanter 8 is going.** Read it for direction, not as
180
+ a target to match today.
181
+
182
+ The same caution applies to `decanter.stanford.edu` and the Figma library, which
183
+ currently document **v7**: good for visual intent, useless for v8 token names. A
184
+ new Decanter 8 documentation site is in progress; until it ships, the shipped CSS
185
+ is the authority.
186
+
187
+ **When Figma and Decanter's CSS disagree, the CSS wins** on token names and
188
+ values.
189
+
190
+ ## Fonts and icons
191
+
192
+ Decanter ships no font assets. Import `fonts.css` for the full set or
193
+ `fonts-basic.css` for sans, serif, and the Stanford ligature logo font. Google
194
+ Fonts supplies **Source Sans 3 and Source Serif 4**; the logo ligature font comes
195
+ from the University Communications media CDN.
196
+
197
+ **Decanter 8 no longer ships Roboto Slab or Roboto Mono.** `font-slab` is removed
198
+ outright, and `font-mono` is no longer overridden — it falls through to Tailwind's
199
+ default system monospace stack. If a design calls for a slab or a specific
200
+ monospace face, that is now yours to load and declare. See
201
+ [`../patterns/decanter.md`](../patterns/decanter.md).
202
+
203
+ Use **Heroicons**. Do not use FontAwesome Pro: one SWS repo does, behind a
204
+ licence-gated preinstall token check, and a unit site inheriting that gets an
205
+ install failure and a licence nobody mentioned.
206
+
207
+ ## What an agent may not do
208
+
209
+ Change the footer. Reorder it. Add a unit link to it. Put anything above the
210
+ Identity Bar except the skip link. Edit
211
+ `standards/fragments/global-footer.yml` to make a project pass.
212
+
213
+ That fragment changes when **upstream** changes, and the change gets dated.
@@ -0,0 +1,53 @@
1
+ ---
2
+ policy: escalation
3
+ title: Escalation, which office and which door
4
+ reviewed: 2026-09-01
5
+ ---
6
+
7
+ # Escalation: which office, and which door
8
+
9
+ **The operational counterpart to "route, don't recommend."** That principle says name the responsible university office rather than a product. This file says *which* office and, more usefully, *which door* at that office.
10
+
11
+ The distinction matters. Handing someone three links and letting them pick is a link farm, not routing. The agent should choose the door based on the situation and give one answer, with the others available if the first turns out wrong.
12
+
13
+ ## Office of Digital Accessibility (ODA)
14
+
15
+ Hub: [uit.stanford.edu/accessibility/help](https://uit.stanford.edu/accessibility/help)
16
+
17
+ Three doors. Pick by situation, do not list all three.
18
+
19
+ | Situation | Door | Notes |
20
+ |---|---|---|
21
+ | **A site is about to launch**, or is being significantly revised | **Request an accessibility review** | This is a pre-launch gate, not a favour. It belongs on the launch checklist, and it needs lead time, so raise it during the project rather than the week before go-live |
22
+ | **Support question while building**: "is this pattern okay", "how do I fix this finding", "what does Siteimprove mean by this" | **Office hours** | Two weekly sessions: [Accessibility Office Hours](https://uit.stanford.edu/accessibility/help/office-hours), Tuesdays 11am–12pm Pacific, registration required for a 30-minute block, and bring a URL or a short description so they can prepare. Plus a **Siteimprove & Accessibility drop-in**, Thursdays 1–2pm Pacific, no registration, Zoom link in the `#cop-siteimprove` Slack channel |
23
+ | **General question**, policy interpretation, or none of the above fits | **Contact ODA** via the hub page | Also the correct door when a barrier has been reported and needs to be logged with ODA |
24
+
25
+ Both office hours are free to current faculty, staff, and students.
26
+
27
+ **Related obligations that are not ODA's door:**
28
+
29
+ - A **reported accessibility barrier** must be acknowledged in writing to the reporter, with ODA copied, including the date and the issue. That is a remediation obligation, and ODA coordinates the fix and timeframe.
30
+ - **Siteimprove registration** is a MinWeb requirement for public-facing sites, handled through its own intake form, not through ODA.
31
+ - **Procurement** of a third-party product needs a VPAT or ACR dated within the past 12 months. Different process, same office worth consulting.
32
+
33
+ ## Other offices
34
+
35
+ Same pattern. Fill these in as the routes get confirmed, and **never invent a door**: if the correct one is unknown, use the office's general contact and say that is what you are doing.
36
+
37
+ | Situation | Office | Door | Status |
38
+ |---|---|---|---|
39
+ | Subdomain name approval for a `stanford.edu` site | University Communications | Per the stanford.edu name assignment policy | Route needs confirming |
40
+ | Consent management, or a site with a genuine need for it | University Privacy Office | [privacy.stanford.edu](https://privacy.stanford.edu) | Confirmed: no banner required, no vendor centrally licensed, do not recommend one |
41
+ | Data Risk Assessment, triggered by personal data or new third-party services | UIT Security | DRA process | Route needs confirming |
42
+ | MinSec temporary exception | UIT Security, via the Business Owner | Exception request, valid up to 3 years | Route needs confirming |
43
+ | SSL certificate | UIT | SSL service | Route needs confirming |
44
+ | **Access to a Stanford GitHub org**, so a site is not owned by one person's personal account | The org's own owners | Ask the unit who administers their GitHub org; if nobody knows, the general UIT contact will route it | **Route needs confirming.** There is no single Stanford-wide GitHub door, and orgs are administered per unit, so do not invent one. This is an access request, not a purchase |
45
+
46
+ ## Rules for the agent
47
+
48
+ 1. **One door, chosen by situation.** Not a list.
49
+ 2. **Say why.** "This is pre-launch, so it needs an accessibility review" is more useful than a bare link.
50
+ 3. **Give the practical detail** that saves a round trip: registration required, bring a URL, lead time needed, which Slack channel.
51
+ 4. **Never invent a door.** General contact plus an honest "this is the general contact, they will route you" beats a confident wrong link.
52
+ 5. **Never substitute yourself for the office.** The agent can explain what WCAG 2.1 AA requires and fix findings. It cannot grant an exception, approve a subdomain, sign off a launch, or interpret policy on the university's behalf.
53
+ 6. **Escalation is advisory like everything else.** Prompt, record it in the launch checklist, do not block.
@@ -0,0 +1,96 @@
1
+ ---
2
+ policy: identity
3
+ title: Authentication and authorisation at Stanford
4
+ reviewed: 2026-09-01
5
+ ---
6
+
7
+ # Identity, authentication, authorisation
8
+
9
+ **v1 static sites have no authenticated surface by design.** This file exists
10
+ because improvising Stanford authentication is one of the few places where
11
+ getting it wrong has consequences beyond a bad website.
12
+
13
+ The full role lands in v2. Read this before writing any auth code.
14
+
15
+ ## "Add a login" is a tier change, not a feature
16
+
17
+ Adding authentication moves the site from `low` to at least `moderate`, which
18
+ attaches: Duo for all users and admins, centralised logging to Splunk, secure
19
+ SDLC with code review and static analysis, annual developer training, and weekly
20
+ encrypted backups. Regulated data takes it to `high`, adding a privileged access
21
+ workstation and a Data Risk Assessment before deployment.
22
+
23
+ See [`minsec.md`](minsec.md) for the full tier table and
24
+ [`privacy.md`](privacy.md) for the DRA.
25
+
26
+ So: flag the tier change, name the obligations, and route to UIT Security. Do not
27
+ let a login arrive as a checkbox.
28
+
29
+ ## What is actually true at Stanford
30
+
31
+ Verified as of August 2026.
32
+
33
+ | Fact | Detail |
34
+ |---|---|
35
+ | **SAML 2.0 is the primary recommended path** | Stanford's SSO service is **Weblogin**, implemented on Shibboleth. Registration is self-service through SPDB. Typical stack is a Shibboleth SP with Apache. `weblogin-auth-sdk` is the SDK that wraps this — see below |
36
+ | **WebAuth is archived legacy** | Do not build against it |
37
+ | **OIDC is supported** | Same Shibboleth IdP. Discovery at `https://login.stanford.edu/.well-known/openid-configuration` |
38
+ | **Duo two-step is required** | For all applications |
39
+ | **Authorisation is workgroup-based** | Workgroup Manager and Workgroup API 2.0 (JSON). Ask whether someone is in a workgroup; do not maintain your own user list |
40
+ | **MaIS Registry APIs use x509 mutual TLS** | CSR submitted to the MaIS Certificate Manager, plus data-owner approval |
41
+
42
+ ### The OIDC constraints, which are the operational traps
43
+
44
+ - **Confidential clients only.**
45
+ - **Authorization code flow only.**
46
+ - **PKCE enforced in production.**
47
+ - **User consent required** for claim release.
48
+ - **The RP secret expires yearly.** This is the one that breaks a working site
49
+ twelve months after launch, so put it in the runbook with a date.
50
+
51
+ ## Prior art
52
+
53
+ `cardinalsites-nextjs` (the `1.x` branch) is the **only SAML implementation
54
+ across the SWS repos**: `passport-saml`, `xml-encryption`, `jose`, plus
55
+ `node-vault` for secrets. It is the reference for this work.
56
+
57
+ Its era is **Decanter 7**, so borrow the auth patterns and not the CSS. The
58
+ precedence rule applies with full force: see `standards/prior-art/README.md`.
59
+
60
+ ### Which auth SDK, which was an open question and is now answered
61
+
62
+ **Answered by SWS, 2026-09-01.** Both are SAML libraries, and they are not
63
+ interchangeable:
64
+
65
+ | Package | Use it for |
66
+ |---|---|
67
+ | **`weblogin-auth-sdk`** | **The preferred package for everything.** Integrates with **Weblogin**, Stanford's primary SSO |
68
+ | `adapt-auth-sdk` | **Alumni-based websites only.** Not the general path |
69
+
70
+ `adapt-auth-sdk` appears at `^1.0.20` and `^2.1.0` in `adapt-directory` and
71
+ `adapt-online-giving`, neither of which is an alumni site in the obvious sense —
72
+ so **do not read those two usages as a general endorsement.** Reach for
73
+ `weblogin-auth-sdk` unless the site is specifically alumni-facing, and confirm
74
+ with SWS either way.
75
+
76
+ Neither package's npm/registry availability has been verified here; both are
77
+ understood to be internal SWS packages. Ask rather than guessing at an install
78
+ line.
79
+
80
+ ## Rules
81
+
82
+ 1. **Do not hand-roll session handling.**
83
+ 2. **Do not store Stanford credentials.**
84
+ 3. **Do not build a local user table as a shortcut.**
85
+ 4. **Do not invent a parallel permission model.** Stanford has workgroups.
86
+ 5. Secrets go in **HashiCorp Vault**, the SWS norm, not environment files.
87
+
88
+ ## Often the right answer is no authentication
89
+
90
+ If the requirement is "only our department should see this," then a private repo,
91
+ a non-indexed path, or simply not publishing it may serve better than standing up
92
+ a service provider. Ask what the site actually needs to restrict, and to whom,
93
+ before reaching for SAML.
94
+
95
+ Route to UIT Security and the authentication service owners per
96
+ [`escalation.md`](escalation.md).
@@ -0,0 +1,119 @@
1
+ ---
2
+ policy: minsec
3
+ title: MinSec, minimum security standards, and the risk tiers
4
+ reviewed: 2026-09-01
5
+ ---
6
+
7
+ # MinSec and the compliance tier
8
+
9
+ **This file is the canonical tier table.** Skills cite it rather than restating
10
+ it, because it was previously duplicated in eight places and duplicated policy
11
+ drifts.
12
+
13
+ ## The thing people get wrong
14
+
15
+ **MinSec applies to low-risk static sites.** There is no exemption for "it's
16
+ just a brochure site." A static site is not exempt from MinSec, it is merely
17
+ cheap to comply with.
18
+
19
+ ## Deriving the tier
20
+
21
+ Ask about the world, not about MinSec. Nobody should have to read a security
22
+ matrix to start a website.
23
+
24
+ | If the site... | Tier |
25
+ |---|---|
26
+ | Shows public information only | `low` |
27
+ | Collects or displays personal information, or authenticates users | `moderate` |
28
+ | Handles regulated data or payments | `high` |
29
+
30
+ Record the answer and the reasoning in `.sws/manifest.yml` under `tier` and
31
+ `tier_because`.
32
+
33
+ **A tier change is not a feature.** Adding a login, a form that collects personal
34
+ data, or a payment processor moves the site up this table and attaches real
35
+ obligations. Flag it as a tier change when it happens, name the new obligations,
36
+ and do not let it land quietly.
37
+
38
+ ## Obligations by tier
39
+
40
+ Each tier is **cumulative**: `moderate` carries everything in `low`.
41
+
42
+ ### `low`, which is every site
43
+
44
+ - Patch **high-severity findings within 7 days**, others **within 90**, using
45
+ NVD severity ratings, and stay on supported versions.
46
+ - **Monthly vulnerability scanning** (Qualys). Remediate severity 4 to 5 within
47
+ 7 days and severity 3 within 90.
48
+ - **Quarterly inventory** recording risk class and data volume.
49
+ - **Quarterly account and privilege review**, plus password complexity, and SUNet
50
+ login via SAML wherever authentication exists.
51
+ - **Least-privilege administrative accounts.**
52
+ - Minimum necessary services exposed through the network firewall.
53
+
54
+ ### `moderate` adds
55
+
56
+ - **Duo two-step for all users and admins.**
57
+ - **Centralised logging** to Splunk.
58
+ - **Secure SDLC**: security as a design requirement, code review, static analysis.
59
+ - **Annual SISA developer training.**
60
+ - **Weekly encrypted backups.**
61
+
62
+ ### `high` adds
63
+
64
+ - **Administrative access only from a privileged access workstation.**
65
+ - **A Data Risk Assessment before deployment.** See [`privacy.md`](privacy.md).
66
+ - Whichever of **PCI DSS, HIPAA, FISMA, or export controls** applies.
67
+
68
+ ## The servers tier, which self-hosting invokes
69
+
70
+ If you run a server, the MinSec **Servers** row applies at every risk level:
71
+ patching, monthly Qualys scanning, quarterly NetDB or SUSI inventory, host
72
+ firewall default-deny, and credential review. `moderate` adds Duo, centralised
73
+ logging, sysadmin training, CrowdStrike, an IDS such as OSSEC or Tripwire, and
74
+ data-centre hosting. `high` adds privileged access workstations and a DRA.
75
+
76
+ **Managed static hosting sheds nearly all of this**, which is the real argument
77
+ for it over a VM.
78
+
79
+ ## What ships as code, and what does not
80
+
81
+ Automation covers less of MinSec than people expect, and being honest about the
82
+ split is the point of this section.
83
+
84
+ | Covered today | How |
85
+ |---|---|
86
+ | Part of the patch cadence | Dependabot, grouped, weekly |
87
+ | Committed credentials | The one blocking check |
88
+ | HTTPS and certificates | Deploy path |
89
+ | Secret storage | Vault, the SWS norm |
90
+
91
+ | **Not** covered, and needs a person | Why |
92
+ |---|---|
93
+ | Scanning enrolment | Lives at the infrastructure layer, not in the repo |
94
+ | The quarterly inventory | Process, not code |
95
+ | Logging pipelines | Infrastructure |
96
+ | The privilege review cadence | Process, and the one most often skipped |
97
+ | Incident response | Route to UIT Security immediately; do not improvise |
98
+
99
+ **So write the runbook.** Most of what MinSec requires at `low` tier is a
100
+ documented process and a named human. The failure mode is that nobody writes it
101
+ down and the quarterly review never happens. `docs/ops/runbook.md` should name
102
+ who patches, who reviews accounts and how often, where the inventory lives, what
103
+ happens when a scan flags something, and who to call.
104
+
105
+ ## Temporary exceptions
106
+
107
+ A **MinSec temporary exception** is submitted by the Business Owner and can run
108
+ for **up to three years**. That is a request to UIT Security, not a decision an
109
+ agent or a developer makes.
110
+
111
+ Worth knowing: `.sws/acknowledged.yml` deliberately takes the same shape a
112
+ temporary exception does, with a reason, attribution, date, and `review_by`. The
113
+ record is therefore useful beyond this tool.
114
+
115
+ Route per [`escalation.md`](escalation.md), and note the security routes there are
116
+ still marked as needing confirmation.
117
+
118
+ **Do not recommend or rank security vendors or scanning products.** State the
119
+ obligation, name the office, stop.
@@ -0,0 +1,87 @@
1
+ ---
2
+ policy: minweb
3
+ title: MinWeb, the minimum standard for Stanford websites
4
+ reviewed: 2026-09-01
5
+ ---
6
+
7
+ # MinWeb
8
+
9
+ The baseline every Stanford website has to meet. Short, unglamorous, and the
10
+ source of most launch-blocking surprises, because the items with lead times are
11
+ approvals rather than code.
12
+
13
+ ## Scope, which is wider than people assume
14
+
15
+ MinWeb applies to **every `stanford.edu` site, plus Stanford-branded `.org` and
16
+ `.com` sites**. Moving off the primary domain does not shed the standards.
17
+ `sup.org` is the live example.
18
+
19
+ It also reaches hosted site builders. MinWeb explicitly notes that platforms
20
+ like Wix and Squarespace **shift the vulnerability and accessibility burden onto
21
+ the site owner** rather than removing it. Worth naming when someone proposes one
22
+ as the easy option.
23
+
24
+ ## The requirements
25
+
26
+ | Requirement | Detail | Mechanism |
27
+ |---|---|---|
28
+ | **Named business owner** | Valid Stanford affiliation and email, discoverable on the site | `minweb.ownership`, read from `.sws/manifest.yml` and the rendered page |
29
+ | **Named technical administrator** | Same | Same criterion |
30
+ | **MFA, or SSO with MFA, on all administrative logins** | Every admin login, no exceptions | Manual attestation on the launch checklist |
31
+ | **HTTPS with a live certificate** | UIT runs an SSL service | Deploy configuration plus a post-deploy check |
32
+ | **No API keys or credentials in Git** | The one irreversible harm in the whole standard | `minweb.no-secrets`, **the only blocking check in this system** |
33
+ | **Subdomain reflects the recognised unit name** | Approved by University Communications. Vanity URLs are not permitted for personal pages | Manual, and it has a lead time |
34
+ | **Stanford Global Footer, exact** | Immutable link set and order | `footer.*`, against `standards/fragments/global-footer.yml` |
35
+ | **Accessibility barrier-reporting link** | The Accessibility link in the Global Footer | Part of the footer contract |
36
+ | **Siteimprove registration** | Required for public-facing sites, through its own intake. **Google Analytics is not required** | Recorded in `.sws/manifest.yml`, nagged post-deploy |
37
+ | **DNS audits** | Dangling CNAMEs are a subdomain-takeover risk | Manual, part of secure sunset |
38
+
39
+ Two of these routinely surprise people, so say them plainly:
40
+
41
+ 1. **Siteimprove is required and Google Analytics is not.** This inverts the
42
+ usual assumption, and analytics carries privacy obligations of its own. See
43
+ [`privacy.md`](privacy.md).
44
+ 2. **A subdomain name is not yours to approve.** You can advise on a name.
45
+ University Communications approves it. Raise it during discovery, not the week
46
+ before launch, and route per [`escalation.md`](escalation.md).
47
+
48
+ ## Secrets: why this is the only gate
49
+
50
+ Everything in this project is advisory except committed credentials, because
51
+ that is the only finding where the harm cannot be undone by fixing it later.
52
+
53
+ The message has to change with the context, and getting this wrong is how a gate
54
+ gets worked around:
55
+
56
+ - **On a pull request**, blocking stops the leak from landing.
57
+ - **On a push to `main`**, the commit is already in the remote's history.
58
+ Blocking only prevents publishing the credential on a public website, which is
59
+ a real second exposure and worth stopping. But the useful order is: **rotate
60
+ the credential now**, because blocking the deploy does not un-leak it, then
61
+ clean the history, then push again.
62
+
63
+ "Secret detected" on its own teaches nothing.
64
+
65
+ In practice SWS handles this institutionally: secrets live in HashiCorp Vault,
66
+ not `.env` files, via `netlify-plugin-vault-variables` in the Storyblok family
67
+ and `node-vault` in the decoupled Drupal family. That makes the secrets check a
68
+ backstop rather than the primary control, which is a good position to be in and
69
+ does not make the check redundant.
70
+
71
+ ## Secure sunset
72
+
73
+ The step everyone forgets, and it is a MinWeb-adjacent obligation rather than
74
+ housekeeping. When a site retires: remove DNS, revoke credentials, archive or
75
+ delete content, and kill dangling CNAME records.
76
+
77
+ Ask for a sunset plan at the start of any campaign or event site, not at the end.
78
+ A dangling CNAME pointing at a decommissioned service is a subdomain takeover
79
+ waiting to happen.
80
+
81
+ ## What this file does not cover
82
+
83
+ - Patch cadence, scanning, and inventory: [`minsec.md`](minsec.md)
84
+ - WCAG conformance and ODA: [`accessibility.md`](accessibility.md)
85
+ - Transparency notices and cookies: [`privacy.md`](privacy.md)
86
+ - Footer and Identity Bar specifics: [`brand.md`](brand.md)
87
+ - Which office, and which door: [`escalation.md`](escalation.md)