Thanks to visit codestin.com
Credit goes to github.com

Skip to content

security: bound recursive glob expansion work - #2925

Merged
alixander merged 2 commits into
masterfrom
security/glob-feedback-budget
Sep 13, 2026
Merged

security: bound recursive glob expansion work#2925
alixander merged 2 commits into
masterfrom
security/glob-feedback-budget

Conversation

@alixander

Copy link
Copy Markdown
Collaborator

Human


AI

Summary

  • Add a configurable work budget for recursive glob expansion across the compiler, IR, and library APIs.
  • Bound generated fields and charge candidate traversal, recursive rule application, substitutions, literal body replay, and array materialization before expensive allocation.
  • Return a clear compilation error when the budget is exceeded.

Security impact

Small recursive glob expressions could feed generated fields back into later matches and amplify into excessive CPU or memory use. The new accounting stops those inputs before they can exhaust process resources.

Validation

  • go test ./... -count=1
  • go vet ./...
  • Boundary and adversarial tests for two-rule and three-rule feedback, substitutions, duplicate literal keys, missing variables, nested arrays, and a 1,000 by 1,000 array payload.

@alixander
alixander marked this pull request as ready for review September 13, 2026 03:29
@alixander
alixander merged commit cb93dcd into master Sep 13, 2026
13 checks passed
@alixander
alixander deleted the security/glob-feedback-budget branch September 13, 2026 03:44
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