Skip to content

Fix bedrock guardrail metric crash and strengthen CI secret scanning - #17

Merged
manas-fortifyroot merged 1 commit into
fr-v0.52.6.xfrom
fix-bedrock-guardrail-metrics-and-strengthen-secret-scan
Apr 3, 2026
Merged

Fix bedrock guardrail metric crash and strengthen CI secret scanning#17
manas-fortifyroot merged 1 commit into
fr-v0.52.6.xfrom
fix-bedrock-guardrail-metrics-and-strengthen-secret-scan

Conversation

@manas-fortifyroot

Copy link
Copy Markdown

Summary

  • Fix AttributeError: 'NoneType' object has no attribute 'add' in bedrock/guardrail.py when metrics are disabled — adds None-guard consistent with existing pattern at __init__.py:195,197
  • Expand CI secret scan regex to detect Google AI API keys (AIzaSy*), AWS access key IDs (AKIA*), GCP service account JSON, and GitHub PATs

Test plan

  • Bedrock streaming tests pass with metrics disabled
  • CI secret scan job runs clean on current repo

…ning

Add None-guard around guardrail_activation metric in bedrock guardrail
handling to prevent AttributeError when metrics are disabled. Expand
CI secret scanning to detect Google AI, AWS, GCP, and GitHub credential
patterns.
@manas-fortifyroot
manas-fortifyroot merged commit 515daff into fr-v0.52.6.x Apr 3, 2026
9 checks passed
@manas-fortifyroot
manas-fortifyroot deleted the fix-bedrock-guardrail-metrics-and-strengthen-secret-scan branch April 3, 2026 04:52
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