You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The one-shot-token LD_PRELOAD library logs the first 4 characters of sensitive tokens to stderr when they are first accessed. In CI environments where stderr is captured in logs, this leaks partial secret values.
Location
containers/agent/one-shot-token/one-shot-token.c, lines 213-234 (format_token_value()) and lines 282-283, 346-347:
staticconstchar*format_token_value(constchar*value) {
staticcharformatted[8];
// ...snprintf(formatted, sizeof(formatted), "%.4s...", value); // Shows first 4 charsreturnformatted;
}
// Called on every first token access:fprintf(stderr, "[one-shot-token] Token %s accessed and cached (value: %s)\n",
name, format_token_value(token_cache[token_idx]));
Example output in CI logs:
[one-shot-token] Token GITHUB_TOKEN accessed and cached (value: ghp_...)
[one-shot-token] Token ANTHROPIC_API_KEY accessed and cached (value: sk-a...)
Risk
GitHub tokens start with ghp_, gho_, ghs_ - the 4-char prefix already reveals the token type
Combined with the token name, this narrows the search space for brute-force attacks
CI logs are often accessible to a broader audience than the secrets themselves
GitHub Actions step summaries and workflow logs persist for 90 days
Proposed Fix
Replace format_token_value() with a fixed-string indicator that doesn't reveal any characters:
These are complementary security improvements rather than duplicates. Consider coordinating fixes to ensure comprehensive protection against token exposure.
This is an automated message from the issue duplication detector.
I've identified this issue as a good candidate for automated resolution and assigned it to the Copilot agent.
The Copilot agent will analyze the issue and create a pull request fixing the format_token_value() function in containers/agent/one-shot-token/one-shot-token.c to stop logging partial token values to stderr.
Activity
github-actions commentedon Feb 12, 2026
🍪 Issue Monster has assigned this to Copilot!
I've identified this issue as a high-priority security fix and assigned it to the Copilot agent.
The Copilot agent will analyze the issue and create a pull request to remove partial token value logging from the one-shot-token library.
Om nom nom! 🍪
github-actions commentedon Feb 12, 2026
👋 Hello! I noticed this security issue is related to an existing issue:
Both issues address security concerns with the one-shot-token library, but they focus on different attack vectors:
/proc/self/environand plaintext tokens in docker-compose.ymlThese are complementary security improvements rather than duplicates. Consider coordinating fixes to ensure comprehensive protection against token exposure.
This is an automated message from the issue duplication detector.
github-actions commentedon Feb 12, 2026
🍪 Issue Monster has assigned this to Copilot!
I've identified this issue as a good candidate for automated resolution and assigned it to the Copilot agent.
The Copilot agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Feb 13, 2026
🍪 Issue Monster has assigned this to Copilot!
I've identified this issue as a good candidate for automated resolution and assigned it to the Copilot agent.
The Copilot agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Feb 16, 2026
🍪 Issue Monster has assigned this to Copilot!
I've identified this issue as a good candidate for automated resolution and assigned it to the Copilot agent.
The Copilot agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Mar 4, 2026
🍪 Issue Monster has assigned this to Copilot!
I've identified this issue as a good candidate for automated resolution and assigned it to the Copilot agent.
The Copilot agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Mar 5, 2026
🍪 Issue Monster has assigned this to Copilot!
I've identified this issue as a good candidate for automated resolution and assigned it to the Copilot agent.
The Copilot agent will analyze the issue and create a pull request fixing the
format_token_value()function incontainers/agent/one-shot-token/one-shot-token.cto stop logging partial token values to stderr.Om nom nom! 🍪
fix(security): stop logging partial token values
fix(security): stop logging partial token values (#1158)