feat: add credential profiles for secrets manager integration#160
Closed
codyfrisch wants to merge 1 commit intomondaycom:masterfrom
Closed
feat: add credential profiles for secrets manager integration#160codyfrisch wants to merge 1 commit intomondaycom:masterfrom
codyfrisch wants to merge 1 commit intomondaycom:masterfrom
Conversation
859baa4 to
729d0d5
Compare
Author
|
Yes I had a few amendments after the fact. Found more edge cases in the interactivity that needed to be corrected and I thought I was done more than a few times. Also added bidirectional comments around a bug out of scope and my workaround. |
8dd6662 to
7560a1b
Compare
Add named credential profiles to .mappsrc that execute shell commands
to fetch tokens at runtime, avoiding plaintext token storage on disk.
This reduces the risk of credential theft from supply chain attacks.
New commands:
- mapps profile (interactive management)
- mapps profile:add --name dev --command "op read op://vault/dev/token"
- mapps profile:remove --name dev
- mapps profile:list
- mapps profile:set-default --name dev
- mapps profile:clear-default
- mapps profile:remove-token
Global flags on all commands:
- --profile <name> to override the default profile at runtime
- --ignore-profiles to bypass profile resolution
Config format (.mappsrc):
{ "profiles": { "dev": "op read ...", "prod": "echo ..." },
"defaultProfile": "dev" }
Env var precedence: --profile flag > defaultProfile > pre-existing
MONDAY_CODE_ACCESS_TOKEN env var > static accessToken in config.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7560a1b to
cb90afb
Compare
Author
|
Withdrawing pending a security mitigation for CVE-2025-69262. Profile command strings that contain env var references (e.g. |
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.
Closes #159
Summary
.mappsrcthat execute shell commands to fetch tokens at runtime, keeping plaintext tokens off diskmapps profileinteractive command andprofile:add,profile:remove,profile:list,profile:set-default,profile:clear-default,profile:remove-tokensubcommands--profileand--ignore-profilesflags to all commands.mappsrcprofiles are ignored with a warning to prevent command injection from malicious repositoriesThis is fully backwards compatible — existing
.mappsrcfiles and the plaintextmapps initworkflow continue to work unchanged. The goal is not to remove the plaintext option, but to ensure developers have a secure alternative available so that storing credentials on disk becomes an informed choice rather than the only path offered by the tool.Note: this also includes the env var precedence fix from #156 — pre-existing
MONDAY_CODE_ACCESS_TOKENenv vars are no longer overwritten by.mappsrcconfig values. This is needed for correctness when profiles coexist with externally set tokens (e.g. CI). If #156 merges first, the conflict onsetConfigDataInProcessEnvwill be trivial to resolve.Config format
{ "profiles": { "dev": "op read 'op://vault/dev/credential'", "prod": "echo PROD_TOKEN_HERE" }, "defaultProfile": "dev" }Test plan
mapps profile:add --name dev --command "echo token" --set-as-defaultwrites correct configmapps profile:listdisplays profiles with default indicatormapps profile:remove --name devremoves profile and clears default if it was the defaultmapps profile:set-default --name produpdates defaultProfilemapps profile:clear-defaultremoves defaultProfilemapps profile:remove-tokenremoves legacy plaintext accessTokenmapps profileinteractive flow works for add/remove/set-default/clear-default/listmapps code:push --profile prodresolves the named profile at runtimemapps code:push --ignore-profilesskips profile resolution