hardening: isolate third-party paths and clean external-build metadata (#311)

* hardening: isolate third-party paths and clean external-build metadata

* fix: restore external feedback flow and make privacy check portable
This commit is contained in:
KRATOS
2026-04-04 11:52:33 +05:30
committed by GitHub
parent cdbe016e6f
commit 27e6505bfd
18 changed files with 367 additions and 59 deletions

View File

@@ -0,0 +1,23 @@
import { expect, test } from 'bun:test'
import { createGitHubIssueUrl } from './Feedback.tsx'
(globalThis as { MACRO?: { VERSION?: string } }).MACRO = { VERSION: '0.1.7' }
test('createGitHubIssueUrl omits empty feedback IDs', () => {
const url = decodeURIComponent(
createGitHubIssueUrl('', 'Bug title', 'Bug description', []),
)
expect(url).not.toContain('Feedback ID:')
expect(url).toContain('Bug Description')
expect(url).toContain('Errors')
})
test('createGitHubIssueUrl includes feedback IDs when present', () => {
const url = decodeURIComponent(
createGitHubIssueUrl('fb-123', 'Bug title', 'Bug description', []),
)
expect(url).toContain('Feedback ID: fb-123')
})

File diff suppressed because one or more lines are too long