Skip to content
Projects

About

Privacy impact assessments for Quebec Law 25, PIPEDA and Ontario PHIPA, in English and French, from one offline HTML file.

Security & Privacy

How these counts are measured

Measured star growth

in 24h
Collecting history
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

PIAno logo

PIAno

Privacy impact assessments, one key at a time.
Quebec Law 25, PIPEDA and Ontario PHIPA from one offline HTML file, in English and French:
screening, a data inventory, the questions each law asks, risks, a decision, and an approval you can verify.

ci license no dependencies no network English and French

The PIAno Requirements tab under its black header: the Quebec Law 25 questions with their section references, Yes, Partly, No and N.A. answers, notes, and a button that turns a gap into a risk

Lire en français

Contents

Why

Since September 2023, an enterprise covered by Quebec's private sector act has to assess the privacy factors of every project that acquires, develops or overhauls a system holding personal information, and every communication of personal information outside Quebec. PIPEDA and Ontario's PHIPA do not require an assessment for every project, but an assessment is how an organization shows that a new use of personal information meets them.

What usually exists is a Word template: forty questions nobody can map back to a section, a risk table pasted from the last project, and an approval that is a name typed at the bottom. Nobody can say which version the privacy officer signed, or whether the answers changed after they did.

PIAno makes the assessment the record. You work through it in one HTML file, in English or French, and what comes out is a report in either language, a risk register, a data inventory, and a hash-chained history of every approved version that someone else can check.

What it does

Screening first. Each framework starts with two or three questions that decide whether it applies. Quebec Law 25 for new systems applies only when all three of its questions are Yes. The others apply when any one is. A framework that does not apply drops out of the requirements, and the report says why.

The questions each law asks, with the section. Fifty-two questions across four frameworks, each with its reference (s. 3.3, Sch. 1, 4.7, O. Reg. 329/04, s. 6(3)), a plain explanation, and the risk to record when the answer is No. Answer Yes, Partly, No or N.A., add a note, and turn any gap into a risk with one click.

A data inventory that does the proportionality work. List each element of personal information with its category, whether it is sensitive, its purpose, source, retention, location, who has access and who it is shared with. Record the number of people concerned, the medium and where the information is kept: the factors the depth of a Law 25 assessment has to match.

Communications outside Quebec, one destination at a time. For each recipient record the purposes, the information sent, its sensitivity, the protection measures including contractual ones, the legal framework at the destination, whether a written agreement is in place, and the conclusion: adequate or not. These are the four factors and the two conditions of s. 17.

Risks before and after measures. Rate likelihood and impact from 1 to 3, record the measures, an owner, a due date and the rating after measures. Two 3 by 3 matrices show where the risks sit before and after.

A conclusion and an approval. Write the summary, choose Proceed, Proceed with conditions or Do not proceed, set the conditions and the next review date, and name the project owner and the privacy officer. A readiness list shows what is still open (unanswered questions, gaps without a risk or a note, high risks without an owner, destinations without a conclusion) before you approve.

Versions you can verify. Approving hashes the whole assessment into a new version that is chained to the one before it. Change anything afterwards and PIAno shows Changed since version N until a new version is approved. The Verify page, or node verify.mjs, recomputes every hash from the file alone.

English and French, separately. The interface follows the browser language until you choose, and the report language is chosen on its own, so a team that works in English can hand the Commission d'accès à l'information a French report. The questions, the help, the references and the report are written in both languages.

Quick start

  1. Get piano.html from the root of this repository. Each tagged release also attaches it with verify.mjs and a SHA256SUMS file.
  2. Open it in a browser. There is nothing to install and no server.
  3. Name the project, keep the frameworks you need ticked, and press Create assessment.

Assessments are saved in the browser as you go. Download a copy from the home page or the Report tab to keep it or move it to another machine.

A tour

The interface takes its look from a piano. The header is black lacquer in both themes, and the open tab stands out in ivory. Pressed answers invert like keys, with a small dot for Yes, Partly or No. Framework packs are drawn as keys, and the risk matrices are shaded from ivory to ebony. There are two themes, ivory and ebony, and apart from those dots the page is black and white.

Home
Home: the frameworks to include, framework import, and the assessments saved on this device
Project
Project: the description, purposes, owner, privacy officer and the frameworks in this assessment
Screening
Screening: a few questions per framework decide whether it applies
Data
Data: proportionality factors and the inventory of personal information
Requirements
Requirements: every question in scope, with its section, help, answer, note and risk
Transfers
Transfers: each destination outside Quebec with the four factors and a conclusion
Risks
Risks: matrices before and after measures, cells shaped like keys, and each risk with its owner and due date
Conclusion
Conclusion: decision, conditions, approvals, readiness and the approved versions
Report
Report: the preview, the report language, the exports and the hashes
French interface
The same assessment with the interface in French
Verify
Verify: every check passes, including a hash recorded elsewhere
Ivory theme
The ivory theme, with the risk matrices shaded in grays. The theme follows the operating system until you choose

