Skip to content

Privacy & FERPA Model

Dana follows one guiding rule: zero friction on public data; serious, intentional friction on sensitive data.

If a schema declares no sensitivity tags, Dana imposes zero privacy syntax. The moment a column or schema carries a sensitivity tag ([pii], [ferpa], [financial], [health], [secret], or custom tags), Dana enforces strict static information flow and audited declassification.

Attach tags to individual columns—or to an entire schema when the presence of a row itself is sensitive:

schema Student
id: Int [pii]
email: Text [pii]
gpa: Decimal? [ferpa]
program: Text
enrolled_year: Int
active?: Bool
end
tag counseling
## Every row indicates a counseling visit, so row presence itself is [counseling].
schema CounselingVisit [counseling]
student_id: Int [pii]
visit_date: Date
duration_min: Int
end

Every Table tracks both:

  • col_tags: sensitivity of each column’s values.
  • row_tags: sensitivity of row presence, cardinality, grouping, and sort order.

Filtering on a sensitive column (where(.gpa < 2.0)) elevates row_tags to [ferpa]. Even if .gpa is later dropped via select(.program), counting rows still carries [ferpa] until explicitly cleared—preventing filter-then-count side-channel leaks.

3. Audited Declassifiers (No Free declassify)

Section titled “3. Audited Declassifiers (No Free declassify)”

There is no generic declassify() escape hatch that an agent or helper can call to silence compiler errors. Tags clear only through audited primitives or an explicit Declassify capability in main:

  1. redact(.col) — replaces values with a constant public marker and clears col_tags(.col).
  2. pseudonymize(.col, key: secret) — computes a keyed HMAC-SHA256 token (ps_<hex>) using an explicit Secret capability (never a hardcoded string literal), preserving joinability across tables.
  3. bucket(.col, cuts: [...], labels: [...]) — maps numeric/date columns into compile-time-constant finite buckets so raw text can never escape.
  4. suppress_small_groups(min: k, distinct_by: .id) — drops (or masks with complementary suppression) groups with fewer than k distinct entities (k >= 5 by default), clearing row_tags, bucketed keys, and blending aggregates (count, count_distinct, sum, mean, stddev, variance). Single-record extremes (min, max, median, first, last) remain tagged so an individual’s value cannot slip through.

Generate realistic, policy-compliant synthetic data from any schema so humans and AI agents can build and test pipelines without touching production records.