Releases: GeiserX/cc-aws-keepalive
Releases · GeiserX/cc-aws-keepalive
v0.5.0
What's New
Credential Sync
Optionally sync AWS session credentials to remote machines after every successful login. Supports three sync types:
- SSH — Copy credentials to remote
~/.aws/credentialsvia SSH (key-based or sshpass) - Webhook — POST credentials to an HTTPS endpoint
- Command — Pipe credential JSON to a custom shell command's stdin
Features
- Fires proactively (each prompt when creds are fresh) and reactively (after auto-login re-auth)
- Debounced via configurable
syncCooldownSeconds(default: 60s) - Refuses to sync long-lived IAM keys (session token required)
- HTTPS-only enforcement for webhooks
- Atomic remote writes (write to .tmp, then mv)
- Credentials piped via stdin — never in CLI arguments or env vars
sshArgsaccepts both string and array form
Security Hardening
remotePathvalidated against safe-path regex (blocks shell injection)sshpass -e(env var) instead of-p(no password inpsoutput)- Capped stderr buffers at 8KB
- Webhook URL validated early with clear error messages
- Documented TOFU trade-off for SSH host key verification
Configuration
New fields in ~/.config/cc-aws-keepalive/config.json:
{
"syncTargets": [],
"syncTimeoutSeconds": 15,
"syncCooldownSeconds": 60
}See README — Credential sync for full documentation.
v0.4.1
v0.4.0
What's Changed
- ci: auto-release on version bump to main by @GeiserX in #16
- ci: bump codecov/codecov-action from 5 to 6 by @dependabot[bot] in #19
- ci: bump actions/checkout from 4 to 6 by @dependabot[bot] in #17
- ci: bump actions/setup-node from 4 to 6 by @dependabot[bot] in #18
- fix: treat future-timestamp lock files as stale + rename CLAUDE.md by @GeiserX in #20
- fix: harden cross-platform compatibility, security, and test coverage by @GeiserX in #21
- chore: bump version to 0.4.0 by @GeiserX in #22
Full Changelog: v0.3.2...v0.4.0
v0.3.2
Fixes
- Prevent duplicate MFA notifications: Added atomic cross-process lock so only one auto-login runs system-wide, regardless of how many CC sessions are open
- Cross-platform sleep: Replaced
execSync("sleep 3")withAtomics.wait(works on all platforms without shell dependency) - STS fallback in wait loop: Sessions waiting for another's auto-login now also check via STS when
expirationFieldmetadata is unavailable - Lock directory creation: Ensure
~/.config/cc-aws-keepalive/exists before attempting lock acquisition
Tests
- 46 unit tests (11 new), 98.76% statement coverage via c8
- Tests cover lock acquisition, stale lock cleanup, lock contention, release, and sleepSync timing
- Added loadConfig validation branch coverage (unknown keys, type coercion, warnings)
v0.3.1
Fixes
- INI parser: Skip comment lines (
#and;) in credentials file parser - Expiration validation: Reject non-numeric, trailing-junk, and sub-epoch expiration values instead of silently misinterpreting them
- stdout encoding: Handle
BufferandUint8Arraychunks with proper encoding in omc-timer stdout patch - Tests: 5 new unit tests (35 total) covering comment lines, ISO-8601 rejection, sub-epoch rejection, and trailing-junk rejection
v0.3.0
What's new
autoLoginCmd — automated credential re-authentication
- Proactive:
aws-cred-check.mjsspawnsautoLoginCmdin the background when session nears expiry (configurableautoLoginMinutes, 5-min cooldown) - Reactive:
aws-auth-refresh.mjsrunsautoLoginCmdsynchronously on Bedrock 403 (3-min timeout) - Designed for
expectscripts that drive interactive CLIs (password from Keychain, MFA push)
Config validation
- Warns on unknown config keys (typo detection)
- Type coerces numeric strings; warns on type mismatches
- Graceful recovery from malformed JSON
- Warns when
autoLoginMinutesrequiresexpirationField
Unit tests (30 tests, zero dependencies)
lib.test.mjs: formatTime, parseCredentials, loadConfig, getRemainingaws-cred-export.test.mjs: integration tests spawning the script as subprocess
CI improvements
- Matrix: 3 OS (ubuntu, macOS, windows) × 3 Node versions (18, 20, 22)
fail-fast: falsefor full visibility
Cross-platform hardening
spawn(cmd, { shell: true })for Windows compatibility- CRLF-safe splits everywhere
USERPROFILEalongsideHOMEfor Windowsos.homedir()- STS timeouts (10s/15s) to prevent hanging
- Lockfile written after successful spawn; guarded I/O
Docs
CC_KEEPALIVE_PROFILEenv varexpirationFieldexamples per provider- Platform notes section
v0.2.2
v0.2.1
Fixes
- OMC-update-safe timer: Replaced fragile
omc-hud.mjspatching with a standaloneaws-hud-wrapper.mjsthat survives OMC updates. The wrapper intercepts OMC's stdout and appends the AWS timer, then delegates toomc-hud.mjswithout modifying it. - Auto-configures statusLine: Installer automatically swaps
omc-hud.mjs→aws-hud-wrapper.mjsin settings.json - Legacy cleanup: Strips old marker-based patch from
omc-hud.mjsif present from previous versions - Graceful fallback: If cc-aws-keepalive is unavailable, OMC HUD runs normally without the timer
v0.2.0
New
- Auto-login: New
autoLoginMinutesconfig option. When your session has fewer minutes remaining than configured, the hook silently runsloginCmdto re-authenticate before the prompt proceeds. Rate-limited to once per 5 minutes. Set to0to disable (default).
Example
{
"autoLoginMinutes": 120
}With this config, when your session drops below 2 hours remaining, the next prompt auto-runs your login command. If it succeeds silently, you'll see:
AWS session auto-renewed (valid for 7h59m).
v0.1.2
Fixes
- Stop blocking expired prompts: Expired credentials now warn via stderr instead of blocking. Blocked prompts were discarded by CC, causing users to lose their typed message. The reactive path (
awsAuthRefresh+awsCredentialExport) handles recovery without losing context.