Phone width
Phone width: every view works without sideways scrolling

The screenshots come from a scripted run in headless Chromium with fictional names and data (PIANO_SHOTS=docs/screenshots node test/e2e.mjs).

How an assessment runs

flowchart LR
  A["Project<br/>purposes, people"] --> B["Screening<br/>which laws apply"]
  B --> C["Data<br/>inventory and<br/>proportionality"]
  C --> D["Requirements<br/>and transfers"]
  D -->|gaps| E["Risks<br/>before and after"]
  E --> F["Conclusion<br/>decision and approval"]
  F -->|version n| G["Report, export<br/>and verify"]
  G -.->|a change| F
  1. Project. Describe the project and its purposes, name the owner and the privacy officer, and add or remove frameworks.
  2. Screening. Answer the screening questions. Each framework shows Applies, Does not apply or Not determined yet.
  3. Data. Record the proportionality factors and list the personal information the project handles.
  4. Requirements. Answer the questions of every framework that applies. A No or a Partly becomes a risk with one click, or carries a note.
  5. Transfers. For Law 25, assess each destination outside Quebec.
  6. Risks. Rate each risk before and after measures and give it an owner.
  7. Conclusion. Decide, set the conditions and the next review, and approve. The new version is chained to the last.
  8. Report. Preview it in English or French, print or save it as a PDF, and export the bundle.

Frameworks

Framework Law Obligation Applies when Questions
Quebec Law 25: new or changed systems CQLR c P-39.1, s. 3.3 and related Required All 3 screening answers are Yes 21
Quebec Law 25: communications outside Quebec CQLR c P-39.1, s. 17 Required Either screening answer is Yes 8
PIPEDA: federal private sector SC 2000, c 5, s. 5(3) and Sch. 1 Recommended Either screening answer is Yes 12
Ontario PHIPA: personal health information SO 2004, c 3, Sched A and O. Reg. 329/04 Recommended Either screening answer is Yes 11

A framework stays in scope until screening rules it out. An unanswered or Not sure answer leaves it Not determined yet, and its questions stay in the requirements, so an unclear case is assessed rather than skipped. The packs paraphrase each law in plain words and cite the sections. They do not reproduce the text of the Acts, they are not legal advice, and each pack says to confirm the current rules with counsel. What each pack covers is in docs/FRAMEWORKS.md.

What you get out

File What it is
report.html The report, print-ready, in the language you chose, with every value you typed escaped
report.md The same report as Markdown
risks.csv One row per risk: ratings before and after, measures, owner, due date, status, source requirement
data-inventory.csv One row per element of personal information
record.json The approval record of the current version and its SHA-256
assessment.json The whole assessment, to reopen, move or verify
VERIFY.txt How to check the bundle

The Report tab downloads each file, or all of them as one .zip, and prints the report or saves it as a PDF. A record exists only for an approved version. CSV cells that a spreadsheet would read as a formula are prefixed so they stay text.

Approvals and the record

Approving creates a version: its number, the time, the decision, the privacy officer's name, a SHA-256 of the full content of the assessment, the hash of the version before it, and its own hash.

flowchart TD
  G["start of the chain<br/>sha256 of piano/1: and the assessment id"] --> V1["version 1<br/>decision, approver, content hash"]
  V1 --> V2["version 2"] --> VN["version n: the head"]
  VN --> R["approval record<br/>frameworks, applicability, counts"]
  R --> H["record SHA-256<br/>copy it to a ticket or your register"]

Verification recomputes, from the file alone:

  • every framework pack hash, so an edited question is found;
  • the version chain, so an edited, removed or reordered version is found;
  • the content hash of the last version, so anything changed after approval is found.

The content hash covers everything you entered and the framework packs. It leaves out the version history itself, the last saved time, and the report language, so switching the report to French does not reopen an approval.

What the approval does not do. This is tamper evidence, not tamper proofing. Someone who can rewrite the file can also rewrite every hash in it. The chain is worth something when the version hash is kept somewhere else, such as the ticket, the register or the minutes where the decision was recorded, and checked against it later. Timestamps come from the device clock, and the names are what was typed. The details are in docs/RECORD.md.

Verifying

In the page, open Verify, paste the hash you recorded elsewhere if you have one, and choose assessment.json or record.json. Nothing is uploaded.

