-
Notifications
You must be signed in to change notification settings - Fork 0
fix(security): harden private-reporting audit evidence I/O #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
seonghobae
merged 21 commits into
main
from
fix/private-vulnerability-reporting-cancel-liveness
Sep 1, 2026
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ed7835c
test(security): expose stalled audit response cancellation
seonghobae 6518945
fix(security): keep audit size failure independent of stream cleanup
seonghobae 039ed54
test(security): reject unsafe private-reporting evidence paths
seonghobae 95e24e0
fix(security): bind private-reporting evidence to safe filesystem aut…
seonghobae e7947f1
merge: incorporate protected main into private-reporting hardening
seonghobae e9caeae
test(security): preserve retained-report source authority
seonghobae 05ff000
merge: converge private reporting audit with protected main
seonghobae d94b796
docs(changelog): record private-reporting hardening
seonghobae c0b2cec
test(security): reject private-report repository dot segments
seonghobae 1c7e143
fix(security): reject private-report repository dot segments
seonghobae be1db4d
chore(security): converge private-report audit with protected main
seonghobae cab8944
test(security): retain SHA-256 audit source identity
seonghobae a1eabf6
fix(security): accept SHA-256 audit source commits
seonghobae d5b3743
test(security): reject deceptive repository failure evidence
seonghobae 2f38166
fix(security): bind failure evidence to validated repository
seonghobae 9ee8a36
docs(security): record private reporting evidence authority
seonghobae d8e153d
test(security): retain valid repository on source failure
seonghobae 3e8461f
fix(security): preserve independently validated audit identity
seonghobae d8c84f4
merge(main): converge private-reporting hardening
seonghobae 840268f
docs(security): align private-reporting source identities
seonghobae 5877669
docs(security): record private reporting audit hardening
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
test/private-vulnerability-reporting-invalid-repository-evidence.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| import { spawnSync } from "node:child_process"; | ||
| import { mkdtempSync, readFileSync, rmSync } from "node:fs"; | ||
| import { tmpdir } from "node:os"; | ||
| import { join } from "node:path"; | ||
| import { describe, expect, it } from "vitest"; | ||
|
|
||
| describe("private vulnerability reporting failure evidence repository authority", () => { | ||
| it("does not retain a deceptive invalid repository identity", () => { | ||
| const root = mkdtempSync(join(tmpdir(), "noema-private-reporting-invalid-repository-")); | ||
| const reportPath = join(root, "audit.json"); | ||
| const deceptiveRepository = "ContextualWisdomLab/noema\u202Egpj"; | ||
|
|
||
| try { | ||
| const result = spawnSync( | ||
| process.execPath, | ||
| ["scripts/private-vulnerability-reporting-audit.mjs"], | ||
| { | ||
| cwd: process.cwd(), | ||
| env: { | ||
| ...process.env, | ||
| NOEMA_AUDIT_SOURCE_SHA: "a".repeat(40), | ||
| NOEMA_AUDIT_REPOSITORY: deceptiveRepository, | ||
| NOEMA_PRIVATE_VULNERABILITY_REPORTING_AUDIT_PATH: reportPath, | ||
| }, | ||
| encoding: "utf8", | ||
| timeout: 5_000, | ||
| }, | ||
| ); | ||
|
|
||
| expect(result.status).toBe(1); | ||
| const report = JSON.parse(readFileSync(reportPath, "utf8")); | ||
| expect(report.status).toBe("FAIL"); | ||
| expect(report.repository).toBe("unknown"); | ||
| expect(report.failures[0]?.detail).toContain( | ||
| "Repository must identify a ContextualWisdomLab repository.", | ||
| ); | ||
| expect(JSON.stringify(report)).not.toContain("\u202E"); | ||
| } finally { | ||
| rmSync(root, { recursive: true, force: true }); | ||
| } | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.