Beta. consent-kit is at 0.x: expect breaking changes between releases, and treat everything it generates as a draft. Report a problem or share feedback.
FAQ and compliance notes
What consent-kit establishes, what it does not, and answers to the questions that come up first. Read the first two sections before you describe consent-kit to anyone who has to rely on it.
What consent-kit establishes
Section titled “What consent-kit establishes”These are mechanical properties. Each holds only under the condition stated with it.
| Statement | Holds when |
|---|---|
| The banner, the documents, the policy and the guard say the same thing. | They were all generated from the same registry, and build --check and docs --check pass. |
| A page cannot load from, or send to, an origin the registry does not declare. | The page is served with the generated Content-Security-Policy as a response header, and the policy has not been loosened for that directive. |
| A declared script or iframe does not load before the visitor accepted its purpose. | It is on the page through consentScriptTag or consentEmbed, not hard-coded. |
| First-party code does not write an undeclared or unconsented cookie or storage key. | It uses the storage facade, which the ESLint rule checks. |
| A change to what visitors were told cannot be released unnoticed. | Releases go through consent-kit check, and the lock file is not edited by hand. |
| Visitors are asked again when a consent purpose is added or changes materially, in the sense of consent-kit’s own table. | The site is deployed with the build of that release. |
| On the pages and interactions it ran, the site did nothing undeclared and nothing consent-bound before consent. | The audit passed, on that day, in Chromium, against a build whose guard was in record mode. |
| Each banner decision sent one well-formed receipt naming the released policy and its purpose versions. | The audit’s receipt check passed. Whether it was stored is the endpoint’s matter. |
| A sentence in a generated document was approved by a named reviewer in exactly this wording. | A review is on record for that phrase and language, and its hash matches. As shipped, none is. |
What consent-kit does not establish
Section titled “What consent-kit does not establish”- That your registry is complete. It knows what you declared. The audit finds undeclared things only on the pages and interactions it exercises.
- That your registry is true. A wrong country, a wrong retention period or a purpose that does not describe what really happens passes every check.
- That your lawful bases hold. consent-kit enforces the consequences of the basis you chose. It does not judge the choice. Declaring something
legitimate_interestmakes it run without asking; whether that is lawful is yours to defend. - That your consent is valid. Valid consent has to be freely given, specific, informed and unambiguous. The tool can show that the banner offered a choice of equal weight, what the visitor was shown, and what they chose. It cannot show the rest.
- That your documents are sufficient. They are drafts assembled from sentences no lawyer has reviewed, filled with facts from your registry.
- Anything about your servers. Logs, databases, backups, server-side analytics and what your processors do with data are outside its view.
- Who a visitor is. A consent receipt records what an endpoint received about a browser’s consent id.
- That a change is or is not “material” in law. The classification table is a conservative engineering rule.
The complete list of limits, part by part, is in the threat model and known limits.
General
Section titled “General”Is consent-kit a consent management platform?
Section titled “Is consent-kit a consent management platform?”No. It has no hosted service, no dashboard and no vendor database. It is a set of packages that generate configuration for CookieConsent v3 (vanilla-cookieconsent 3.3), a Content-Security-Policy, a runtime guard, a storage module and documents from one file in your repository. The banner itself is CookieConsent.
What does “strict GDPR stance” mean in practice?
Section titled “What does “strict GDPR stance” mean in practice?”The defaults lean towards asking and blocking, and loosening always leaves a trace:
- Consent is opt-in. A consent purpose that defaults to granted is rejected.
- “Accept all” and “Reject all” have equal weight in the generated banner.
- Global Privacy Control is always respected.
- The policy starts from
default-src 'none'. - A rewording of a consent text is material unless it provably changes no meaning.
- Unknown is strict: a field the diff does not recognise is material.
- Silence is not accepted where a statement is owed: no data protection officer, no automated decision-making, no receipts.
- Every exception (a CSP source, a receipts opt-out, a preset override) needs a reason or is listed on every run.
It is a stance about defaults, not a certification.
Which laws does it cover?
Section titled “Which laws does it cover?”It was designed around the GDPR and the ePrivacy rules on storing information on a device, and its documents cite GDPR articles. It does not model other regimes. Nothing stops you from using it elsewhere, but the vocabulary (lawful bases, Art. 13 notices, Art. 30 records) is the GDPR’s.
Does it work with a banner other than CookieConsent?
Section titled “Does it work with a banner other than CookieConsent?”The generated configuration is for CookieConsent v3. The guard and the storage facade read consent from CookieConsent’s cookie by default, and the audit drives CookieConsent’s markup. installGuard and createStorage accept your own consent lookups, and the audit’s selectors can be changed through its programmatic API, so other setups are possible, but none is provided.
The registry
Section titled “The registry”Do I have to declare my own scripts and stylesheets?
Section titled “Do I have to declare my own scripts and stylesheets?”No. First-party files are admitted by 'self' in the policy, and the guard treats same-origin scripts and iframes as first-party code. You declare cookies and storage keys (first-party ones too), and everything third-party.
Why does it insist on dpo: false and automatedDecisionMaking: false?
Section titled “Why does it insist on dpo: false and automatedDecisionMaking: false?”Because a missing field cannot be told from a forgotten one, and the documents have to say something. false is a statement; absence is not.
Why can’t I bind a web font to a consent purpose?
Section titled “Why can’t I bind a web font to a consent purpose?”Because nothing consent-kit generates could hold it back. CookieConsent manages <script> tags only, the guard has no hook for <link> or CSS url(), and the policy is the same before and after a decision. A gate that does not hold is worse than none, so the validator refuses the combination. Host the font yourself, or bind it to a purpose on another basis that you can defend.
Can consent-kit pick the lawful basis for me?
Section titled “Can consent-kit pick the lawful basis for me?”No, and presets do not either. A preset may say which basis its artefacts normally need; binding it differently is a warning.
Is a “legitimate interest” purpose checked in any way?
Section titled “Is a “legitimate interest” purpose checked in any way?”Only for form: the interest must be stated. Whether the interest outweighs the visitor’s, and whether storing something on a device can rest on it at all, is not checked.
Runtime
Section titled “Runtime”Is the guard a security boundary?
Section titled “Is the guard a security boundary?”No. It is a backstop against accident and drift, running in the same page as the code it checks, with known gaps: it does not see reads, property-style storage writes, or APIs taken from another frame. The boundary is the Content-Security-Policy. See how consent flows at runtime.
What if my host cannot set response headers?
Section titled “What if my host cannot set response headers?”Use the meta value from csp.json in a <meta http-equiv="Content-Security-Policy"> element. You lose frame-ancestors and reporting, and a report-only policy cannot be delivered that way at all. Prefer a host that sets headers.
What happens to visitors who send Global Privacy Control?
Section titled “What happens to visitors who send Global Privacy Control?”CookieConsent treats them as having refused. Nothing consent-bound runs, and no receipt is sent, because they made no choice in the banner. See Global Privacy Control.
A vendor’s script stopped working after I added consent-kit. Why?
Section titled “A vendor’s script stopped working after I added consent-kit. Why?”Most likely the policy refuses something the vendor loads that you have not declared, or the guard blocks a cookie it sets. Run the audit: “Undeclared drift” lists each one with the entry to add. Declare what you accept; do not reach for 'unsafe-inline' or a wildcard.
Changes and re-consent
Section titled “Changes and re-consent”When are visitors asked again?
Section titled “When are visitors asked again?”When a release adds a consent purpose or changes one materially. Then the revision goes up by one, and CookieConsent shows the banner to every returning visitor. See material changes and re-consent.
Can I ask again about only the purpose that changed?
Section titled “Can I ask again about only the purpose that changed?”No. There is one revision counter for all consent purposes. Purpose versions are tracked individually and recorded in receipts, but re-asking is global.
Can I stop a change from being classified as material?
Section titled “Can I stop a change from being classified as material?”No. Overrides only escalate. If a change that is listed as material is not one you want to ask visitors about, do not make the change, or make it differently.
Who has to sign off, and how is that recorded?
Section titled “Who has to sign off, and how is that recorded?”Changes classified needs_confirmation or needs_review need their key in acknowledged in privacy.review.json. consent-kit does not know who edited the file. Your version control and your review process are the record. If the sign-off has to come from a particular role, enforce that where you enforce code review.
Receipts
Section titled “Receipts”Are consent receipts required?
Section titled “Are consent receipts required?”consent-kit requires a statement: an endpoint, or an explicit opt-out with a reason. Whether you need your own record of consent is a legal question; a controller relying on consent is expected to be able to demonstrate it. See opt out of receipts for what the opt-out costs.
Is a consent receipt personal data?
Section titled “Is a consent receipt personal data?”Treat it as such. The body contains a consent id that singles out a browser, and the request carries an IP address. @consent-kit/server stores a keyed hash in place of the consent id and does not store the IP address, user agent, headers or URL. Whether the stored row is still personal data in your hands, given that you hold the key, is for your counsel. Decide a retention period; no sweep is built.
Does a receipt prove that a person consented?
Section titled “Does a receipt prove that a person consented?”It shows that your endpoint received a well-formed statement of a decision for a consent id, on a policy you really released, at a time your server recorded. It does not authenticate the sender and it does not identify a person. See what a receipt proves.
How do I answer an access or erasure request for receipts?
Section titled “How do I answer an access or erasure request for receipts?”The visitor’s consent id is in their cc_cookie. Hash it with your key (subjectHasher from @consent-kit/server) and query or delete by subject_hash. No tooling for this is built, and it only works while you still have the key.
Documents
Section titled “Documents”Can I publish the generated privacy policy?
Section titled “Can I publish the generated privacy policy?”Not as it comes out. Every generated document is stamped “Unreviewed draft” because no phrase has a legal review on record as shipped. Use the documents as a consistent first draft for your lawyer. See documents and phrase review.
If a lawyer reviews the phrases, is the policy then approved?
Section titled “If a lawyer reviews the phrases, is the policy then approved?”No. A phrase review covers the wording of sentence templates. It does not cover the facts your registry fills in, your own purpose descriptions, the intro and outro texts, or whether the document is complete for your situation.
Why only English and German?
Section titled “Why only English and German?”That is what the phrase library is written in. A registry locale with no language in the library gets no documents and is reported as a gap. The banner shows your purpose texts in any locale you declare; its own button labels and headings exist in English and German, and any other locale gets the English ones.
Is the record of processing activities complete?
Section titled “Is the record of processing activities complete?”It contains what the registry holds per purpose: description, legal basis, data subjects, personal data, recipients, third-country transfers, erasure period, and a general description of security measures. Processing that never touches the website, and so is not in the registry, is not in the record.
Presets
Section titled “Presets”Can I trust a preset?
Section titled “Can I trust a preset?”As much as its status says. A draft preset’s facts were read on the vendor’s documentation and never observed in a browser. A verified preset’s fixture ran against the live vendor on the recorded date, and nothing re-checks it on a schedule. In both cases, the audit of your own site is the evidence that counts. The one real-vendor preset in the catalogue, plausible, is a draft.
Why are there so few presets?
Section titled “Why are there so few presets?”Because every fact in one has to be sourced from the vendor’s own documentation, and a preset becomes verified only after a run against the live vendor. See contribute a preset.
Project status
Section titled “Project status”Is it production-ready?
Section titled “Is it production-ready?”Judge by what is stated in these pages. The packages are at version 0.0.0 in the repository. The phrase library has no legal review on record. The only real-vendor preset is a draft. Retention and erasure tooling for receipts, and the scheduled re-verification of presets, are not built. The parts that exist are covered by tests, including browser tests of the policy, the audit and the receipt Worker.
What is the licence?
Section titled “What is the licence?”MIT.