Skip to content

fix(controlplane): restrict GUAC credentials to service account keys - #3604

Merged
matiasinsaurralde merged 1 commit into
mainfrom
fix/guac-credential-type-validation
Oct 13, 2026
Merged

matiasinsaurralde merged 1 commit into
mainfrom
fix/guac-credential-type-validation

Conversation

@matiasinsaurralde

@matiasinsaurralde matiasinsaurralde commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Refs PFM-7760

Summary

The GUAC fan-out plugin passed the tenant-supplied credentials string straight to the Google Cloud Storage SDK without checking its type.

Reject any credential type but a service account key before the SDK sees it, at both registration and execution so existing registrations are covered too.

View guided diff

@matiasinsaurralde
matiasinsaurralde requested a review from a team October 13, 2026 18:15
@chainloop-platform

chainloop-platform Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

PR validation — ✅ 3 passing

Status Policy Material Messages
✅ Passed pr-min-approvals pr-info -
✅ Passed pr-description-required pr-info -
✅ Passed pr-user-story-linked pr-info -

View attestation ↗

AI Session Checks — 🟢 90% · ⚠️ 1 failing

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟢 90% 1 ⚠️ 1 100% AI / 0% Human 2 +124 / -1 45h8m35s

🟢 90% — 100% AI — ⚠️ 1 policies failing

Oct 11, 2026 21:43 UTC · 45h8m35s · $209.22 · 1.5k in / 1.0M out · claude-code 2.1.296 (claude-opus-4-8)

View session details ↗

Change Summary

  • Revises the trace evidence-export spec across several review-driven follow-ups.
  • Adds trace init --local, trace export, related trace-state handling, docs, and tests.
  • Hardens the GUAC integration to accept only service account credentials and fixes the follow-up lint issue.

AI Session Overall Score

🟢 90% — Mixed capture, but work stayed aligned and heavily verified; planning was lighter than scope.

AI Session Analysis Breakdown

🟢 95% · verification

🟢 AI ran targeted tests, builds, vet, and a trace init/export smoke test. · High Impact

🟢 93% · solution-quality

No notes.

🟢 92% · alignment

🟢 AI compared spec and implementation before coding the missing trace work. · High Impact

🟢 90% · scope-discipline

No notes.

🟢 88% · user-trust-signal

🟢 The user explicitly said the GUAC branch fix was verified. · High Impact

🟡 68% · context-and-planning

🟠 Trace work crossed CLI, hooks, state, docs, and tests without a visible shared plan. · Medium Severity

💡 Before editing this many files, land a short visible plan the user can confirm.


File Attribution

████████████████████ 100% AI / 0% Human

Status Attribution File Lines
modified ai app/controlplane/plugins/core/guac/v1/guac_test.go +86 / -0
modified ai app/controlplane/plugins/core/guac/v1/guac.go +38 / -1

Policies (4, 1 failing)

Status Policy Material Messages
✅ Passed ai-config-ai-agents-allowed ai-coding-session-d139ac -
✅ Passed ai-config-no-dangerous-commands ai-coding-session-d139ac -
⚠️ Failed ai-config-no-secrets ai-coding-session-d139ac
  • Secret (generic-password) detected in session content [turn=1458, source=tool_result, line=6]: 115: Credentials: &sdk.Credentials{Password: [CHAINLOOP_TRACE_REDACTED:generic-password],
  • Secret (generic-password) detected in session content [turn=1464, source=tool_result, line=115]: 115 Credentials: &sdk.Credentials{Password: [CHAINLOOP_TRACE_REDACTED:generic-password],
  • Secret (generic-password) detected in session content [turn=15, source=tool_result, line=115]: 115 Credentials: &sdk.Credentials{Password: [CHAINLOOP_TRACE_REDACTED:generic-password],
  • Secret (generic-password) detected in session content [turn=43, source=tool_result, line=100]: 100 Credentials: &sdk.Credentials{Password: [CHAINLOOP_TRACE_REDACTED:generic-password],
  • Secret (generic-password) detected in session content [turn=49, source=tool_result, line=140]: 140 Credentials: &sdk.Credentials{Password: [CHAINLOOP_TRACE_REDACTED:generic-password],
  • Secret (generic-password) detected in session content [turn=51, source=tool_result, line=132]: 132 Credentials: &sdk.Credentials{Password: [CHAINLOOP_TRACE_REDACTED:generic-password],
  • Secret (generic-password) detected in session content [turn=53, source=tool_result, line=117]: 117 response.Credentials = &sdk.Credentials{Password: [CHAINLOOP_TRACE_REDACTED:generic-password]
✅ Passed ai-config-mcp-servers-allowed ai-coding-session-d139ac -

Security Checks — ✅ 5 passing

✅ secret-scan

Status Policy Messages
✅ Passed secrets-detection -

✅ sast-scan

Status Policy Messages
✅ Passed owasp-top10-2025 -
✅ Passed sast -
✅ Passed cwe-top25 -
✅ Passed cwe-top26-40-cusp -
Scans not applied (3)
Scan Reason
vulnerability-scan no manifest/lockfile changed
github-actions-scan no workflow files changed
iac-scan no IaC files changed

View attestation ↗

Security context

✅ Nothing this change touches has a recorded security-fix history.

View in Chainloop ↗ · How this works ↗


Powered by Chainloop and Chainloop Trace

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

View guided diff | Re-trigger cubic

migmartri
migmartri previously approved these changes Oct 13, 2026
The GUAC integration passed the supplied credentials to the Google Cloud Storage SDK without checking their type. GUAC only needs a service account key, so validate the credential and accept only that type, at registration and on every dispatch.

Other credential types (external_account, impersonated_service_account, authorized_user, gdch_service_account) are no longer accepted. The service account key is the only type the GUAC docs describe.

Chainloop-Trace-Sessions: d139ac66-b95f-4920-ac38-12997996037d

Signed-off-by: Matías Insaurralde <matias@chainloop.dev>
@matiasinsaurralde
matiasinsaurralde merged commit ff3bca7 into main Oct 13, 2026
16 of 17 checks passed
@matiasinsaurralde
matiasinsaurralde deleted the fix/guac-credential-type-validation branch October 13, 2026 19:26
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.

2 participants