Skip to content

feat(contrib): add finops-zero-trust-governor recipe and finops plugin - #2824

Closed
varmaleena wants to merge 6 commits into
google:mainfrom
varmaleena:feat/finops-zero-trust-governor
Closed

varmaleena wants to merge 6 commits into
google:mainfrom
varmaleena:feat/finops-zero-trust-governor

Conversation

@varmaleena

Copy link
Copy Markdown

Summary

Adds contrib/python/finops-zero-trust-governor/ and companion skill plugin plugins/finops/:

  • Autonomous 3-Stage FinOps Pipeline: A SequentialAgent orchestrator coordinating telemetry_investigator, remediation_planner, and zero_trust_executor, wrapped with ResumabilityConfig(is_resumable=True).
  • Correlates BigQuery Billing & GenAI Spans: Correlates BigQuery Cloud Billing export tables (gcp_billing_export_v1) with Cloud Trace OpenTelemetry GenAI spans (gen_ai.usage.input_tokens, gen_ai.usage.output_tokens, adk.agent_name) to isolate runaway token burn and over-provisioned Cloud Run instances.
  • Mid-Task OAuth/IAM Revocation Guardrail (Issue [RECIPE PROPOSAL] revoked-mid-task: re-check revocation before each tool call #2769): Implements before_tool_callback (verify_token_not_revoked) validating token validity prior to state-mutating actions to abort executions if credentials were revoked mid-run.
  • 5-Gate Enterprise Governance Harness:
    1. Gate 1: Token & Retry Circuit Breaker (before_model_callback)
    2. Gate 2: Mid-Task OAuth Revocation Guardrail (Issue [RECIPE PROPOSAL] revoked-mid-task: re-check revocation before each tool call #2769)
    3. Gate 3: Crash-Resumable Idempotency Replay Guard (ResumabilityConfig)
    4. Gate 4: Concurrent Workload Mutex Lock
    5. Gate 5: Blast-Radius Human-in-the-Loop (HITL) Threshold Gate (blocks scaling to 0 without signoff)
  • Deployable Container App: Complete with Dockerfile, .dockerignore, agents-cli-manifest.yaml, FastAPI server (fast_api_app.py), and A2A agent card endpoints.
  • Offline CI Test Seam: Activated via INTEGRATION_TEST=TRUE to test runnability and governance gates without requiring live GCP credentials.

Validation Status

  • uv run validate contrib/python/finops-zero-trust-governor (PASS: manifest, structure, README, placement)
  • uv run validate plugins/finops (PASS: plugin manifest, structure, placement)
  • uv run python .github/scripts/check_env_vars.py contrib/python/finops-zero-trust-governor (PASS: all 15 variables verified)
  • uv run python .github/scripts/check_recipe_pyproject.py contrib/python/finops-zero-trust-governor (PASS)
  • uv run ruff check . & uv run ruff format --check . (PASS: 0 violations)
  • INTEGRATION_TEST=TRUE uv run pytest -v (PASS: 11/11 tests pass)
  • Google Individual CLA signed under leevarma2@gmail.com

@varmaleena
varmaleena requested a review from tommywagz as a code owner October 21, 2026 18:47

@github-actions github-actions 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.

Automated House Rules review — 2 finding(s).

@github-actions github-actions 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.

Automated Security review — 5 finding(s).

⚠️ This PR's diff was too large to review in full, so 1 file(s) were not looked at by this lane:

  • contrib/python/finops-zero-trust-governor/README.md

Splitting the PR up would get them reviewed.


Round 1 · 0 of this PR's 25 automated comments used · this round is capped at 20 across all reviewers.

"ZERO_TRUST_TOKENINFO_URL",
"https://oauth2.googleapis.com/tokeninfo",
)
req_url = f"{tokeninfo_url}?access_token={access_token}"

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.

[MAJOR] Passing access_token in query parameters exposes bearer credentials in request logs and proxy histories. Can we send it in an Authorization header instead?

@github-actions github-actions 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.

Automated Hygiene review — 5 finding(s).

⚠️ This PR's diff was too large to review in full, so 1 file(s) were not looked at by this lane:

  • contrib/python/finops-zero-trust-governor/README.md

Splitting the PR up would get them reviewed.


Round 1 · 0 of this PR's 25 automated comments used · this round is capped at 20 across all reviewers.

return VertexAiSessionService(
project=os.environ.get("GOOGLE_CLOUD_PROJECT"),
# Runtime-injected agent-engine region, not GOOGLE_CLOUD_LOCATION
# (which agent.py pins to "global").

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.

[MINOR] comment contradicts agent.py

@github-actions github-actions 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.

Automated Maintainability review — 3 finding(s).

⚠️ This PR's diff was too large to review in full, so 1 file(s) were not looked at by this lane:

  • contrib/python/finops-zero-trust-governor/README.md

Splitting the PR up would get them reviewed.


Round 1 · 0 of this PR's 25 automated comments used · this round is capped at 20 across all reviewers.

@github-actions github-actions 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.

Automated Correctness review — 4 finding(s).

⚠️ This PR's diff was too large to review in full, so 1 file(s) were not looked at by this lane:

  • contrib/python/finops-zero-trust-governor/README.md

Splitting the PR up would get them reviewed.


Round 1 · 0 of this PR's 25 automated comments used · this round is capped at 20 across all reviewers.

Comment thread plugins/finops/Makefile Outdated
@echo "Surfacing token-cost-anomaly-triage skill..."

test:
cd skills/token-cost-anomaly-triage && uv run pytest

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.

[MAJOR] no tests exist in this directory

@github-actions github-actions 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.

Automated Maintainability review — 1 finding(s).


Round 2 · 17 of this PR's 25 automated comments used · this round is capped at 8 across all reviewers · after this round only Security and Correctness run.

@github-actions github-actions 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.

Automated Correctness review — 2 finding(s).


Round 2 · 17 of this PR's 25 automated comments used · this round is capped at 8 across all reviewers · after this round only Security and Correctness run.

@github-actions github-actions 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.

Automated Hygiene review — 1 finding(s).


Round 2 · 17 of this PR's 25 automated comments used · this round is capped at 8 across all reviewers · after this round only Security and Correctness run.

@varmaleena varmaleena left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

.

@github-actions github-actions Bot added the status/not-ready-for-review Review requests held until checks pass and bot comments are resolved label Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Ready for review. All checks pass.

Re-requested review from tommywagz.

@github-actions github-actions Bot removed the status/not-ready-for-review Review requests held until checks pass and bot comments are resolved label Oct 28, 2026
@pierpaolo28

Copy link
Copy Markdown
Collaborator

Closing alongside #2823.

@pierpaolo28 pierpaolo28 closed this Nov 5, 2026
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.

3 participants