Skip to content

feat(examples): add fastapi bim cde guardrail for retail store roll-outs - #24

Open
jmcaamanog wants to merge 1 commit into
InditexTech:mainfrom
jmcaamanog:feat/fastapi-bim-guardrail
Open

jmcaamanog wants to merge 1 commit into
InditexTech:mainfrom
jmcaamanog:feat/fastapi-bim-guardrail

Conversation

@jmcaamanog

Copy link
Copy Markdown

Summary of Changes

Adds a production-grade integration example in examples/fastapi-bim-guardrail/ demonstrating CerbIA as an asynchronous security gate middleware for an AI Assistant operating in an International Retail BIM Common Data Environment (CDE).

  • BIM WBS Matrix Modeling: Implements the international retail store work breakdown structure (bim_matrix.py) segregating Management / Contracting Packages (000GRL to 900MET) from BIM Technical Disciplines (ARQ, FAC, ENV, CLI, HUM, PCI, ELE, ALU, RED, ATH, CTV, VIS, EST).
  • Bidirectional FastAPI Middleware:
    • Input Gate: Scans incoming contractor queries against prompt injections (e.g. attempting to override structural clearance reviews or bypass BEP rules), unredacted PII (field incident reports with worker IDs/phones), secrets, and malicious submittal links.
    • Output Gate with Canary Leak Detection: Injects dynamic canary tokens into system prompts protecting confidential commercial tender rates and budget margins (PEM), intercepting model leakage before delivery.
  • Declarative Gate Config: Standard CerbIA YAML configuration (config.cerbia.yaml).
  • Automated Validation Runner: Includes test_scenarios.py verifying 5 end-to-end real-world scenarios.
  • Documentation: Detailed bilingual architecture guide and threat model specification (README.md).

Validation

  • All 5 BIM coordination scenarios validated (python test_scenarios.py).
  • Fully compliant with REUSE 3.3 specification (reuse lint passed with 0 errors).
  • Codebase formatted and linted with Ruff (ruff check & ruff format).
  • Commit signed with DCO (Signed-off-by: jmcaamanog <jose.caamano@live.com>).

@jmcaamanog
jmcaamanog requested a review from a team as a code owner October 9, 2026 07:43
@signoff-validator

signoff-validator Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Contribution License Agreement - Valid 🟢

All commits contain valid signoff. As a confirmation, remember that you are agreeing to our Contribution License Agreement.

@jmcaamanog
jmcaamanog force-pushed the feat/fastapi-bim-guardrail branch from 0f6e717 to 0e0ad7e Compare October 9, 2026 07:46
- Model the international retail store BIM WBS matrix (packages and disciplines)

- Integrate CerbIA input and output security gates into a FastAPI service

- Add canary token protection against confidential tender budget exfiltration

- Provide automated runner with 5 real-world technical coordination scenarios

Signed-off-by: jmcaamanog <jose.caamano@live.com>
@jmcaamanog
jmcaamanog force-pushed the feat/fastapi-bim-guardrail branch from 0e0ad7e to 9b5de06 Compare October 9, 2026 07:54

This branch has not been deployed

No deployments
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