Skip to content

d2cli: contain multiboard output paths - #2900

Merged
alixander merged 2 commits into
masterfrom
security/board-output-containment
Sep 11, 2026
Merged

alixander merged 2 commits into
masterfrom
security/board-output-containment

Conversation

@alixander

@alixander alixander commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

Human


AI

Maps every board name to a bounded portable path component, validates the complete output plan for file/directory and normalized-name collisions, and stages multiboard renders in a process-owned directory. Publication is transactional: a versioned ownership manifest removes only unchanged stale generated files, preserves user-modified and unrelated files, and rolls visible mutations back on failure. Publishing no longer recursively removes a content-derived or pre-existing directory. Shape and connection links are rewritten as URL paths.

Tests:

  • go test ./...
  • focused tests with -count=10
  • focused race tests
  • CLI end-to-end golden tests
  • Windows amd64 cross-compilation

@alixander
alixander marked this pull request as ready for review September 11, 2026 22:28
@alixander
alixander merged commit ee737f4 into master Sep 11, 2026
2 checks passed
@alixander
alixander deleted the security/board-output-containment branch September 11, 2026 22:29
pancsta pushed a commit to pancsta/d2 that referenced this pull request Nov 7, 2026
…ainment

d2cli: contain multiboard output paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant