mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-12-06 12:24:44 +00:00
Markdown rendered in finding reports, task reports and transcripts comes from agent output and target content. An image in it was fetched by the operator's browser as soon as the view rendered, so an image URL pointing to an outside host could carry data out of the console with no click and outside the sandbox egress controls. The Markdown renderer now loads only same-origin images under /api/ and /uploads/, checked on the normalized URL (dot segments resolved, protocol relative URLs, backslashes and encoded slashes refused). Any other image is shown as its alt text and URL, linked when it is an http(s) URL. The Content-Security-Policy adds img-src 'self' data: blob:, which keeps images off other origins for the whole console, Markdown or not. Tests: a Go test asserts the console CSP img-src directive, and a new test:markdown web test (wired into the CI web job) covers external, same-origin and tricky image URLs.
80 lines
3.1 KiB
JSON
80 lines
3.1 KiB
JSON
{
|
|
"name": "artex-web",
|
|
"version": "2.2.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"build:static": "NEXT_EXPORT=1 next build",
|
|
"start": "next start",
|
|
"lint": "biome lint",
|
|
"format": "biome format --write",
|
|
"check": "biome check",
|
|
"check:fix": "biome check --write",
|
|
"prepare": "cd .. && husky web/.husky",
|
|
"generate:presets": "ts-node -P tsconfig.scripts.json src/scripts/generate-theme-presets.ts",
|
|
"test:polling": "node --import ./scripts/register-alias.mjs --test scripts/polling.test.mjs src/lib/target-gate-posture.test.mjs src/lib/mock/posture-integration.test.mjs",
|
|
"test:replay": "node --test scripts/replay.test.mjs",
|
|
"test:tamper-hooks": "node --test scripts/tamper-hooks.test.mjs",
|
|
"test:upload": "node --test scripts/upload.test.mjs",
|
|
"test:traffic-stream": "node --test scripts/traffic-stream.test.mjs",
|
|
"test:i18n": "node scripts/check-i18n.mjs && node --test scripts/i18n.test.mjs",
|
|
"test:bash": "node --test src/lib/bash-exit-status.test.mjs",
|
|
"test:sse": "node --test scripts/sse.test.mjs",
|
|
"test:auth": "node --test scripts/auth.test.mjs",
|
|
"test:navigation": "node --test src/lib/navigation.test.mjs",
|
|
"test:chat-filter": "node --test src/lib/chat-agent-filter.test.mjs",
|
|
"test:openai-compatible": "node --test src/lib/openai-compatible.test.mjs",
|
|
"test:reducers": "node --import ./scripts/register-alias.mjs --test \"src/lib/reducers/*.test.mjs\" \"src/**/_state/*.test.mjs\" src/lib/utils.test.mjs",
|
|
"test:activity-merge": "node --test src/lib/activity-merge.test.mjs",
|
|
"test:chat-mentions": "node --test src/lib/chat-mentions.test.mjs",
|
|
"test:format": "node --test src/lib/format.test.mjs",
|
|
"test:http-href": "node --test src/lib/http-href.test.mjs",
|
|
"test:markdown": "node --import ./scripts/register-alias.mjs --test src/components/markdown.test.mjs"
|
|
},
|
|
"lint-staged": {
|
|
"*.{js,ts,jsx,tsx}": ["biome check --write --no-errors-on-unmatched"]
|
|
},
|
|
"dependencies": {
|
|
"@antv/g6": "^5.1.1",
|
|
"@base-ui/react": "^1.6.0",
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@xyflow/react": "^12.3.0",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"cmdk": "^1.1.1",
|
|
"geist": "^1.7.2",
|
|
"lucide-react": "^1.22.0",
|
|
"next": "^16.4.6",
|
|
"next-themes": "^0.4.6",
|
|
"radix-ui": "^1.6.0",
|
|
"react": "^19.2.7",
|
|
"react-dom": "^19.2.7",
|
|
"react-is": "^19.2.7",
|
|
"react-markdown": "^10.1.0",
|
|
"react-resizable-panels": "^4.12.0",
|
|
"recharts": "^3.8.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"sonner": "^2.0.7",
|
|
"tailwind-merge": "^3.6.0",
|
|
"vaul": "^1.1.2",
|
|
"zustand": "^5.0.14"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "^2.5.1",
|
|
"@tailwindcss/postcss": "^4.3.2",
|
|
"@types/node": "^22.20.0",
|
|
"@types/react": "^19.2.17",
|
|
"@types/react-dom": "^19.2.3",
|
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
"husky": "^9.1.7",
|
|
"lint-staged": "^16.4.0",
|
|
"postcss": "^8.5.16",
|
|
"shadcn": "^4.12.0",
|
|
"tailwindcss": "^4.1.5",
|
|
"ts-node": "^10.9.2",
|
|
"tw-animate-css": "^1.4.0",
|
|
"typescript": "^5.9.3"
|
|
}
|
|
}
|