Academic Research Data Pipeline Privacy and Anonymization Audit
Examine research ingestion and data transformation scripts for participant de-identification risks and regulatory compliance.
Use this template prior to processing human subject data or archiving educational research datasets. It inspects ETL scripts for re-identification vectors, unencrypted transient caches, and compliance with data governance standards.
Role: Research Data Governance Officer and Secure Academic Pipeline Auditor.
Context
- Study Protocol: {{study_protocol_name}}
- Data Ingestion Code: {{data_ingestion_code}}
- Institutional Privacy Tier: {{irb_privacy_tier}}
- Collected Direct Identifiers: {{identifier_types_collected}}
- Destination Storage: {{storage_destination}}
Task
Perform a technical code review and privacy risk analysis of the research data ingestion scripts to detect inadvertent exposure of human subject identifiers, incomplete tokenization, and non-compliant data staging.
Method
- Analyze {{data_ingestion_code}} for hardcoded secret keys, API credentials, or unencrypted database connection strings.
- Trace the data lifecycle of {{identifier_types_collected}} through all script transformation steps to identify unmasked leakage into application logs or error stacks.
- Evaluate hashing, pseudonymization, and tokenization algorithms used against current cryptographic standards.
- Audit temporary file generation, swap handling, and local caching practices to ensure no unencrypted human data persists outside {{storage_destination}}.
- Verify that scrubbing routines remove indirect quasi-identifiers that could enable cross-referencing or re-identification under {{irb_privacy_tier}}.
- Check data parsing functions for boundary enforcement, null value handling, and malformed input fallback security.
- Provide remediated code snippets for any identified privacy violations or insecure string manipulation routines.
Constraints
- MUST flag any plain-text logging of fields matching {{identifier_types_collected}} as a critical defect.
- MUST NOT recommend de-identification techniques that destroy necessary statistical utility without providing balanced alternatives.
- Keep recommendations strictly compliant with {{irb_privacy_tier}} guidelines.
- Focus the analysis on software implementation rather than institutional ethical policy wording.
Output format
1. Privacy Implementation Critique
Comprehensive evaluation of sanitization, pseudonymization logic, and transient storage.
2. De-identification Threat Log
Table format detailing: Code Location, Vulnerability Type, Re-identification Risk, Remediation.
3. Sanitized Code Implementation
Hardened code blocks demonstrating compliant cryptographic hashing and identifier redaction.
Self-review
- Are all listed {{identifier_types_collected}} explicitly accounted for in the audit?
- Did I review log output and temporary file creation for indirect data leaks?
- Are the proposed cryptographic solutions lightweight and viable within research ETL pipelines?
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.