Skip to content

config: detect recursive includes#2194

Open
officialasishkumar wants to merge 1 commit into
chainguard-dev:mainfrom
officialasishkumar:config-detect-include-cycles
Open

config: detect recursive includes#2194
officialasishkumar wants to merge 1 commit into
chainguard-dev:mainfrom
officialasishkumar:config-detect-include-cycles

Conversation

@officialasishkumar
Copy link
Copy Markdown

Summary

  • track canonicalized config file paths while processing deprecated include chains
  • return a clear recursive include error instead of recursing indefinitely
  • add coverage for self-includes and two-file include cycles

Fixes #1627

Test plan

  • go test ./pkg/build/types
  • go test ./pkg/build/... ./internal/cli
  • go test ./...
  • git diff --check
  • go mod tidy && git diff --exit-code -- go.mod go.sum

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
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.

apko include can loop forever by recursively included files.

1 participant