Replay codeguardian-run-002
Audit access control before returning private records.
task_receivedhybridCodeGuardian accepted the allowlisted audit task: Audit access control before returning private records.
Audit access control before returning private records.examples/codeguardian/fixtures/missing-auth-guard.tsRaw event JSONFull canonical event detail
{
"target": "examples/codeguardian/fixtures/missing-auth-guard.ts",
"goal": "Audit access control before returning private records.",
"source": "hybrid"
}context_loadedhybridLoaded the demo source fixture and hashed the context for examples/codeguardian/fixtures/missing-auth-guard.ts.
sha256:5679a44382c8be899652ee71b64f2b1adcecb28a4db86e089f7c3677c1cd64a9455Raw event JSONFull canonical event detail
{
"target": "examples/codeguardian/fixtures/missing-auth-guard.ts",
"sourceHash": "sha256:5679a44382c8be899652ee71b64f2b1adcecb28a4db86e089f7c3677c1cd64a9",
"byteLength": 455,
"source": "hybrid"
}compute_startedhybridStarted the compute-backed analysis run zg-hybrid-analysis-002 through 0xa48f01287233509FD694a22Bf840225062E67836.
zg-hybrid-analysis-0020xa48f01287233509FD694a22Bf840225062E67836qwen/qwen-2.5-7b-instructRaw event JSONFull canonical event detail
{
"runId": "zg-hybrid-analysis-002",
"model": "qwen/qwen-2.5-7b-instruct",
"provider": "0xa48f01287233509FD694a22Bf840225062E67836",
"source": "hybrid"
}compute_completedhybridCompleted analysis run zg-hybrid-analysis-002 and recorded its output hash.
zg-hybrid-analysis-002sha256:52a61a030d9a99fd63a37ec5ae502438733a389b90c583f28606f3d17eef2e4dRaw event JSONFull canonical event detail
{
"runId": "zg-hybrid-analysis-002",
"outputHash": "sha256:52a61a030d9a99fd63a37ec5ae502438733a389b90c583f28606f3d17eef2e4d",
"source": "hybrid"
}issue_foundhybridPrivate records can be returned before verifying the caller owns the account.
Private records can be returned before verifying the caller owns the account.Raw event JSONFull canonical event detail
{
"issue": "Private records can be returned before verifying the caller owns the account.",
"source": "hybrid"
}patch_proposedhybridCheck authorization before reading or returning private records, and fail closed when ownership cannot be proven.
Check authorization before reading or returning private records, and fail closed when ownership cannot be proven.diff --git a/examples/codeguardian/fixtures/missing-auth-guard.ts b/examples/codeguardian/fixtures/missing-auth-guard.ts
@@
export async function loadPrivateRecord(
callerAccountId: string,
requestedAccountId: string,
readRecord: (accountId: string) => Promise<PrivateRecord>,
canRead: (caller: string, requested: string) => Promise<boolean>,
) {
+ if (!(await canRead(callerAccountId, requestedAccountId))) {
+ return null;
+ }
const record = await readRecord(requestedAccountId);
- if (!(await canRead(callerAccountId, requestedAccountId))) {
- return null;
- }
return record;
}
Raw event JSONFull canonical event detail
{
"patch": "Check authorization before reading or returning private records, and fail closed when ownership cannot be proven.",
"patchDiff": "diff --git a/examples/codeguardian/fixtures/missing-auth-guard.ts b/examples/codeguardian/fixtures/missing-auth-guard.ts\n@@\n export async function loadPrivateRecord(\n callerAccountId: string,\n requestedAccountId: string,\n readRecord: (accountId: string) => Promise<PrivateRecord>,\n canRead: (caller: string, requested: string) => Promise<boolean>,\n ) {\n+ if (!(await canRead(callerAccountId, requestedAccountId))) {\n+ return null;\n+ }\n const record = await readRecord(requestedAccountId);\n- if (!(await canRead(callerAccountId, requestedAccountId))) {\n- return null;\n- }\n return record;\n }\n",
"source": "hybrid"
}critic_startedhybridStarted the self-review critic loop run zg-hybrid-critic-002.
zg-hybrid-critic-0020xa48f01287233509FD694a22Bf840225062E67836qwen/qwen-2.5-7b-instructRaw event JSONFull canonical event detail
{
"runId": "zg-hybrid-critic-002",
"model": "qwen/qwen-2.5-7b-instruct",
"provider": "0xa48f01287233509FD694a22Bf840225062E67836",
"source": "hybrid"
}critic_completedhybridAccepted the patch after critique: The fix moves authorization ahead of disclosure and preserves the function's narrow data access boundary.
trueThe fix moves authorization ahead of disclosure and preserves the function's narrow data access boundary.Raw event JSONFull canonical event detail
{
"critique": "The fix moves authorization ahead of disclosure and preserves the function's narrow data access boundary.",
"accepted": true,
"source": "hybrid"
}memory_delta_createdhybridVerify authorization before returning private records.
Verify authorization before returning private records.Added an authorization-check heuristic to critic reviews.Raw event JSONFull canonical event detail
{
"learnedPattern": "Verify authorization before returning private records.",
"memoryDelta": "Added an authorization-check heuristic to critic reviews.",
"source": "hybrid"
}memory_writtenhybridAdvanced persistent memory to version 2.
2sha256:568cb2b7f31804eef4dbe0231c5bb82ffb3e669a4a726943bc7e6d8c4f835ba2Raw event JSONFull canonical event detail
{
"memoryRoot": "sha256:568cb2b7f31804eef4dbe0231c5bb82ffb3e669a4a726943bc7e6d8c4f835ba2",
"version": 2,
"source": "hybrid"
}skill_upgrade_checkedhybridRecorded a dynamic policy upgrade for future reviews.
trueRaw event JSONFull canonical event detail
{
"upgraded": true,
"upgrade": {
"skill": "critic-loop",
"oldVersion": "0.1.0",
"newVersion": "0.1.1",
"oldHash": "sha256:c88eb62cb4deeaa9dce46fa512f30276a4d6c93620e51da886f87d0474f9e4a9",
"newHash": "sha256:105b17eb2621b0c6591e097f1fc0ebd81b8c6596b46efe2b7404e420173de20c",
"reason": "After detecting a missing authorization guard, CodeGuardian added an authorization-check heuristic to future critic reviews.",
"runId": "codeguardian-run-002"
},
"source": "hybrid"
}trace_committedhybridCommitted the replay trace root for verification.
sha256:0b1397e29e41dd2e2738c8ffdbb2ac027f8bae46173a763c79cee8a769418ad4Raw event JSONFull canonical event detail
{
"traceRoot": "sha256:0b1397e29e41dd2e2738c8ffdbb2ac027f8bae46173a763c79cee8a769418ad4",
"source": "hybrid"
}certificate_issuedhybridIssued Proof-of-Intelligence certificate poi-cert-codeguardian-001.
poi-cert-codeguardian-001Raw event JSONFull canonical event detail
{
"certificateId": "poi-cert-codeguardian-001",
"source": "hybrid"
}