Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
integration/keeper_secrets_manager_cli/keeper_secrets_manager_cli/keyring_config.py
Fixed
Show fixed
Hide fixed
integration/keeper_secrets_manager_cli/keeper_secrets_manager_cli/keyring_config.py
Fixed
Show fixed
Hide fixed
integration/keeper_secrets_manager_cli/keeper_secrets_manager_cli/keyring_config.py
Dismissed
Show dismissed
Hide dismissed
acffcd5 to
31e606c
Compare
de67025 to
fd8c787
Compare
integration/keeper_secrets_manager_cli/keeper_secrets_manager_cli/keyring_config.py
Dismissed
Show dismissed
Hide dismissed
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.11", "3.12", "3.13"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install system deps (dbus + gnome-keyring) | ||
| run: sudo apt-get install -y gnome-keyring dbus-x11 | ||
|
|
||
| ########## KSM Python SDK (from source) | ||
|
|
||
| - name: Install SDK dependencies | ||
| working-directory: ./sdk/python/core | ||
| run: | | ||
| python3 -m pip install --upgrade pip | ||
| python3 -m pip install setuptools | ||
| python3 -m pip install -r requirements.txt | ||
| python3 -m pip install -e . | ||
|
|
||
| - name: Install SDK for integrations | ||
| working-directory: ./sdk/python/core | ||
| run: | | ||
| python3 setup.py build install | ||
|
|
||
| ########## KSM Python Helper (from source) | ||
|
|
||
| - name: Install SDK Helper dependencies | ||
| working-directory: ./sdk/python/helper | ||
| run: | | ||
| python3 -m pip install --upgrade pip | ||
| python3 -m pip install -r requirements.txt | ||
| python3 -m pip install -e . | ||
|
|
||
| - name: Install SDK Helper for integrations | ||
| working-directory: ./sdk/python/helper | ||
| run: | | ||
| python3 setup.py build install | ||
|
|
||
| ########## CLI with keyring extra | ||
|
|
||
| - name: Install CLI with keyring extra | ||
| working-directory: ./integration/keeper_secrets_manager_cli | ||
| run: pip install -e ".[keyring]" pytest | ||
|
|
||
| - name: Run keyring integration tests | ||
| working-directory: ./integration/keeper_secrets_manager_cli | ||
| run: | | ||
| dbus-run-session -- bash -c " | ||
| echo '' | gnome-keyring-daemon --unlock --components=secrets,keyring | ||
| KSM_KEYRING_INTEGRATION=1 python -m pytest tests/keyring_integration_test.py -v --tb=short | ||
| " |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 17 days ago
To fix the problem, explicitly define a permissions block that limits GITHUB_TOKEN to the minimal required rights. In this workflow, the jobs only need to check out code and run Python tests, so read access to repository contents is sufficient; no write or PR/issue permissions are needed.
The best minimal change is to add a workflow-level permissions block near the top of .github/workflows/test.cli.yml, just after the name (or before on:). This block will apply to both test-cli and test-cli-keyring since they do not define their own permissions. We’ll set contents: read, which is the recommended minimal baseline and matches CodeQL’s suggested starting point.
Concretely:
- Edit
.github/workflows/test.cli.yml. - Insert:
permissions:
contents: read- Place it between line 2 and line 3 (after
name: Test-CLIand the blank line), keeping indentation at the root level. - No imports, methods, or other definitions are needed because this is a YAML configuration change only.
| @@ -1,5 +1,8 @@ | ||
| name: Test-CLI | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ master ] |
Add OS-native keyring storage, profile delete command, and multiple bug fixes for ini-file handling, custom fields, and dependency updates. Features: - KSM-800: add OS-native keyring secure storage for CLI configuration - KSM-810: add profile delete command and fix active profile clearing - KSM-805: add SHA-256 cross-session integrity verification for keyring config - KSM-804: warn on stderr when keyring empty and legacy keeper.ini found - KSM-830: add Docker keyring integration tests against real Secret Service backend Bug fixes: - KSM-832: remove lkru utility integration from CLI keyring storage - KSM-831: defer AwsConfigProvider import to aws storage branch in _load_config - KSM-829: fix profile name validation to reject path-traversal and special characters - KSM-828: prevent unit tests from writing mock data to real system keyring - KSM-820: fix JSON output key custom_fields → custom for interoperability - KSM-818: pin click-repl<0.3.0 to fix shell crash with click>=8.2 - KSM-817: raise CLI minimum Python to 3.10 and make boto3 optional - KSM-815: validate profile name before redeeming one-time token - KSM-814: fix --ini-file ignored by profile setup, config, export, and init subcommands - KSM-799: drop importlib_metadata backport, use stdlib importlib.metadata - KSM-702: fix JSON output key custom_fields → custom and ensure custom:[] in record create payload Maintenance: - upgrade Python SDK dependency to v17.2.0 - address CVE-2026-23949 via dependency update
276fffe to
c756510
Compare
Summary
Release branch for CLI v1.3.0 — adds OS-native keyring storage as the default credential store, with security hardening and dependency fixes.
Changes
New Features
keyringis an optional install (pip install keeper-secrets-manager-cli[keyring]);--ini-fileflag opts into explicit file-based storageksm profile delete <name>subcommand; completes the recovery path referenced byKsmCliIntegrityExceptionBug Fixes
--ini-fileflag respected by all subcommands (KSM-814): allprofileandconfigsubcommands now correctly use the--ini-filepath —profile list,profile active,profile export,profile import,profile init,profile setup;config show,config color,config cache,config record-type-dir,config editorKsmCliIntegrityExceptionwith aksm profile deleterecovery hint; backward-compatible (existing entries bootstrap silently on next save)delete_profile()now clearsactive_profilein the common config when the active profile is deleted, preventing a broken-keychain state on subsequent invocationskeeper.iniexists, with a--ini-filerecovery hint; fixed duplicate warnings from redundantProfileinstantiation in command handlerskeeper.inicreated atomically at 0600 viaos.open()(eliminates TOCTOU window on Unix);set_config_modealways runs on every write so Windows ACLs (icacls) are applied to new files and pre-existing bad permissions are corrected on re-save_reload_config()now correctly re-appliesKSM_CONFIGandKSM_CONFIG_BASE64_*environment variable configs on reload instead of falling through to disk discoverycustom: []now always included when creating records with no custom fields; previously the key was silently omitted, causing schema inconsistency with Vault and Commander[a-zA-Z0-9_-]{1,64}pattern as keyring storage; previously path-traversal characters and special characters passed the early check, consuming the one-time token before the stricter validator firedksm shellcrashed on any command when click-repl==0.3.0 was resolved alongside click>=8.2 (protected_argsbecame read-only in Click 8.2); pinned click-repl to <0.3.0ksm secret get --jsonnow outputs custom fields under"custom"(was"custom_fields"), matching the canonical V3 record format used by Commander and the Keeper VaultKeyringConfigStorage.is_availablemock to all 19Profile.init()call sites used as test scaffolding insecret_test.py,exec_test.py, andsecret_inflate_test.py--ini-fileprofiles (KSM-831):AwsConfigProviderimport deferred to inside theelif storage == "aws":branch; users without[aws]extra no longer hitMissing import dependencies: boto3when loading any non-AWS profile via--ini-fileKSM_CONFIG_KEYRING_UTILITY_PATHenvironment variable; lkru requires the same D-Bus Secret Service daemon as the Pythonkeyringlibrary and is not a headless alternative;is_available()now correctly returnsFalsewhenkeyringis not installed or no Secret Service daemon is running, falling back tokeeper.inifile storage in both casesMaintenance
~=2.0to>=3.0(fixes pip dependency resolution conflicts)>=17.2.0, keeper-secrets-manager-helper to>=1.1.0test-cli-keyringCI job across Python 3.10–3.13;test.cli.ymlpath-filtered to CLI and Python SDK pathsBreaking Changes
[aws]extra:pip install keeper-secrets-manager-cli[aws]Related Issues