Skip to content

Commit 1170047

Browse files
Remove identifying labels with v4-only forensic audit uploads (#1779)
* Remove identifying labels with v4-only forensic audit uploads * Address audit v4 review with rejection warnings and recorder validation
1 parent a2f8fd5 commit 1170047

35 files changed

Lines changed: 2669 additions & 288 deletions

Cargo.lock

Lines changed: 162 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ license = "MIT"
3636
publish = false
3737

3838
[workspace.dependencies]
39+
# Offline audit-schema validation; never enable remote reference resolution.
40+
jsonschema = { version = "0.56.0", default-features = false }
3941
# OpenMLS family — exact-pinned to the draft-10 last-resort KeyPackage fix.
4042
# Keep every companion crate on the same repository commit to prevent source skew.
4143
# Migration: once an upstream OpenMLS release contains this fix, replace all five

crates/cgka-engine/src/audit_helpers.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ mod tests {
699699
use super::*;
700700

701701
#[test]
702-
fn group_state_change_kind_strings_match_v3_schema() {
702+
fn group_state_change_kind_strings_match_v4_schema() {
703703
let member = MemberId::new(vec![0; 32]);
704704
let changes = [
705705
GroupStateChange::MemberAdded {
@@ -732,9 +732,9 @@ mod tests {
732732
.collect::<BTreeSet<_>>();
733733

734734
let schema: serde_json::Value = serde_json::from_str(include_str!(
735-
"../../marmot-forensics/schema/audit-log-event.v3.schema.json"
735+
"../../marmot-forensics/schema/audit-log-event.v4.schema.json"
736736
))
737-
.expect("v3 schema parses");
737+
.expect("v4 schema parses");
738738
let defined = schema
739739
.pointer("/$defs/groupStateChangeKind/enum")
740740
.and_then(serde_json::Value::as_array)

crates/marmot-app/AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ App runtime bridge for the first real Marmot app surfaces.
4848
the upload client, the per-account upload checkpoint (`audit-upload-checkpoint.json`), and the `MarmotApp` methods for
4949
audit settings, recorder open/build, file enumeration, path validation/resolution/removal, and HTTP upload. Audit-log
5050
unit tests live in its own `#[cfg(test)] mod tests`.
51+
- Record into distinct v4 files and upload only strictly validated v4 snapshots. Never migrate or send v1-v3
52+
or key-reveal files. Reject removed/unknown fields and duplicate keys before HTTP; cache ineligible file verdicts
53+
by size and mtime without retry cooldowns. Keep legacy files available locally for inspection/deletion.
54+
Account/device names are forbidden in rows and headers; hardware model is system-sourced, never a label.
5155
- Keep audit uploads incremental (mdk#1181). An audit file whose size and mtime still match its checkpoint entry is
5256
never re-read or re-posted; only the growing active file re-transfers, bounded by the recorder's segment threshold.
5357
Checkpoint only complete immutable upload snapshots after successful upload.

crates/marmot-app/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ hex.workspace = true
3434
httpdate.workspace = true
3535
hkdf.workspace = true
3636
image.workspace = true
37+
jsonschema.workspace = true
3738
marmot-account.workspace = true
3839
marmot-forensics.workspace = true
3940
marmot-markdown.workspace = true

0 commit comments

Comments
 (0)