@su-sws/synthetic-web-team 0.2.7 → 0.2.9
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.
- package/AGENTS.md +6 -0
- package/README.md +113 -11
- package/package.json +3 -2
- package/packages/cli/bin/sws.mjs +162 -14
- package/packages/cli/src/acknowledged.mjs +6 -1
- package/packages/cli/src/brief.mjs +393 -0
- package/packages/cli/src/preflight.mjs +1 -1
- package/packages/cli/src/prior-art.mjs +329 -0
- package/packages/cli/src/report.mjs +21 -2
- package/packages/wizard/bin/wizard.mjs +299 -12
- package/packages/wizard/src/detect.mjs +111 -1
- package/packages/wizard/src/emit.mjs +130 -9
- package/skills/role-api-architect/SKILL.md +119 -61
- package/skills/role-backend-developer/SKILL.md +145 -55
- package/skills/role-compliance-officer/SKILL.md +133 -57
- package/skills/role-devops/SKILL.md +9 -6
- package/skills/role-fullstack-developer/SKILL.md +104 -37
- package/skills/role-identity-engineer/SKILL.md +126 -60
- package/skills/role-information-architect/SKILL.md +1 -1
- package/skills/role-infrastructure-architect/SKILL.md +105 -32
- package/skills/role-qa-engineer/SKILL.md +128 -57
- package/skills/role-security-operations/SKILL.md +137 -33
- package/skills/role-software-architect/SKILL.md +133 -63
- package/skills/role-staff-technical-architect/SKILL.md +112 -50
- package/skills/role-user-researcher/SKILL.md +119 -45
- package/skills/role-ux-designer/SKILL.md +1 -1
- package/skills/sws-compliance-check/SKILL.md +1 -1
- package/skills/sws-diverge/SKILL.md +2 -2
- package/skills/sws-github/SKILL.md +2 -0
- package/skills/sws-install/SKILL.md +1 -1
- package/skills/sws-netlify/SKILL.md +2 -0
- package/skills/sws-preflight/SKILL.md +5 -0
- package/skills/sws-vercel/SKILL.md +2 -0
- package/standards/hosting/github-pages.yml +1 -0
- package/standards/hosting/netlify.yml +1 -0
- package/standards/hosting/vercel.yml +1 -0
- package/standards/patterns/bolt-ons.md +1 -1
- package/standards/policy/identity.md +1 -1
|
@@ -1,32 +1,67 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: role-infrastructure-architect
|
|
3
|
-
description: Hosting and infrastructure decisions for a Stanford site. Use when choosing where a site should live,
|
|
3
|
+
description: Hosting and infrastructure decisions for a Stanford site. Use when choosing where a site should live (Stanford Sites, GitHub Pages, Netlify, Vercel, Acquia, self-hosting), moving between hosts, planning DNS, subdomains and certificates, environments and preview URLs, sizing, or retiring a site.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Infrastructure
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Recommend the least infrastructure that meets the need, and be explicit that each
|
|
9
|
+
step up adds obligations, not just capability. Hosting is not where compliance is
|
|
10
|
+
won or lost: MinWeb's required list is short and almost every host clears it. The
|
|
11
|
+
real cost of a host is what you must then patch, administer, and eventually
|
|
12
|
+
retire.
|
|
13
|
+
|
|
14
|
+
How each host meets each need is in `standards/hosting/`; deploy steps are in
|
|
15
|
+
`sws-deploy`, `sws-github`, `sws-netlify`, and `sws-vercel`.
|
|
10
16
|
|
|
11
|
-
## The hosting decision
|
|
17
|
+
## The hosting decision
|
|
12
18
|
|
|
13
|
-
Ordered by how much
|
|
19
|
+
Ordered by how much the unit takes on:
|
|
14
20
|
|
|
15
21
|
| Option | You own | When |
|
|
16
22
|
|---|---|---|
|
|
17
23
|
| **Stanford Sites** | Content only | A unit with no developer. Free, already compliant, someone else patches it. Recommend this more often than feels natural |
|
|
18
|
-
| **GitHub Pages** | Build and content | Static site, one environment, no
|
|
19
|
-
| **Netlify** | Build, functions, config |
|
|
20
|
-
| **Vercel** | Same as Netlify |
|
|
21
|
-
| **Acquia** | Drupal application | Enterprise Drupal.
|
|
22
|
-
| **Self-hosted** | Everything, including MinSec
|
|
24
|
+
| **GitHub Pages** | Build and content | Static site, one environment, no headers or previews needed. Free |
|
|
25
|
+
| **Netlify** | Build, functions, config | One of the two hosts SWS runs, in the Storyblok family. Headers, redirects, functions, per-PR previews, Vault-backed env vars |
|
|
26
|
+
| **Vercel** | Same as Netlify | The other host SWS runs, in the decoupled Drupal family |
|
|
27
|
+
| **Acquia** | A Drupal application | Enterprise Drupal. Outside this package's recipes |
|
|
28
|
+
| **Self-hosted** | Everything, including the MinSec Servers row | Almost never right for a website |
|
|
29
|
+
|
|
30
|
+
**Neither Netlify nor Vercel is the house default.** Start from whichever the unit
|
|
31
|
+
already administers; running both is not a divergence.
|
|
32
|
+
|
|
33
|
+
Wix and Squarespace are worth naming as a caution: MinWeb notes they shift the
|
|
34
|
+
vulnerability and accessibility burden onto the site owner rather than removing it.
|
|
35
|
+
|
|
36
|
+
## Questions that pick the host
|
|
37
|
+
|
|
38
|
+
1. **Who will maintain this in two years?** If nobody technical, Stanford Sites.
|
|
39
|
+
2. **Does it need response headers, real redirects, or preview URLs?** If not, Pages.
|
|
40
|
+
3. **Does it need a server runtime?** Only for request-dependent work: a form handler,
|
|
41
|
+
a search route. If not, a static build on any host.
|
|
42
|
+
4. **Does the unit already administer a Netlify or Vercel account?** Use it.
|
|
43
|
+
5. **Who will hold the admin login, with MFA, and who is the backup?**
|
|
23
44
|
|
|
24
|
-
The
|
|
25
|
-
|
|
26
|
-
|
|
45
|
+
The recipe and host are separate choices. `astro-static` deploys to all three hosts;
|
|
46
|
+
a static build on Netlify or Vercel still gets headers, redirects, and previews from
|
|
47
|
+
host config with no runtime. **Do not reach for a server runtime you do not need.**
|
|
27
48
|
|
|
28
|
-
|
|
29
|
-
|
|
49
|
+
## What every host must give a Stanford site
|
|
50
|
+
|
|
51
|
+
From `standards/hosting/capabilities.yml`, required:
|
|
52
|
+
|
|
53
|
+
- **HTTPS with a valid, auto-renewing certificate.** UIT has an SSL service for
|
|
54
|
+
cases the host cannot cover.
|
|
55
|
+
- **The approved custom domain**, not only a vendor preview URL.
|
|
56
|
+
- **MFA on the hosting dashboard itself.** It can deploy and read secrets, so it is
|
|
57
|
+
an administrative login. The most-missed item.
|
|
58
|
+
- **Secrets injected, never committed.** Vault is the SWS source. `node-vault` is
|
|
59
|
+
host-portable; prefer it if the site might move.
|
|
60
|
+
- **The named technical administrator can log in**, read logs, and roll back.
|
|
61
|
+
- **Sunsettable**: site and DNS can both be fully removed.
|
|
62
|
+
|
|
63
|
+
Recommended, and advisory: the default security header set (Pages cannot send
|
|
64
|
+
headers), preview URLs, declarative redirects. A CSP is optional and off by default.
|
|
30
65
|
|
|
31
66
|
## MinSec has a server tier, and self-hosting invokes it
|
|
32
67
|
|
|
@@ -34,27 +69,65 @@ If you run a server, the MinSec Servers row applies at every risk level: patchin
|
|
|
34
69
|
monthly Qualys scanning, quarterly NetDB or SUSI inventory, host firewall
|
|
35
70
|
default-deny, and credential review. `moderate` adds Duo, centralised logging,
|
|
36
71
|
sysadmin training, CrowdStrike, an IDS such as OSSEC or Tripwire, and data-centre
|
|
37
|
-
hosting. `high` adds privileged access workstations and a
|
|
72
|
+
hosting. `high` adds privileged access workstations and a DRA.
|
|
73
|
+
|
|
74
|
+
Managed static hosting sheds nearly all of this. That is the argument, and it
|
|
75
|
+
usually settles the question.
|
|
76
|
+
|
|
77
|
+
## Environments
|
|
38
78
|
|
|
39
|
-
|
|
79
|
+
Keep the matrix small: local, preview, production. GitHub Pages serves one site, so
|
|
80
|
+
there are no per-PR previews; Netlify and Vercel give them free, which is a real
|
|
81
|
+
reason to move once more than one person reviews changes. Do not make pull requests
|
|
82
|
+
mandatory to get previews. Push to `main` deploys.
|
|
40
83
|
|
|
41
|
-
|
|
84
|
+
Record the matrix in `docs/ops/environments.md`.
|
|
42
85
|
|
|
43
|
-
|
|
44
|
-
|
|
86
|
+
## DNS, subdomains, certificates
|
|
87
|
+
|
|
88
|
+
- **The subdomain name must reflect the recognised unit name** and is approved by
|
|
89
|
+
University Communications. It has a lead time. Raise it in discovery; see
|
|
45
90
|
`role-information-architect`.
|
|
46
|
-
- **
|
|
47
|
-
|
|
48
|
-
- **Dangling CNAMEs are a real risk
|
|
49
|
-
|
|
50
|
-
- **
|
|
51
|
-
kill dangling records. This is the step everyone forgets.
|
|
91
|
+
- **Who controls the DNS record?** Find out before launch, and write it in the
|
|
92
|
+
runbook. It is usually not the developer.
|
|
93
|
+
- **Dangling CNAMEs are a real risk.** A record pointing at a decommissioned service
|
|
94
|
+
is a subdomain takeover waiting to happen. MinWeb calls for DNS audits.
|
|
95
|
+
- **A vendor preview domain is fine pre-launch**, never as the production URL.
|
|
52
96
|
|
|
53
|
-
##
|
|
97
|
+
## Moving hosts
|
|
54
98
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
certificate
|
|
99
|
+
Moving is more than swapping the adapter. List and move: secrets, redirects,
|
|
100
|
+
headers, form handling, environment variables, build settings, the custom domain
|
|
101
|
+
and its certificate, and admin access. Then remove the old site and its DNS so
|
|
102
|
+
nothing dangles. Record the move as a divergence or ADR with the reason.
|
|
103
|
+
|
|
104
|
+
## Sizing
|
|
105
|
+
|
|
106
|
+
Static Stanford unit sites are small. Watch bytes, not servers: `sws perf` measures
|
|
107
|
+
first-party transfer per route against `standards/stack/performance-budget.yml`.
|
|
108
|
+
Bandwidth spikes on a static site are usually bots or a large file someone linked,
|
|
109
|
+
not a capacity problem; look at what is being fetched before upgrading anything.
|
|
110
|
+
|
|
111
|
+
## Secure sunset
|
|
112
|
+
|
|
113
|
+
Remove DNS, revoke credentials, archive or delete content, kill dangling records.
|
|
114
|
+
Ask for the plan at the start of any campaign or event site, and write it in
|
|
115
|
+
`docs/ops/runbook.md`.
|
|
116
|
+
|
|
117
|
+
## Artifacts
|
|
118
|
+
|
|
119
|
+
| Artifact | Path |
|
|
120
|
+
|---|---|
|
|
121
|
+
| Hosting decision | `docs/adr/`, see `role-software-architect` |
|
|
122
|
+
| Host and domain | `.sws/manifest.yml` |
|
|
123
|
+
| Environment matrix | `docs/ops/environments.md` |
|
|
124
|
+
| DNS owner, expiries, sunset plan | `docs/ops/runbook.md` |
|
|
125
|
+
|
|
126
|
+
## Escalation
|
|
127
|
+
|
|
128
|
+
Subdomain names go to University Communications; certificates to UIT's SSL service.
|
|
129
|
+
Route per `standards/policy/escalation.md`. Both routes still need confirming, so
|
|
130
|
+
use the general contact and say so.
|
|
58
131
|
|
|
59
|
-
Do not recommend or rank commercial hosting vendors beyond stating what SWS
|
|
60
|
-
|
|
132
|
+
Do not recommend or rank commercial hosting vendors beyond stating what SWS already
|
|
133
|
+
runs and why. State the obligation, name the office.
|
|
@@ -1,81 +1,152 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: role-qa-engineer
|
|
3
|
-
description: Test strategy and quality assurance for a Stanford site. Use for test planning, exploratory and manual testing, regression
|
|
3
|
+
description: Test strategy and quality assurance for a Stanford site. Use for test planning, a pre-launch test pass, exploratory and manual testing, regression scope on a change, cross-browser and device coverage, link checking, deciding what is worth automating, or reviewing whether a test suite actually proves anything.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Quality assurance
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
The automated harness ships in `role-devops`: Playwright plus axe on every built
|
|
9
|
+
route, the hover and focus state audit, the performance budget, and the recipe's
|
|
10
|
+
acceptance criteria. This role is the judgment around it: what to test by hand,
|
|
11
|
+
what is worth automating, and whether a green run means what it says.
|
|
12
|
+
|
|
13
|
+
## Two rules that matter more than coverage
|
|
14
|
+
|
|
15
|
+
**A check that cannot run must report `unknown`, never `pass`.** This happened here:
|
|
16
|
+
a harness printed `TOTAL VIOLATIONS: 0` while axe had silently failed to load. A
|
|
17
|
+
report that says "clean" when it means "did not run" is worse than no report. When
|
|
18
|
+
you write or review a test, ask what it prints when its dependency is missing.
|
|
19
|
+
|
|
20
|
+
**Every acceptance criterion must map to an implemented check.** A criterion with
|
|
21
|
+
no check is a wish. Delete it or implement it.
|
|
12
22
|
|
|
13
23
|
## What already runs
|
|
14
24
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
- A weekly recipe canary that generates a project from scratch and checks it
|
|
25
|
+
| Check | Catches | Run with |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| Build | Broken builds, missing `site`, wrong base path | CI |
|
|
28
|
+
| axe on every route | Roughly 30 percent of accessibility issues | `sws a11y` |
|
|
29
|
+
| State audit | Colour-only hover and focus, removed focus outlines | `sws a11y` |
|
|
30
|
+
| Performance budget | First-party bytes and requests per route, third-party origins | `sws perf` |
|
|
31
|
+
| Acceptance criteria | Footer, Identity Bar, Decanter, MinWeb, SEO, workflow | `sws check` |
|
|
23
32
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
and `ccc-bulletin` adds BackstopJS visual regression. **Never convert an existing
|
|
27
|
-
Cypress suite.**
|
|
33
|
+
Not running yet: link checking, a post-deploy sweep, and the recipe canary.
|
|
34
|
+
Playwright is the forward default; **never convert an existing Cypress suite.**
|
|
28
35
|
|
|
29
|
-
##
|
|
36
|
+
## Proportionality
|
|
37
|
+
|
|
38
|
+
Do not build a test pyramid for a twelve-page department site. The honest default
|
|
39
|
+
for most SWS unit sites:
|
|
30
40
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"did not run" is worse than no report. axe needs a real browser; the footer check
|
|
35
|
-
needs built output.
|
|
41
|
+
1. The automated checks that already ship, in CI on every push.
|
|
42
|
+
2. A **manual pre-launch pass** (below).
|
|
43
|
+
3. **Exploratory testing by someone who did not build it.**
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
Unit tests earn their place when there is logic worth testing: a data transform, a
|
|
46
|
+
form handler, a search index builder, a date calculation. On a content site there
|
|
47
|
+
usually is none, and writing tests anyway produces a suite people delete.
|
|
40
48
|
|
|
41
|
-
##
|
|
49
|
+
## Plan by risk
|
|
42
50
|
|
|
43
|
-
|
|
51
|
+
For each part of the site, ask what fails, how likely it is, and how bad. That sets
|
|
52
|
+
where attention goes. On a Stanford unit site the high-risk list is short and
|
|
53
|
+
predictable:
|
|
44
54
|
|
|
45
|
-
- **
|
|
46
|
-
|
|
47
|
-
- **The
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- **
|
|
51
|
-
does the form actually reach someone. No tool knows.
|
|
52
|
-
- **Real device testing.** Emulation is not a phone.
|
|
53
|
-
- **Cross-browser** beyond the one Chromium the CI runs.
|
|
54
|
-
- **The states nobody designed**: empty, too much content, longest plausible name,
|
|
55
|
-
the unit that provided almost nothing.
|
|
55
|
+
- **Forms**: does a submission actually reach a person, and does an error recover?
|
|
56
|
+
- **Facts with consequences**: deadlines, fees, eligibility, contact details.
|
|
57
|
+
- **The homepage and top tasks**: the pages most visitors see.
|
|
58
|
+
- **Anything migrated**: redirects from old URLs, especially ones linked from
|
|
59
|
+
elsewhere.
|
|
60
|
+
- **Anything third-party**: embeds, maps, forms, which can break without a deploy.
|
|
56
61
|
|
|
57
|
-
|
|
62
|
+
Write the plan on one page at `docs/qa/test-plan.md`: what is in scope, what is
|
|
63
|
+
risky, who tests what, the browsers and devices, and the definition of done.
|
|
58
64
|
|
|
59
|
-
|
|
60
|
-
for most SWS unit sites:
|
|
65
|
+
## The pre-launch pass
|
|
61
66
|
|
|
62
|
-
|
|
63
|
-
2. A short **manual pre-launch pass**: click every nav item, submit every form,
|
|
64
|
-
check every external link, view on one real phone.
|
|
65
|
-
3. Exploratory testing by someone who did not build it.
|
|
67
|
+
Short, and done by a person:
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
- Click every navigation item and every link in the header and local footer.
|
|
70
|
+
- Submit every form with good input and with bad input. Confirm the good one arrives.
|
|
71
|
+
- Check every external link, and that legacy URLs redirect where they should.
|
|
72
|
+
- View the top pages on one real phone, not an emulator.
|
|
73
|
+
- Tab through the top pages end to end with no mouse.
|
|
74
|
+
- Zoom to 400 percent and reflow at 320 pixels.
|
|
75
|
+
- Read the facts with consequences against their source.
|
|
76
|
+
- Check the Global Footer and Identity Bar render, and nothing sits above the bar
|
|
77
|
+
except the skip link.
|
|
69
78
|
|
|
70
|
-
|
|
79
|
+
Record it, dated, with who did it, in `docs/qa/pre-launch.md`. The accessibility half
|
|
80
|
+
belongs in `docs/a11y/manual-checklist.md`; `role-accessibility-lead` owns that list.
|
|
71
81
|
|
|
72
|
-
|
|
73
|
-
gets attention. Plus regression scope on change, browser and device matrix tied to
|
|
74
|
-
actual analytics rather than a generic list, and an agreed definition of done.
|
|
82
|
+
## Exploratory testing
|
|
75
83
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
Someone using the site with intent, trying to break it, finds more than any suite
|
|
85
|
+
on a small site. Give them a charter, a time box, and somewhere to write:
|
|
86
|
+
|
|
87
|
+
- "As a prospective student, find the application deadline and the person to email."
|
|
88
|
+
- "As a keyboard-only user, register for the event."
|
|
89
|
+
- "As the unit's newest staff member, update the people page from GitHub's web UI."
|
|
90
|
+
|
|
91
|
+
The last one matters: with content in the repo, the editing path is part of the
|
|
92
|
+
product. Test that a non-developer can make a change and see it deploy.
|
|
93
|
+
|
|
94
|
+
### The states nobody designed
|
|
80
95
|
|
|
81
|
-
|
|
96
|
+
- Empty: a listing with no items, a person with no photo.
|
|
97
|
+
- Too much: the longest plausible name, a forty-word heading, a page with ninety
|
|
98
|
+
people.
|
|
99
|
+
- Missing: the unit that provided almost nothing.
|
|
100
|
+
- Slow: a third-party embed that does not load.
|
|
101
|
+
|
|
102
|
+
## Regression scope on a change
|
|
103
|
+
|
|
104
|
+
Most changes need nothing beyond CI. Widen the pass when a change touches:
|
|
105
|
+
|
|
106
|
+
| Change | Also check by hand |
|
|
107
|
+
|---|---|
|
|
108
|
+
| Layout, navigation, or a shared component | Every template that uses it, keyboard and phone |
|
|
109
|
+
| Global CSS or the Decanter entry | A sample of every page type, and forms if present |
|
|
110
|
+
| A form or server route | Submission end to end, errors, and the arrival |
|
|
111
|
+
| URLs or IA | The redirect map, and inbound links you know of |
|
|
112
|
+
| Dependencies with a major version bump | Build output size, a smoke pass of top pages |
|
|
113
|
+
|
|
114
|
+
## Browsers and devices
|
|
115
|
+
|
|
116
|
+
The CI runs one Chromium. Base the manual matrix on the site's own analytics where
|
|
117
|
+
it has them, not a generic list. Without analytics, a reasonable floor is the
|
|
118
|
+
current Safari on iOS, Chrome on Android, and one desktop browser that is not
|
|
119
|
+
Chromium. Emulation is not a phone.
|
|
120
|
+
|
|
121
|
+
## What automation will not tell you
|
|
122
|
+
|
|
123
|
+
- **The other ~70 percent of accessibility issues**: screen reader sense-making, alt
|
|
124
|
+
text quality, focus order, error recovery. `role-accessibility-lead`.
|
|
125
|
+
- **Content correctness**: is the deadline right, does the email address work.
|
|
126
|
+
- **Whether the form reaches someone.**
|
|
127
|
+
- **Whether a non-developer can edit the site.**
|
|
128
|
+
|
|
129
|
+
## When reviewing a test suite
|
|
130
|
+
|
|
131
|
+
- What does each test print when its dependency (browser, built output, network)
|
|
132
|
+
is missing? `unknown`, or a false pass?
|
|
133
|
+
- Does it test behaviour a visitor would notice, or implementation detail?
|
|
134
|
+
- Would it fail if the feature broke? Break it once, in a scratch copy, and see.
|
|
135
|
+
- Is it proportionate to the site, or will someone delete it in six months?
|
|
136
|
+
|
|
137
|
+
## Artifacts
|
|
138
|
+
|
|
139
|
+
| Artifact | Path |
|
|
140
|
+
|---|---|
|
|
141
|
+
| Test plan | `docs/qa/test-plan.md` |
|
|
142
|
+
| Pre-launch pass, dated | `docs/qa/pre-launch.md` |
|
|
143
|
+
| Exploratory session notes | `docs/qa/sessions/` |
|
|
144
|
+
| Manual accessibility checklist | `docs/a11y/manual-checklist.md` |
|
|
145
|
+
|
|
146
|
+
## Prior art
|
|
147
|
+
|
|
148
|
+
`adapt-stanford-homesite` is the reference for testing rigour at flagship scale:
|
|
149
|
+
Storybook with the a11y addon, Cypress e2e and component, Jest, MSW mocking.
|
|
150
|
+
`ccc-bulletin` runs BackstopJS visual regression, the only instance at SWS. Read
|
|
151
|
+
them for what thorough looks like, not as a shopping list. This package ships no
|
|
152
|
+
component workshop on purpose.
|
|
@@ -1,56 +1,160 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: role-security-operations
|
|
3
|
-
description: Stanford security operations for a website. Use for MinSec compliance, patching cadence, vulnerability
|
|
3
|
+
description: Stanford security operations for a website. Use for MinSec compliance, patching cadence, Dependabot and vulnerability scan triage, the quarterly inventory and privilege review, MFA on admin logins, security headers, a leaked credential, a suspected incident, secure sunset, or what security standards apply to a site.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Security operations
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Most of what MinSec asks of a Stanford website is not code. It is a cadence, a
|
|
9
|
+
named human, and a written-down process, and the failure mode is that nobody writes
|
|
10
|
+
it down and the quarterly review never happens. This role makes sure it happens.
|
|
11
|
+
|
|
12
|
+
The canonical tier table and obligations are `standards/policy/minsec.md`. Read it
|
|
13
|
+
rather than recalling it.
|
|
11
14
|
|
|
12
15
|
## The thing people get wrong
|
|
13
16
|
|
|
14
|
-
**MinSec applies to low-risk static sites.** There is no exemption for "it's just
|
|
15
|
-
|
|
17
|
+
**MinSec applies to low-risk static sites.** There is no exemption for "it's just a
|
|
18
|
+
brochure site." A static site is not exempt, it is just cheap to comply with.
|
|
16
19
|
|
|
17
|
-
The
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
The four that bite a `low`-tier static site: **patch high-severity findings within
|
|
21
|
+
7 days and others within 90**, **monthly Qualys scanning**, **quarterly inventory**,
|
|
22
|
+
and **quarterly account and privilege review**. Plus **MFA on every administrative
|
|
23
|
+
login** from MinWeb, which includes the hosting dashboard.
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
opening the file: **patch high-severity findings within 7 days and others
|
|
24
|
-
within 90**, **monthly Qualys scanning**, **quarterly inventory**, and
|
|
25
|
-
**quarterly account and privilege review**.
|
|
25
|
+
## What ships, and what needs a person
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
| Covered by the package | Needs a person |
|
|
28
|
+
|---|---|
|
|
29
|
+
| Dependabot, grouped, weekly: part of the patch cadence | Deciding and merging within 7 or 90 days |
|
|
30
|
+
| The secrets check, the one blocking check | Rotating a leaked credential |
|
|
31
|
+
| HTTPS and certificates via the deploy path | Scanning enrolment |
|
|
32
|
+
| Default security headers in host config | The quarterly inventory |
|
|
33
|
+
| Vault as the secret store | The quarterly privilege review |
|
|
34
|
+
| | Incident response: route, do not improvise |
|
|
28
35
|
|
|
29
|
-
|
|
30
|
-
check in the system. HTTPS and certificate requirements are in the deploy path.
|
|
31
|
-
Vault-based secret management is the SWS norm rather than `.env` files.
|
|
36
|
+
## The runbook is the deliverable
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
Write `docs/ops/runbook.md` at launch, not later. It should answer, with names and
|
|
39
|
+
not roles:
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
- **Who patches**, and who covers when they are away.
|
|
42
|
+
- **Who reviews accounts**, how often, and where the last review is recorded.
|
|
43
|
+
- **Where the inventory lives**, and its risk class and data volume.
|
|
44
|
+
- **What happens when a scan or Dependabot flags something**, and the clock.
|
|
45
|
+
- **Every expiry with a date**: certificates, OIDC RP secrets, tokens, domain renewal.
|
|
46
|
+
- **How to roll back** a bad deploy.
|
|
47
|
+
- **Who to call** for a suspected incident.
|
|
48
|
+
- **The sunset plan.**
|
|
37
49
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
writes it down and the quarterly review never happens.
|
|
50
|
+
A runbook that names a person who has left is a finding. Review it with the
|
|
51
|
+
privilege review.
|
|
41
52
|
|
|
42
|
-
|
|
43
|
-
often, where the inventory lives, what happens when a scan flags something, and
|
|
44
|
-
who to call.
|
|
53
|
+
## Patching
|
|
45
54
|
|
|
46
|
-
|
|
55
|
+
Severity follows NVD ratings. Two clocks: **7 days for high-severity**, **90 days
|
|
56
|
+
for everything else**, and stay on supported versions.
|
|
57
|
+
|
|
58
|
+
- Merge grouped Dependabot updates on a routine, weekly if you can. Small and
|
|
59
|
+
regular beats a quarterly upgrade that breaks.
|
|
60
|
+
- For a dev-only dependency on a static site, the risk is mostly the build machine,
|
|
61
|
+
not the visitor. Patch on the clock anyway; record your reasoning if you defer.
|
|
62
|
+
- A finding you cannot fix in time goes in `.sws/acknowledged.yml` with a reason and
|
|
63
|
+
a `review_by` date. That is a supported action and it is the same shape as a
|
|
64
|
+
MinSec temporary exception.
|
|
65
|
+
- A server runtime has a much larger tree than a static build. That is part of the
|
|
66
|
+
cost of choosing `astro-ssr` or `next-ssr`, and worth saying at the time.
|
|
67
|
+
|
|
68
|
+
## Scan findings
|
|
69
|
+
|
|
70
|
+
Monthly Qualys scanning: **remediate severity 4 to 5 within 7 days, severity 3 within
|
|
71
|
+
90.** Enrolment lives at the infrastructure layer, not in the repo, so record who
|
|
72
|
+
enrolled the site and when in the runbook.
|
|
73
|
+
|
|
74
|
+
On a managed static host, many findings are about the host, not your code. Triage
|
|
75
|
+
before fixing: is it the site, the platform, or a false positive? Record the
|
|
76
|
+
answer either way.
|
|
77
|
+
|
|
78
|
+
## The quarterly privilege review
|
|
79
|
+
|
|
80
|
+
The review most often skipped. List every place someone can change the site and
|
|
81
|
+
who can get in:
|
|
82
|
+
|
|
83
|
+
- The GitHub org and repo, including outside collaborators and deploy keys.
|
|
84
|
+
- The hosting dashboard (Netlify, Vercel, or Pages settings).
|
|
85
|
+
- DNS for the subdomain.
|
|
86
|
+
- Vault paths and Actions secrets.
|
|
87
|
+
- Siteimprove and any analytics.
|
|
88
|
+
- Any third-party service the site uses.
|
|
89
|
+
|
|
90
|
+
For each: remove people who have left, reduce anyone with more access than they
|
|
91
|
+
need, confirm **MFA or SSO-with-MFA** is on, and confirm **the named technical
|
|
92
|
+
administrator can still log in**. A site whose only credential belongs to a
|
|
93
|
+
graduated student is common. Date the review and keep it in `docs/ops/`.
|
|
94
|
+
|
|
95
|
+
## Security headers
|
|
96
|
+
|
|
97
|
+
Ship the default set from `standards/hosting/capabilities.yml` on every response,
|
|
98
|
+
from host config. GitHub Pages cannot send headers; that is a stated cost of
|
|
99
|
+
`astro-static` there, not a defect.
|
|
100
|
+
|
|
101
|
+
**A CSP is optional and off by default.** It breaks pages at content-edit time, and
|
|
102
|
+
the person holding that problem is the least able to diagnose it. Offer it, never
|
|
103
|
+
assume it, and never call a site non-compliant for lacking one. MinWeb requires no
|
|
104
|
+
response headers at all.
|
|
47
105
|
|
|
48
|
-
A
|
|
49
|
-
|
|
106
|
+
## A leaked credential
|
|
107
|
+
|
|
108
|
+
1. **Rotate it now.** Blocking a deploy does not un-leak a secret already in remote
|
|
109
|
+
history.
|
|
110
|
+
2. Then clean the history.
|
|
111
|
+
3. Then push again.
|
|
112
|
+
4. Record what leaked, when, and what was rotated in the runbook.
|
|
113
|
+
|
|
114
|
+
If the credential could reach personal data or another system, treat it as a
|
|
115
|
+
suspected incident too.
|
|
116
|
+
|
|
117
|
+
## A suspected incident
|
|
118
|
+
|
|
119
|
+
**Do not improvise. Route to UIT Security immediately.** Do not delete evidence,
|
|
120
|
+
force-push over history, or quietly fix it and move on. Write down what you saw and
|
|
121
|
+
when. Containment that cannot wait, such as rotating a credential or taking a page
|
|
122
|
+
down, is fine; say what you did when you report.
|
|
123
|
+
|
|
124
|
+
## Above `low`
|
|
125
|
+
|
|
126
|
+
`moderate` adds Duo for all users and admins, centralised logging to Splunk, secure
|
|
127
|
+
SDLC with code review and static analysis, annual SISA developer training, and
|
|
128
|
+
weekly encrypted backups. `high` adds privileged access workstations, a DRA before
|
|
129
|
+
deploy, and whichever of PCI DSS, HIPAA, FISMA, or export controls applies.
|
|
130
|
+
|
|
131
|
+
Self-hosting invokes the MinSec **Servers** row at every tier. Managed static
|
|
132
|
+
hosting sheds nearly all of it, which is the real argument for it.
|
|
133
|
+
|
|
134
|
+
## Secure sunset
|
|
135
|
+
|
|
136
|
+
When a site retires: remove DNS, revoke credentials, archive or delete content, and
|
|
137
|
+
kill dangling CNAMEs. A CNAME pointing at a decommissioned host is a subdomain
|
|
138
|
+
takeover waiting to happen. Ask for the plan at the start of any event or campaign
|
|
139
|
+
site.
|
|
140
|
+
|
|
141
|
+
## Artifacts
|
|
142
|
+
|
|
143
|
+
| Artifact | Path |
|
|
144
|
+
|---|---|
|
|
145
|
+
| Operations runbook | `docs/ops/runbook.md` |
|
|
146
|
+
| Privilege reviews, dated | `docs/ops/privilege-reviews/` |
|
|
147
|
+
| Inventory record | `docs/ops/inventory.md` |
|
|
148
|
+
| Accepted risks | `.sws/acknowledged.yml` |
|
|
149
|
+
| Tier and reason | `.sws/manifest.yml` |
|
|
150
|
+
|
|
151
|
+
## Escalation
|
|
50
152
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
153
|
+
A **MinSec temporary exception** is submitted by the Business Owner, can run up to
|
|
154
|
+
three years, and is a request to UIT Security, not your decision. Incidents and DRAs
|
|
155
|
+
go to UIT Security too. Route per `standards/policy/escalation.md`; the security
|
|
156
|
+
routes there are still marked as needing confirmation, so use the general contact
|
|
157
|
+
and say so.
|
|
54
158
|
|
|
55
159
|
Do not recommend or rank security vendors or scanning products. State the
|
|
56
160
|
obligation, name the office.
|