feat: add secret_service, pass, and credential_manager resolvers#152
Merged
Conversation
…mpty results - Replace psEscape + raw -Command with -EncodedCommand (Base64 UTF-16LE) to eliminate layered cmd.exe/PowerShell quoting vulnerabilities - Add empty-result guard matching passResolver pattern
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts MegaLinter is graciously provided by OX Security |
- TYPESCRIPT_ES (not TYPESCRIPT_ESLINT) is the correct descriptor name - NODE_ENV=development in PRE_COMMANDS to install devDependencies - Use project eslint binary at /tmp/lint/node_modules/.bin/eslint - COMMAND_REMOVE_ARGUMENTS to strip --no-eslintrc (removed in ESLint 9+)
Contributor
Author
|
Apologies for the spam, I realised megalinter wasn't running eslint (fixed in this PR) |
JoshMock
approved these changes
Apr 15, 2026
| }) | ||
|
|
||
| it('throws on Windows', async () => { | ||
| const restorePlatform = _testSetPlatform('win32') |
Member
There was a problem hiding this comment.
future nice-to-have: OS-specific integration tests that actually hit their respective secret services.
Merged
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.
Summary
$(cmd:...)shell commands:secret_service(Linux): freedesktop.org Secret Service API viasecret-tool lookuppass(cross-platform): standard Unix password manager viapass show, returns first line onlycredential_manager(Windows): Windows Credential Manager via PowerShellGet-StoredCredentialwith-EncodedCommandto avoid shell injectionparseServiceAccounthelper fromkeychainResolverto DRY service/account validation acrosskeychain,secret_service, andcredential_managerUsage
Design decisions
passfirst-line onlycredential_manageruses-EncodedCommand-Commandcredential_manager10s timeoutpassno platform restrictioncredential_managerandpassGet-StoredCredentialcan exit 0 with empty output on missing targetsMegaLinter ESLint fixes
The existing MegaLinter config had several issues that prevented ESLint from ever running on CI:
TYPESCRIPT_ESLINT(not a real descriptor) changed toTYPESCRIPT_ESNODE_ENV=production, sonpm ciskipped eslint/typescript-eslint. Fixed withNODE_ENV=development--no-eslintrcwhich was removed in ESLint 9+. Fixed withCOMMAND_REMOVE_ARGUMENTS/tmp/lint/node_modules/.bin/eslint(built-in is too old for flat config)Test plan
secret-toolinstalledCredentialManagerPowerShell modulepassinstalled