Skip to content

fix: constrain code generation writes to workdir - #67

Draft
cloudcarver wants to merge 1 commit into
mainfrom
agent/security-codegen-paths
Draft

fix: constrain code generation writes to workdir#67
cloudcarver wants to merge 1 commit into
mainfrom
agent/security-codegen-paths

Conversation

@cloudcarver

Copy link
Copy Markdown
Owner

Summary

  • centralize workdir-confined path resolution for generator mutations
  • constrain schema, OAPI, task, DST, mock, wire, SQLC, anclaxdef, and clean outputs
  • use rooted filesystem operations and symlink containment checks
  • preserve external read-only input compatibility and trusted SQLC plugins
  • add absolute, traversal, symlink, SQLC sink, and cleanup rollback tests

Validation

  • go test -count=1 ./...
  • go test -race ./cmd/anclax ./pkg/codegen/codegenpath ./pkg/codegen/oapi ./pkg/codegen/schemas ./pkg/codegen/task
  • go vet ./...
  • git diff --check

Closes #36

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.

[Security] Constrain code generation writes to the project root

1 participant