Skip to content

Feature/controller processor classification#11

Merged
KevinRabun merged 2 commits intomainfrom
feature/controller-processor-classification
Feb 10, 2026
Merged

Feature/controller processor classification#11
KevinRabun merged 2 commits intomainfrom
feature/controller-processor-classification

Conversation

@KevinRabun
Copy link
Copy Markdown
Owner

No description provided.

Add new MCP tools to help developers and technical PMs determine whether
their service acts as a GDPR controller, processor, joint controller, or
has a mixed role.

New tools:
- assess_controller_processor_role: Analyze service description for role indicators
- get_role_obligations: Get GDPR obligations specific to each role
- analyze_code_for_role_indicators: Detect role patterns in source code
- generate_dpa_checklist: Create Art. 28 DPA compliance checklist
- get_role_scenarios: Common scenarios with role determinations

Features:
- Text analysis of service descriptions against GDPR definitions
- Code pattern detection for controller vs processor indicators
- Detailed GDPR obligations per role with Azure implementation guidance
- DPA (Data Processing Agreement) checklist per Article 28
- Common scenarios from EDPB guidance

Also enhanced:
- analyzer.py: Added role indicator hints to application code analysis
- gdpr_bundled.json: Added role_classification section with decision factors

Includes 49 comprehensive tests covering:
- Helper function unit tests
- Role assessment integration tests
- Edge cases and input validation
- Data structure validation

References: GDPR Article 4(7), 4(8), 26, 28; EDPB Guidelines 07/2020
This commit adds comprehensive adversarial tests for the new role
classification tools, covering:

1. Injection attack tests (Section 14):
   - XSS, SQL injection, prompt injection, shell commands
   - Path traversal, null bytes, unicode RTL attacks
   - Oversized inputs, JSON break attempts, role confusion

2. GDPR accuracy validation (Section 15):
   - Controller assessment references Art. 4(7)
   - Processor assessment references Art. 4(8)
   - Joint controller references Art. 26
   - Processor obligations reference Art. 28
   - Controller obligations reference key GDPR articles

3. Role indicator completeness (Section 16):
   - Purpose/means determination keywords for controllers
   - Instruction-following keywords for processors
   - Joint/shared keywords for joint controllers
   - Minimum indicator count per role

4. Ambiguous role classification (Section 17):
   - Pure controller/processor scenarios
   - Cloud provider, SaaS, dual role cases
   - Joint controller, subtle role indicators
   - Infrastructure-only edge cases

5. DPA checklist completeness (Section 18):
   - All Art. 28(3) required elements covered

6. Code pattern detection (Section 19):
   - Controller patterns: consent, privacy policy, retention
   - Processor patterns: instructions, subprocessor management

7. Industry scenario accuracy (Section 20):
   - Healthcare, finance, technology industries
   - Controller and processor examples per industry

Total: 537 judge tests, all passing
@KevinRabun KevinRabun merged commit 7489f00 into main Feb 10, 2026
9 checks passed
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