Skip to content

Limit Dockerfile JSON form parse depth - #3297

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue3034
Jun 5, 2026
Merged

Limit Dockerfile JSON form parse depth#3297
Widthdom merged 2 commits into
mainfrom
fix-issue3034

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add extractor-local JsonDocumentOptions with a fixed depth limit for Dockerfile JSON-form parsing.
  • Apply the bounded parser options to Dockerfile VOLUME, SHELL, COPY, and ADD JSON forms.
  • Add focused Dockerfile extraction coverage for too-deep JSON-form payloads.

Validation

  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~SymbolExtractorTests.Extract_Dockerfile"
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore
  • dotnet build
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • dotnet test CodeIndex.sln -c Release -p:UseSharedCompilation=false --no-build
  • Codex adversarial review: No blocking/actionable issues found.

Documentation and changelog

  • Changelog fragment: changelog.d/unreleased/3034.security.md
  • No README or guide changes were needed; this only bounds existing Dockerfile extraction internals without changing CLI flags or output contracts.

Issues

Fixes #3034

Follow-up candidates

  • None.

@Widthdom
Widthdom marked this pull request as ready for review June 5, 2026 06:14
@Widthdom
Widthdom merged commit acb18c1 into main Jun 5, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue3034 branch June 5, 2026 06:14
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.

Dockerfile JSON form parsing should enforce depth limits

1 participant