Code review
AuraScore 79/100

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.

Template

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

  1. Analyze {{data_ingestion_code}} for hardcoded secret keys, API credentials, or unencrypted database connection strings.
  2. Trace the data lifecycle of {{identifier_types_collected}} through all script transformation steps to identify unmasked leakage into application logs or error stacks.
  3. Evaluate hashing, pseudonymization, and tokenization algorithms used against current cryptographic standards.
  4. Audit temporary file generation, swap handling, and local caching practices to ensure no unencrypted human data persists outside {{storage_destination}}.
  5. Verify that scrubbing routines remove indirect quasi-identifiers that could enable cross-referencing or re-identification under {{irb_privacy_tier}}.
  6. Check data parsing functions for boundary enforcement, null value handling, and malformed input fallback security.
  7. 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?
AuraScore breakdown
79/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering8/12 · Adequate

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-code-review
education-research
research-data
privacy-audit
data-pipeline