Skip to content

Pre-seed scaffolded bindings from secret names - #12

Merged
amoses12 merged 1 commit into
masterfrom
austin/scaffold-binding-template
Sep 9, 2026
Merged

Pre-seed scaffolded bindings from secret names#12
amoses12 merged 1 commit into
masterfrom
austin/scaffold-binding-template

Conversation

@amoses12

@amoses12 amoses12 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

An explicit secret-to-upstream mapping is where most of these vulnerabilities get closed, but an operator faced with a blank example rarely writes one. On first run the scaffolded config now documents the binding shape (host/paths/methods) and lists one commented stub per secret in the user's own Doppler config, so they edit real names instead of transcribing a generic example. Every stub stays commented, so a fresh scaffold still injects nothing until a host is filled in; with no names reachable it falls back to the provider example. The existing --proxy-config flag already lets the file live anywhere.

@mikesellitto mikesellitto left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

fyi: conflicts with #11 on the starter config text, and starterConfigHead here still lists statsig and sentry. Whichever lands second reconciles.

Comment thread pkg/cmd/proxy.go
// operator edits real entries instead of a generic example.
source := proxy.NewDopplerSource(localConfig)
proxyConfig, created, err := proxy.LoadOrScaffold(proxyConfigPath, func() []string {
names, _ := source.List(context.Background())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

optional: a bad token here falls back to the generic stubs silently and the real error shows up a moment later from the engine. A LogWarning on the error would make the fallback visible, but the engine's failure covers it, so your call.

An explicit secret-to-upstream mapping is where most of these vulnerabilities get
closed, but an operator faced with a blank example rarely writes one. On first run the
scaffolded config now documents the binding shape (host/paths/methods) and lists one
commented stub per secret in the user's own Doppler config, so they edit real names
instead of transcribing a generic example. Every stub stays commented, so a fresh
scaffold still injects nothing until a host is filled in; with no names reachable it
falls back to the provider example. The existing --proxy-config flag already lets the
file live anywhere.
@amoses12
amoses12 force-pushed the austin/scaffold-binding-template branch from 430ff03 to c49b9e8 Compare September 9, 2026 21:16
@amoses12
amoses12 merged commit 6569ca4 into master Sep 9, 2026
25 of 33 checks passed
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