Repository navigation
feat(generate): scaffold provider profile skeletons for unmapped credentials - #30
Merged
Merged
Conversation
…; smarter duplicate-endpoint warning Signed-off-by: Ilan Harel <[email protected]>
…; smarter duplicate-endpoint warning Signed-off-by: Ilan Harel <[email protected]>
ilanh
force-pushed
the
feat/scaffold-profiles
branch
from
November 3, 2026 08:34
f733c78 to
ec73326
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Three of five tested projects needed a hand-written custom provider profile, and
providers.shonly said# UNMAPPED ... write a custom profile.generate --scaffold-profiles DIRwritesDIR/<id>.yamlfor every unmapped credential (id = env var lower-cased with hyphens): the credential, plus endpoints,accessand binaries taken from theegressdirectives in the file that declares the credential.tls=skipendpoints getallow_uninspected_credentials: true(OpenShell's profile lint requires it for L4-only credentialed endpoints); credentials with no egress in their file getendpoints: []and TODO comments. Existing files are kept, nothing is written without the flag, no secret values are involved. TheUNMAPPEDcomment inproviders.shnow points to the flag.egress X duplicates an endpoint the profile addsis now only shown when the profile'sbinariesoverlap the rule's binaries (profile bound togh/git, app isnode: the explicit rule is needed, no warning). Profiles that list no binaries keep the old behaviour.Checked with the real tool: skeletons generated from anthropic-proxy-rs's sidecar (
tls=skipcase) and synthetic cases all passopenshell provider profile lint -f(OpenShell 0.1.6 on the dev server). CI cannot run that, so the tests reload the skeletons with our own profile loader.Tests:
tests/scaffold_profiles.rs(3 tests) and a unit test.TOOLCHAIN=1.94 scripts/ci-local.shand stable clippy pass.Ordering: independent (new module
scaffold.rs; small edits inproviders.rs,generate.rs,main.rs'sGeneratearm). Another PR (#26) edits other parts ofmain.rs, and #21/#25 editdo_scan; any of them may need a trivial rebase.Closes #13