Skip to content

POC: Pulumi multi-language IaC parsing support#237

Draft
whitemerch wants to merge 1 commit into
mainfrom
chakib.hamie/pulumi_multilang_support
Draft

POC: Pulumi multi-language IaC parsing support#237
whitemerch wants to merge 1 commit into
mainfrom
chakib.hamie/pulumi_multilang_support

Conversation

@whitemerch

Copy link
Copy Markdown
Contributor

Motivation

The scanner has no first-class support for Pulumi programs written in Python, TypeScript, JavaScript, or Go. This POC explores parsing those sources into a normalized YAML-like document shape so existing Rego rules can evaluate Pulumi resources without a separate rule set per language.

The branch also includes a single-repository walk optimization that feeds a shared file cache and project index into the new parsers.

Changes

Scan pipeline

The analyzer walks the repository once, caches file contents, and exposes inventory metadata so parsers can resolve cross-file symbols without re-reading the tree.

Pulumi platform (POC)

New parsers for Python, TypeScript, JavaScript, and Go extract Pulumi resource constructor calls and emit documents compatible with the existing Pulumi YAML rule format. A project index maps exported constants, variables, and zero-argument helper functions across sibling files. Static resolution covers literals, config defaults, imports, object spreads, type assertions, string concatenation, and locally defined helper calls.

Integration

Parsers register through the existing prepare path and attach to the scan pipeline behind new model kinds for each language.

QA Instruction

  1. GOFLAGS="-mod=mod" go test ./pkg/parser/pulumi/...
  2. go test ./pkg/analyzer/... ./pkg/runner/...
  3. Scan a small Pulumi Python or TypeScript project and confirm resources appear in the normalized document output.

Impact

POC only. Adds new parser packages and scan wiring; does not ship production-ready Pulumi rule coverage. The repository-walk changes affect all platforms that use the shared filesystem provider.

…ript, JavaScript, and Go resource definitions for Rego evaluation.
@whitemerch whitemerch added the poc Proof of concept — not ready for merge label Jul 4, 2026
@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Jul 4, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 46.99%
Overall Coverage: 50.72% (-0.06%)

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

@whitemerch
whitemerch changed the base branch from main to chakib.hamie/polyglot_repo_optimization July 4, 2026 13:55
Base automatically changed from chakib.hamie/polyglot_repo_optimization to main July 7, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

poc Proof of concept — not ready for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant