Skip to content

Kustomize foundations: model, bounded filesystem, Helm renderer#111

Draft
whitemerch wants to merge 3 commits into
mainfrom
chakib.hamie/kustomize_support_foundation
Draft

Kustomize foundations: model, bounded filesystem, Helm renderer#111
whitemerch wants to merge 3 commits into
mainfrom
chakib.hamie/kustomize_support_foundation

Conversation

@whitemerch
Copy link
Copy Markdown
Contributor

@whitemerch whitemerch commented Apr 24, 2026

Tip

This PR is best reviewed commit by commit.

Summary

  • Refactor Helm chart rendering into a reusable preprocessor renderer with virtual file outputs and option handling.
  • Add Kustomize foundation model/provenance types plus shared YAML line detection support for future resolver work.
  • Add bounded filesystem safeguards for resolver file access and wire virtual files through scan preparation

Full design context and architecture details: #113

Test plan

  • go test ./cmd/scanner ./pkg/featureflags ./pkg/kics ./pkg/resolver/helm ./pkg/resolver/sandbox ./pkg/scanner
  • git diff --check origin/main

Non-goals

  • No Kustomize preprocessor is registered or enabled in this PR.
  • Existing Helm scan behavior is expected to remain compatible for the default scanner path.

@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 Bot commented Apr 24, 2026

🎯 Code Coverage (details)
Patch Coverage: 55.25%
Overall Coverage: 45.52% (+0.08%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 79096eb | Docs | Datadog PR Page | Give us feedback!

@whitemerch whitemerch force-pushed the chakib.hamie/kustomize_support_foundation branch 3 times, most recently from 7338570 to ec13e91 Compare April 24, 2026 11:28
@whitemerch whitemerch marked this pull request as ready for review April 24, 2026 15:58
@whitemerch whitemerch requested a review from a team as a code owner April 24, 2026 15:58
chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@MikaYuoadas MikaYuoadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is very big, its sheer size overflow the context of my limited brainpower (there’s only so much token available before my brains gives up 😆 ).
But I’ve done my best to read it all and left a few comments on minor issues I found.

Otherwise the main thing I’m concerned about is not in the code itself but on the decision to surface resolver failure as vulnerability that IIUC will be added to the final SARIF output and will create customer facing findings. Is that intended design? I find it quite strange, and if we want to do so it may warrant more product discussion. We are a security product, not a linter for syntax error. IMHO findings about syntax error is not something customers expect to see in IaC explorer. (but correct me if I understood it wrong).

Comment thread pkg/resolver/sandbox/sandbox.go Outdated
Comment thread pkg/resolver/sandbox/bounded_fs.go Outdated
Comment thread pkg/resolver/sandbox/bounded_fs.go Outdated
Comment thread pkg/resolver/sandbox/bounded_fs.go Outdated
Comment thread pkg/resolver/helm/render.go
Comment thread pkg/kics/resolver_diagnostics.go Outdated
Comment thread pkg/resolver/helm/render.go Outdated
Comment thread pkg/resolver/helm/helm.go Outdated
Comment thread pkg/resolver/helm/helm.go Outdated
Comment thread pkg/resolver/helm/render.go Outdated
@whitemerch
Copy link
Copy Markdown
Contributor Author

whitemerch commented Apr 30, 2026

This PR is very big, its sheer size overflow the context of my limited brainpower (there’s only so much token available before my brains gives up 😆 ). But I’ve done my best to read it all and left a few comments on minor issues I found.

Otherwise the main thing I’m concerned about is not in the code itself but on the decision to surface resolver failure as vulnerability that IIUC will be added to the final SARIF output and will create customer facing findings. Is that intended design? I find it quite strange, and if we want to do so it may warrant more product discussion. We are a security product, not a linter for syntax error. IMHO findings about syntax error is not something customers expect to see in IaC explorer. (but correct me if I understood it wrong).

@MikaYuoadas Nop, you are totally right. I misunderstood this part of the code, I needed a way to report non-fatal resolver problems while still continuing the scan, but I will mimick the Helm behavior for now

@whitemerch whitemerch force-pushed the chakib.hamie/kustomize_support_foundation branch 2 times, most recently from e8b5084 to a58d6bf Compare April 30, 2026 16:00
@whitemerch whitemerch changed the title Kustomize foundations: model, sandbox, helm render, resolver diagnostics Kustomize foundations: model, sandbox, Helm renderer Apr 30, 2026
@whitemerch whitemerch changed the title Kustomize foundations: model, sandbox, Helm renderer Kustomize foundations: model, bounded filesystem, Helm renderer Apr 30, 2026
@whitemerch whitemerch force-pushed the chakib.hamie/kustomize_support_foundation branch from a58d6bf to 79096eb Compare April 30, 2026 16:12
@whitemerch whitemerch marked this pull request as draft May 11, 2026 12:35
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.

2 participants