From a terminal, with Node 20 or later and piano.html next to the script:

node verify.mjs assessment.json
node verify.mjs --expect=<hash recorded elsewhere> assessment.json
node verify.mjs record.json

The script loads its logic from piano.html, so it checks with the same code the page runs. It exits 0 when every check passes, 1 when one fails, and 2 on a usage error. A recorded hash that matches an older version, not the latest, fails and says which version it matches.

Your own frameworks

A framework pack is one JSON file: a title, a summary and a disclaimer in both languages, screening questions with a rule (all or any), and sections of questions with a reference, help and a risk for each. Choose it on the home page under Import a framework file. It is validated first, every problem is listed with its path, unknown keys are dropped, and text with control or direction characters is refused. Imported packs are kept on this device and marked Custom pack, and each assessment carries a copy of every pack it uses, with its hash. The format is in docs/FRAMEWORKS.md.

Privacy and security

  • No network. The page carries a content security policy that blocks every request, and the build test fails if the file contains a URL or any call that could make one.
  • Your data stays in your browser. Assessments live in the browser's local storage until you delete them. PIAno says so if the browser refuses to save, and warns you if the same assessment is changed in a second tab.
  • Typed text is never treated as markup. The interface writes text nodes, the report escapes every value, and the report preview runs in a frame that cannot run scripts.
  • Imported files are rebuilt, not trusted. Assessment and framework files are copied field by field with size and nesting limits, and keys such as __proto__ are refused.
  • What you put in is yours to protect. An assessment describes personal information. It should not contain any. Use the data inventory for the kinds of information, not for real records.

How to report a vulnerability is in SECURITY.md.

Accessibility and browsers

Every control has an accessible name in both languages, the tabs work with the arrow keys, focus moves to the new view after navigation, the page language changes with the interface so screen readers switch voice, the interface follows the system's reduced motion setting, and the light and dark themes keep text contrast above 4.5 to 1. Phone and tablet widths are tested for sideways scrolling.

PIAno is tested in Chromium. It uses nothing newer than the dialog element and replaceChildren, so current Firefox and Safari should work, but they have not been tried.

Limits

  • One person at one screen. There is no live sharing between devices.
  • Saved assessments live in one browser's storage. Some browsers give a local file separate storage or none, so download what matters.
  • The clock and the timestamps are the device's, and approvals carry the names that were typed. PIAno does not sign anything.
  • The packs ask the questions. PIAno records the answers. It does not decide whether the project complies.
  • Not legal advice. The packs paraphrase the law as it stood in November 2026.

Questions

Does it need the internet? No. Open the file on a laptop with the network off and everything works.

Where is my data? In the browser's local storage on the machine you used, and in any file you download. Nothing is sent anywhere.

Which framework do I need? Screening decides. An enterprise in Quebec launching a new system needs the first Law 25 pack, and the second as soon as a provider or a recipient is outside Quebec, which includes most cloud services. Keep every pack in the assessment and let screening drop the ones that do not apply: the report then shows they were considered.

Can I change an assessment after approving it? Yes. It shows as Changed since version N, the report says so, and approving again creates version N+1 chained to the last. Earlier versions stay in the history.

How do I move an assessment to another machine? Download it (the arrow on the home page, or Assessment (.json) on the Report tab), then Import assessment on the other machine.

Can I add BC PIPA, Alberta PIPA or the Quebec public sector act? Not in this release. Write a pack: the format is documented, and an imported pack works like a built-in one.

Development

node build.mjs            # builds piano.html from src/ and frameworks/
node build.mjs --check    # fails if piano.html is out of date
node --test "test/*.test.mjs"
node test/e2e.mjs         # headless Chromium drives the whole flow in both languages

There are no dependencies. The unit and build tests need Node 20 or later. The browser run needs playwright-core and a Chromium it can launch; set PIANO_PLAYWRIGHT to its folder if it is not installed where Node can find it.

piano.html             the app, built and committed
verify.mjs             command-line verifier
build.mjs              inlines the sources into piano.html
src/core.js            logic with no DOM: screening, hashing, approvals, reports, import checks
src/ui/                the interface, one file per view, and the English and French strings
src/style.css          styles
frameworks/            the four framework packs
test/                  unit, framework, build and browser tests
docs/                  design notes, the framework format, the record format, screenshots

The design decisions are in docs/DESIGN.md.

Contributing, security and licence

Contributions are welcome, including French corrections and new framework packs: see CONTRIBUTING.md. Report vulnerabilities privately as described in SECURITY.md. PIAno is released under the MIT licence: see LICENSE.

Explore related projects

Loading…