Security and LGPD
Legal principles, verifiable controls.
Customer, employee, contract and financial data flow through AI every day — much of it personal or sensitive under LGPD. AI Shield turns each principle into a decision enforced in the flow — with evidence of effectiveness, not just terms of use.
01 — Mandatory premises
Seven premises no feature bypasses.
Deny by default
In the absence of a clear rule, the request does not go to the provider or the data source.
Minimization before sending
Fields removed, identifiers replaced or aggregated whenever the purpose does not require identification.
Authorization before retrieval
Semantic search, SQL, files and connectors receive tenant, user, attribute and purpose filters before returning content.
Defense in depth
The decision does not rely on one classifier or a single LLM. Deterministic rules, DLP and schema validation complement each other.
Plane separation
Policy configuration never mixes with prompt, response, file and media traffic.
Evidence without widening risk
Logs prefer metadata, hashes and references. Raw content is only retained when policy authorizes it — always encrypted.
No vendor by declaration
Region, retention, training use, sub-processors and contract are recorded and approved before approval.
The AI does not receive data the user is not authorized to use — and the user does not receive content beyond their authorization.
02 — LGPD mapping
From law to product requirement.
Each provision of Law No. 13,709/2018 considered in the design, its implication and the corresponding technical response.
| Reference | Implication | Product response |
|---|---|---|
| Articles 5 and 11 | Health and biometric data require specific processing | Sensitive classification, default blocking, dedicated policies and legal basis justification |
| Article 6 | Purpose, adequacy, necessity, security, prevention and accountability | Mandatory purpose, minimization, DLP, decision records and evidence of effectiveness |
| Articles 18 and 19 | Rights of confirmation, access, correction, anonymization, blocking and erasure | Search by data subject, export, handling flow, blocking and retention execution |
| Article 20 | Review and explanation of automated decisions affecting interests | Explainable decisions, contestation channel and human review where applicable |
| Article 33 | International transfer requires valid grounds and safeguards | Catalog of region, sub-processors, contract, retention and permission per provider |
| Articles 37 and 38 | Records of processing and possible impact assessment | RoPA, technical trail and exportable data for DPIA |
| Articles 46 to 50 | Security by design, governance and incident response | Privacy by design, encryption, least privilege, monitoring, incidents and continuous testing |
03 — Classification
Five classes. One default treatment for each.
| Class | Criterion | Examples | Default treatment |
|---|---|---|---|
| Public | Authorized disclosure | Published institutional material | Use in approved models per policy |
| Internal | Common corporate use | Internal procedures and announcements | Corporate identity and approved models only |
| Confidential | Commercial or personal impact | Contracts, code, individual salary | Explicit access, minimization and reinforced logging |
| Restricted sensitive | High harm or sensitive personal data | Diagnosis, ICD, biometrics, medical record | Deny by default, strict purpose and allowed provider |
| Critical secret | Systemic risk | Keys, credentials, tokens, trade secrets | Never send to external models and block tools |
04 — Threat model
Twelve threats. One main control for each.
Aligned with the OWASP Top 10 for LLM Applications and the NIST AI RMF, with dedicated red teaming for prompt injection, exfiltration, RAG, tools and DLP evasion.
User tries to change instructions or obtain forbidden data
Policy external to the model, instruction separation and detection
Document, website or e-mail contains malicious instruction
Treat content as data, sanitize, limit tools and confirm actions
Model reproduces data outside the scope
Outbound DLP, provenance validation and blocking before display
User accesses a colleague’s or another department’s data
ACL, ABAC, relationships and per-object authorization tests
Cache, index, queue or storage mixes companies
Namespaces, keys, database policies and isolation tests
Code contains key, token or credential
Secret scanner, blocking, rotation and user guidance
Agent sends e-mail, changes a system or runs code
Scopes, allowlist, sandbox, limits and human approval
Upload contains malware, macro, file bomb or link
Antivirus, sandbox, real type, limits and quarantine
False or hostile content enters the RAG
Provenance, approval, integrity, review and alerting
Prompt or response appears in APM, support or error
Redaction at source, log schemas and automated tests
Version starts retaining or processing data differently
Version pinning, contract monitoring and re-approval
Usage generates excessive expenses
Quotas, rate limits, budget, alerts and circuit breaker
05 — Technical controls
The minimum we demand of ourselves.
- 01Least privilege principle and temporary privileged access
- 02Encryption with key rotation and optional dedicated key per customer
- 03Secure SDLC: dependency analysis, SAST, DAST, review and artifact signing
- 04Supply chain protection and component inventory (SBOM)
- 05Penetration testing before production and after high-risk changes
- 06Dedicated red team for prompt injection, exfiltration, RAG, tools and DLP evasion
- 07Encrypted backups with periodic restore testing and retention consistent with deletion
- 08Separate environments and prohibition of real data in development
06 — Failure policy
Fail-closed. When in doubt, data does not leave.
Failure of the classifier, policy engine, file inspection or output verification blocks the flow whenever personal data or an unknown class is possible.
Low-risk tasks only get an alternative route if the policy has explicitly approved degradation and no sensitive content is present. Engine unavailability raises an immediate alert.
Persistent state machine
- Received
- Classified
- Authorized for retrieval
- Context prepared
- Authorized for model
- Sent
- Under inspection
- Authorized for delivery
- Delivered
- Archived
Alternative states
- Denied
- Awaiting approval
- Quarantined
- Cancelled
- Expired
- Failed closed
07 — Audit event
What every event records.
- 01Identity
- Tenant, user, session, groups, role, device and authentication
- 02Request
- Capability, purpose, classification, attachments, sources and tools
- 03Decision
- Outcome, reason, policy version, filters, transformations and approvers
- 04Retrieval
- Source, query, filters, fragment identifiers and denials
- 05Model
- Vendor, model, version, region, parameters, usage, cost and latency
- 06Output
- Classification, findings, transformation, blocking and artifacts
- 07Integrity
- Timestamp, previous hash, event hash and signature where applicable
08 — Incident response
Six steps, without widening access.
Detect or receive the incident and preserve evidence
Classify data, data subjects, reach, origin, duration and failed controls
Contain compromised credentials, routes, models, connectors or policies
Assess relevant risk or harm and engage DPO, legal, security and controller
Prepare communications and records under current regulation
Remediate, verify effectiveness, conclude root cause and update policies, tests and DPIA
09 — References
Frameworks that guide the design.
LGPD
Law No. 13,709/2018 — consolidated text and ANPD regulation.
ISO/IEC 27001
Alignment with information security controls.
NIST AI RMF
Artificial intelligence risk management.
NIST Privacy Framework
Outcome-oriented privacy governance.
OWASP Top 10 for LLM
Specialized threats and testing for LLM applications.
ANPD
Documents, publications and guidance from the Brazilian authority.
Get the LGPD mapping applied to your scenario.
Our team prepares an initial reading of the processing operations involved in your company’s use of AI.