Disclosed weakness · no CVE recorded

Pydantic secret masking missed the Gemini AQ key format

Pydantic · Pydantic AI Harness secret detector

First documented disclosure · Review checkpoint

Summary

The default Google-key detector did not redact AQ-prefixed keys in messages and tool output.

Severity and exploitation evidence

No CVSS score recorded in this review.

Exploitation not established: The reviewed sources establish a disclosed weakness or controlled evidence, not malicious exploitation against users. No product, package or payload was executed in this review.

Exploitation evidence source

Technical severity is not a measure of observed attacks or of risk to your deployment. Attempts, demonstrations, and successful compromise retain the qualifications in the source.

How the weakness works

The existing pattern matched the older AIza format only.

Conditions required

Secret masking relies on the default google_api_key detector and an AQ-prefixed key appears in scanned material.

Potential impact

A key can remain readable in material the application expected to be redacted.

Affected versions and configurations

Earlier Harness versions using the old Google-key pattern; complete affected range is unspecified.

Fix and mitigation status

Harness 0.77.0 includes a tagged pattern for AQ. followed by 40–200 key characters.

Practical next steps

Upgrade and inspect potentially retained unredacted outputs; rotate keys when exposure is established.

Operating lesson

Secret detectors need explicit coverage for credential format changes.

Evidence and limits

The original issue and PR are November 15; PR 13551 merged November 27. Tagged code is bounded to 40–200 characters and rejects a partial match on a longer run. The stale bot summary says there is no upper cap; the current code and handwritten note supersede that. This is not a claim that every possible Google key format is covered. PyPI 0.77.0 artifacts are non-yanked; package maturity remains Alpha.

Sources