Skip to content

chore: ignore http-recorder test fixtures in GitGuardian scans#59

Merged
Alezander9 merged 2 commits into
mainfrom
chore/gitguardian-ignore
May 12, 2026
Merged

chore: ignore http-recorder test fixtures in GitGuardian scans#59
Alezander9 merged 2 commits into
mainfrom
chore/gitguardian-ignore

Conversation

@Alezander9
Copy link
Copy Markdown
Member

Summary

Add .gitguardian.yaml to suppress the recurring GitGuardian check failure on packages/http-recorder/test/record-replay.test.ts.

Background

PR #58's GitGuardian check failed on a "Google API Key" finding at packages/http-recorder/test/record-replay.test.ts:122 (AIzaSyDHibiBRvJZLsFnPYPoiTwxY4ztQ55yqCE). The "secret" is a test fixture: the file asserts that the http-recorder's secretFindings() function correctly detects and redacts Google-API-Key-shaped strings, which requires having a key-shaped string in the input.

The string comes from upstream commit 5bb7b2344 (anomalyco/opencode — the native LLM core PR adopted in #58). Upstream has its own .gitleaksignore listing the same lines, but gitleaks and GitGuardian are separate scanners with separate ignore files — and our org's GitHub check uses GitGuardian.

Why this is safe

  • The fixtures are intentionally fake, asserting a redaction function works.
  • @opencode-ai/http-recorder is upstream-only dev/test code. Not a dependency of browsercode-core, bcode-browser, or bcode-laminar — verified by grepping their package.json files.
  • The package is outside our filtered typecheck scope.

Without this fix

Every future upstream sync will keep re-triggering this check (upstream isn't going to delete a test fixture), so each sync PR would have to be merged over a red GitGuardian check. This adds 14 lines of YAML and the noise goes away.

The package contains intentionally-fake API-key-shaped strings used as
fixtures asserting the http-recorder's secretFindings() redaction logic.
Mirrors .gitleaksignore for the GitGuardian scanner.

@opencode-ai/http-recorder is upstream-only dev/test code; not a
dependency of any shipped package.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".gitguardian.yaml">

<violation number="1" location=".gitguardian.yaml:14">
P2: The ignore pattern is too broad for a secret-scanning exception. Scope this to the specific fixture file (or exact finding) so future real secrets in other test files are still detected.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread .gitguardian.yaml Outdated
PR feedback: ignoring the whole packages/http-recorder/test/** directory
is too broad — a future real leak in fixtures/recordings/ would be missed.
Narrow to the single record-replay.test.ts file that contains the
intentional API-key-shaped fixtures.
@Alezander9 Alezander9 merged commit 7224a3c into main May 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant