feat: add credential_process allowlist for profile registry#933
Draft
feat: add credential_process allowlist for profile registry#933
Conversation
…_process injection via profile registry Registry admins could set arbitrary credential_process values in profiles, allowing command injection when AWS CLI resolves credentials. Add an AllowedCredentialProcesses config option under [ProfileRegistry] in ~/.granted/config that restricts which credential_process command prefixes are accepted from registry-sourced profiles. Profiles with disallowed values are skipped with a warning at sync time. When no allowlist is configured, only "granted credential-process" is permitted by default (secure by default). Orgs with custom credential helpers can explicitly allow them in their config.
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.
Problem
The profile registry feature allows registry administrators to set arbitrary
credential_processvalues in synced profiles. An attacker with write access to a registry repository could inject a malicious command that executes whenever the AWS CLI resolves credentials for that profile.Solution
Add an
AllowedCredentialProcessesoption to the[ProfileRegistry]config in~/.granted/config. During registry sync, any profile whosecredential_processvalue does not match an entry in the allowlist is skipped with a warning and never written to~/.aws/config.When no allowlist is configured, only
granted credential-processis permitted. Organizations with custom credential helpers can explicitly allow them:Example
registry add:registry sync: