create-pmos 0.561.0 → 0.562.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.
- package/cloud-setup.sh +18 -0
- package/package.json +14 -20
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +13 -0
- package/workspace/lib/remote-access.js +14 -1
- package/workspace/lib/state-backup.js +5 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/server.js +3 -0
package/cloud-setup.sh
CHANGED
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
# PMOS_PKG=<spec> the create-pmos release (default: the newest that downloads)
|
|
34
34
|
# PMOS_NO_SYSTEMD=1 write the minute check but do not install the timer (containers, tests)
|
|
35
35
|
# PMOS_NO_FIREWALL=1 leave the firewall alone
|
|
36
|
+
# PMOS_NO_SSH_HARDEN=1 leave the SSH server settings alone (default: keys only, no passwords, root by key only)
|
|
36
37
|
# PMOS_SKIP_CLAUDE=1 do not install Claude Code (tests)
|
|
37
38
|
set -euo pipefail
|
|
38
39
|
|
|
@@ -192,6 +193,21 @@ cmd_setup() {
|
|
|
192
193
|
if [ "${PMOS_NO_FIREWALL:-}" != 1 ] && have ufw; then
|
|
193
194
|
ufw allow OpenSSH >/dev/null && ufw --force enable >/dev/null && ok "firewall on: SSH only (PMOS listens on this server only; Cloudflare reaches it from inside)"
|
|
194
195
|
fi
|
|
196
|
+
# Security updates install themselves (Ubuntu's unattended-upgrades: the security pocket only, no reboots).
|
|
197
|
+
if apt-get install -y -qq unattended-upgrades >/dev/null 2>&1; then
|
|
198
|
+
printf 'APT::Periodic::Update-Package-Lists "1";\nAPT::Periodic::Unattended-Upgrade "1";\n' >/etc/apt/apt.conf.d/20auto-upgrades
|
|
199
|
+
ok "security updates install themselves"
|
|
200
|
+
fi
|
|
201
|
+
# SSH by key only. Only when root already signs in with a key, so this can never lock the PM out. The file sorts before
|
|
202
|
+
# the image's own (50-cloud-init.conf), and sshd takes the first value it reads. root keeps key sign-in: `move` uses it.
|
|
203
|
+
if [ "${PMOS_NO_SSH_HARDEN:-}" != 1 ] && [ -s /root/.ssh/authorized_keys ] && [ -d /etc/ssh/sshd_config.d ]; then
|
|
204
|
+
printf '# Written by PMOS cloud-setup.sh. PMOS_NO_SSH_HARDEN=1 leaves SSH alone; delete this file to undo.\nPasswordAuthentication no\nKbdInteractiveAuthentication no\nPermitRootLogin prohibit-password\nMaxAuthTries 3\n' >/etc/ssh/sshd_config.d/10-pmos.conf
|
|
205
|
+
if sshd -t 2>/dev/null; then
|
|
206
|
+
{ systemctl reload ssh 2>/dev/null || systemctl reload sshd 2>/dev/null; } && ok "SSH: keys only, no passwords"
|
|
207
|
+
else
|
|
208
|
+
rm -f /etc/ssh/sshd_config.d/10-pmos.conf; note "SSH settings left as they were (the check of the new ones failed)"
|
|
209
|
+
fi
|
|
210
|
+
fi
|
|
195
211
|
|
|
196
212
|
# ── 3. The user ──────────────────────────────────────────────────────────────────────────────────────────────
|
|
197
213
|
say "Setting up the user $PM_USER ($PM_HOME)"
|
|
@@ -227,6 +243,8 @@ cmd_setup() {
|
|
|
227
243
|
fi
|
|
228
244
|
chown -R "$PM_USER:$PM_USER" "$PM_HOME"
|
|
229
245
|
rm -rf "$SEED_DIR"
|
|
246
|
+
# The pack holds the state folder, keys included, and the tunnel credentials: once unpacked, no second copy stays behind.
|
|
247
|
+
rm -f "$PMOS_SEED"
|
|
230
248
|
fi
|
|
231
249
|
|
|
232
250
|
# ── 5. Node, Claude Code and PMOS, as the user ───────────────────────────────────────────────────────────────
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.562.0",
|
|
4
4
|
"description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -33,6 +33,19 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.562.0",
|
|
38
|
+
"at": "2026-11-11T11:26:34.804Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1293,
|
|
43
|
+
"t": "Keep keys out of backups, harden pm-os.app headers, cloud SSH and updates",
|
|
44
|
+
"s": "The PM's keys are no longer copied into the backup folder; pm-os.app tells browsers to stay on HTTPS and refuses framing by other sites; a new cloud server signs in by SSH key only and installs security updates itself.",
|
|
45
|
+
"k": "fix"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
36
49
|
{
|
|
37
50
|
"v": "0.561.0",
|
|
38
51
|
"at": "2026-11-11T10:53:52.082Z",
|
|
@@ -291,25 +304,6 @@
|
|
|
291
304
|
"k": "new"
|
|
292
305
|
}
|
|
293
306
|
]
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
"v": "0.542.0",
|
|
297
|
-
"at": "2026-11-08T06:18:15.279Z",
|
|
298
|
-
"f": 4,
|
|
299
|
-
"prs": [
|
|
300
|
-
{
|
|
301
|
-
"n": 1265,
|
|
302
|
-
"t": "Chief-of-staff chat — one chat, Your move as the only inbox, Done with Undo (C1–C6)",
|
|
303
|
-
"s": "Your move is the one inbox, at most 5 asks with the rest under Can wait, and one chat opens from any page and says where each answer came from.",
|
|
304
|
-
"k": "new"
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
"n": 1270,
|
|
308
|
-
"t": "Curated memory in every background run, lessons across initiatives, the loop on the health line",
|
|
309
|
-
"s": "Curated memory in every background run, lessons across initiatives, the loop on the health line",
|
|
310
|
-
"k": "new"
|
|
311
|
-
}
|
|
312
|
-
]
|
|
313
307
|
}
|
|
314
308
|
]
|
|
315
309
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-11T11:26:31Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-11T11:26:31Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-11T11:26:31Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.562.0",
|
|
4
|
+
"at": "2026-11-11T11:26:34.804Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1293,
|
|
9
|
+
"t": "Keep keys out of backups, harden pm-os.app headers, cloud SSH and updates",
|
|
10
|
+
"s": "The PM's keys are no longer copied into the backup folder; pm-os.app tells browsers to stay on HTTPS and refuses framing by other sites; a new cloud server signs in by SSH key only and installs security updates itself.",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
"v": "0.561.0",
|
|
4
17
|
"at": "2026-11-11T10:53:52.082Z",
|
|
@@ -278,6 +278,19 @@ function edgeAllowed({ headers = {}, publicHost = null } = {}) {
|
|
|
278
278
|
return hasHeader(headers, ACCESS_HEADER);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
+
// Browser hardening for an answer to the public hostname (security hardening 2026-11-11). Only that hostname gets them:
|
|
282
|
+
// loopback and the tailnet are unchanged, and the meeting-helper extension, which frames the console from its own origin,
|
|
283
|
+
// talks to localhost. HSTS names no subdomains, so the share hostname keeps its own headers (share-server.js).
|
|
284
|
+
const PUBLIC_HEADERS = Object.freeze({
|
|
285
|
+
'Strict-Transport-Security': 'max-age=31536000',
|
|
286
|
+
'X-Frame-Options': 'SAMEORIGIN',
|
|
287
|
+
'X-Content-Type-Options': 'nosniff',
|
|
288
|
+
'Referrer-Policy': 'same-origin',
|
|
289
|
+
});
|
|
290
|
+
function publicHeaders({ headers = {}, publicHost = null } = {}) {
|
|
291
|
+
return publicHost && hostnameOf(headers.host) === publicHost ? PUBLIC_HEADERS : null;
|
|
292
|
+
}
|
|
293
|
+
|
|
281
294
|
// The single authorization decision, PEER-based (what matters is where the request came FROM, not
|
|
282
295
|
// which listener it hit). A loopback peer is exempt unless the request arrived through a proxy;
|
|
283
296
|
// every other request must present a valid bearer token. Fail-closed: with no token configured, a
|
|
@@ -427,7 +440,7 @@ module.exports = {
|
|
|
427
440
|
LOOPBACK, isLoopbackAddr, isTailnetIp, detectTailnetIp, remoteRequested,
|
|
428
441
|
resolveBinds, extractHttpToken, extractWsToken, tokenMatches, authorize, startupLines,
|
|
429
442
|
checkHostOrigin, isAllowedOrigin, hostnameAllowed,
|
|
430
|
-
parsePublicHost, PROXY_HEADERS, ACCESS_HEADER, isProxied, edgeAllowed, hostnameOf,
|
|
443
|
+
parsePublicHost, PROXY_HEADERS, ACCESS_HEADER, isProxied, edgeAllowed, hostnameOf, PUBLIC_HEADERS, publicHeaders,
|
|
431
444
|
COOKIE_NAME, extractCookieToken, presentedToken,
|
|
432
445
|
phoneUrl, isPageNavigation, stripTokenParam, sessionCookie, AUTH_PATH, parseAuthForm, signInPage,
|
|
433
446
|
};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* WHAT IS COPIED: the small state files (.json .jsonl .md .txt) under `src`, to <dest>/<YYYY-MM-DD>/, with a manifest.json of what was
|
|
11
11
|
* copied. Terminal buffers, sockets, caches and anything whose name looks like a secret (token, secret, key, nonce, credential, password)
|
|
12
|
-
* are left out: a backup that copies the PM's keys to a second place is worse than none. A copy is checked by reading it back (file count and
|
|
12
|
+
* and the named credential files (SECRET_FILES) are left out: a backup that copies the PM's keys to a second place is worse than none. A copy is checked by reading it back (file count and
|
|
13
13
|
* bytes against the manifest) before the run says ok, and only then are days beyond the newest `keep` (default 7) removed.
|
|
14
14
|
* `dest` must be outside `src`. Nothing is sent over a network; the PM chooses the folder. */
|
|
15
15
|
const fs = require('fs');
|
|
@@ -17,6 +17,9 @@ const path = require('path');
|
|
|
17
17
|
|
|
18
18
|
const KEEP_EXT = /\.(jsonl?|md|txt)$/i;
|
|
19
19
|
const SKIP_NAME = /(token|secret|key|nonce|credential|password|\.sock$|buffer|cache|node_modules|\.git$)/i;
|
|
20
|
+
// The credential files whose names the pattern above does not catch (security review 2026-11-03, finding 1): the Anthropic key,
|
|
21
|
+
// the TypeSafe key and the board host admin key. Paths are relative to the state folder. online.json stays: it holds no credential.
|
|
22
|
+
const SECRET_FILES = new Set(['anthropic.json', 'typesafe.json', 'board-publish/state.json']);
|
|
20
23
|
const MAX_FILE = 50 * 1024 * 1024;
|
|
21
24
|
const DAY_RE = /^\d{4}-\d{2}-\d{2}$/;
|
|
22
25
|
const LOG = 'backup-log.jsonl';
|
|
@@ -30,6 +33,7 @@ function listFiles(root) {
|
|
|
30
33
|
for (const e of ents) {
|
|
31
34
|
if (SKIP_NAME.test(e.name)) continue;
|
|
32
35
|
const p = path.join(d, e.name);
|
|
36
|
+
if (SECRET_FILES.has(path.relative(root, p).split(path.sep).join('/'))) continue;
|
|
33
37
|
if (e.isDirectory()) walk(p);
|
|
34
38
|
else if (e.isFile() && KEEP_EXT.test(e.name)) { try { if (fs.statSync(p).size <= MAX_FILE) out.push(p); } catch { /* vanished */ } }
|
|
35
39
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.562.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.562.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
package/workspace/server.js
CHANGED
|
@@ -10927,6 +10927,9 @@ function httpGuard(req, res) {
|
|
|
10927
10927
|
res.end(JSON.stringify({ ok: false, error: 'the public host is only reachable through Cloudflare Access' }));
|
|
10928
10928
|
return;
|
|
10929
10929
|
}
|
|
10930
|
+
// Browser hardening headers on every answer to the public hostname (HSTS, framing, nosniff, referrer). Routes may still set their own.
|
|
10931
|
+
const hardening = remoteAccess.publicHeaders({ headers: req.headers, publicHost: publicHost() });
|
|
10932
|
+
if (hardening) for (const [k, v] of Object.entries(hardening)) res.setHeader(k, v);
|
|
10930
10933
|
// workspace-online-mode (D89): on the Online switch's hostname the verified Access assertion is the whole check.
|
|
10931
10934
|
// It replaces the token, so neither the sign-in form nor the token cookie is reachable there.
|
|
10932
10935
|
if (viaOnlineHost(req.headers)) {
|