@gotcos/glasses-server 6.12.4 → 6.12.5
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.12.5
|
|
4
|
+
|
|
5
|
+
Extends the file-permission hardening to the remaining append-only logs that
|
|
6
|
+
the launch review named.
|
|
7
|
+
|
|
8
|
+
- **Run ledgers and the token-audit log are private at the file level.** The
|
|
9
|
+
Claude and Codex run ledgers and the token-audit JSONL now create with mode
|
|
10
|
+
0600 and repair existing files with chmod, matching the session-log and
|
|
11
|
+
atomic-fs writers. They already sat under the 0700 data directory; this
|
|
12
|
+
closes the file-level bit for defense in depth and covers the token-audit log
|
|
13
|
+
specifically, which lives beside the data directory rather than inside it.
|
|
14
|
+
|
|
3
15
|
## 6.12.4
|
|
4
16
|
|
|
5
17
|
Completes the public launch security review with a constant-time token check.
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import crypto from 'node:crypto'
|
|
2
|
-
import { appendFileSync, existsSync, mkdirSync, readFileSync } from 'node:fs'
|
|
2
|
+
import { appendFileSync, chmodSync, existsSync, mkdirSync, readFileSync } from 'node:fs'
|
|
3
3
|
import { dirname, resolve } from 'node:path'
|
|
4
4
|
import { COS_SCRIPTS_DIR } from './python-bridge.js'
|
|
5
5
|
import { dataPath } from './data-dir.js'
|
|
@@ -118,7 +118,8 @@ function appendEvent(event: ClaudeRunEvent): void {
|
|
|
118
118
|
try {
|
|
119
119
|
const path = getClaudeLedgerPath()
|
|
120
120
|
mkdirSync(dirname(path), { recursive: true })
|
|
121
|
-
appendFileSync(path, JSON.stringify(event) + '\n')
|
|
121
|
+
appendFileSync(path, JSON.stringify(event) + '\n', { encoding: 'utf8', mode: 0o600 })
|
|
122
|
+
chmodSync(path, 0o600)
|
|
122
123
|
} catch (err) {
|
|
123
124
|
console.warn('[claude-run-ledger] write skipped:', err)
|
|
124
125
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import crypto from 'node:crypto'
|
|
2
|
-
import { appendFileSync, existsSync, mkdirSync, readFileSync } from 'node:fs'
|
|
2
|
+
import { appendFileSync, chmodSync, existsSync, mkdirSync, readFileSync } from 'node:fs'
|
|
3
3
|
import { dirname, resolve } from 'node:path'
|
|
4
4
|
import { COS_SCRIPTS_DIR } from './python-bridge.js'
|
|
5
5
|
import { cosBrainDir } from './launch-dir.js'
|
|
@@ -140,7 +140,8 @@ function appendEvent(event: CodexRunEvent): void {
|
|
|
140
140
|
try {
|
|
141
141
|
const path = getCodexLedgerPath()
|
|
142
142
|
mkdirSync(dirname(path), { recursive: true })
|
|
143
|
-
appendFileSync(path, JSON.stringify(event) + '\n')
|
|
143
|
+
appendFileSync(path, JSON.stringify(event) + '\n', { encoding: 'utf8', mode: 0o600 })
|
|
144
|
+
chmodSync(path, 0o600)
|
|
144
145
|
} catch (err) {
|
|
145
146
|
console.warn('[codex-run-ledger] write skipped:', err)
|
|
146
147
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Both Python (COS scripts) and TypeScript (G2 glasses) write to the same JSONL.
|
|
3
3
|
// No LLM calls. Pure file append.
|
|
4
4
|
|
|
5
|
-
import { appendFileSync } from 'node:fs'
|
|
5
|
+
import { appendFileSync, chmodSync } from 'node:fs'
|
|
6
6
|
import { resolve } from 'node:path'
|
|
7
7
|
import { homedir } from 'node:os'
|
|
8
8
|
|
|
@@ -43,7 +43,8 @@ export function logTokenAudit(entry: TokenAuditEntry): void {
|
|
|
43
43
|
caller: entry.caller,
|
|
44
44
|
}
|
|
45
45
|
try {
|
|
46
|
-
appendFileSync(AUDIT_FILE, JSON.stringify(record) + '\n')
|
|
46
|
+
appendFileSync(AUDIT_FILE, JSON.stringify(record) + '\n', { encoding: 'utf8', mode: 0o600 })
|
|
47
|
+
chmodSync(AUDIT_FILE, 0o600)
|
|
47
48
|
} catch {
|
|
48
49
|
// Never let logging break the actual call
|
|
49
50
|
}
|