WEEK 7: Implement Policy Interceptor and Agent Profiles for FinBot Security Framework#543
Open
Jean-Regis-M wants to merge 2 commits into
Open
Conversation
- Add finbot/aegis/telemetry/schema.py with AuditEvent models - Add AEGIS_ENABLED and AEGIS_TELEMETRY_ENABLED settings in config.py - Extend events.py to accept 'aegis.*' event namespaces (backward compatible) - Add unit tests for telemetry schema - Update conftest.py to include aegis package Week 1 deliverable (GSoC 2026 - OWASP FinBot AEGIS)
- Implement PolicyInterceptor, Capsule, Memory, and agent profiles - Add unit tests for policy interceptor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This week's work focused on implementing the core security infrastructure for the FinBot project by developing the Policy Interceptor and predefined Agent Profiles as outlined in the GSoC proposal. The implementation addresses OWASP ASI02 (Tool Misuse), ASI03 (Excessive Agency), and ASI07 (Prompt Injection) through least-privilege access controls and intent-based security mechanisms.
Changes Made
Core Implementation (
finbot/aegis/policy/)__init__.py- Package initialization exporting all policy componentsagent_profiles.py- Defines six least-agency agent profiles:interceptor.py- ImplementsMCPPolicyInterceptorwith:Week 8 Stubs (Forward Compatibility)
capsule.py- Stub forIntentCapsulewith HMAC signing/validation interfacememory.py- Stub forMemoryNamespaceManagerwith provenance tracking interfaceComprehensive Test Suite
tests/unit/aegis/test_policy_interceptor.py- Full test coverage including:Key Features
Testing Status
✅ All unit tests passing
✅ Edge cases covered (invalid profiles, exceeded limits, unauthorized tool access)
✅ Metrics collection verified
✅ Agent profile combinations tested
Next Steps (Week 8)
In Week 8, the stub files will be replaced with full implementations featuring:
Acknowledgments
Special thanks to my mentors @mekaizen and @steadhac for their continuous guidance, insightful feedback, and unwavering support throughout this GSoC journey. Their expertise has been instrumental in shaping this security-focused implementation.