本文へ移動
cccskills
無料GitHub で公開

cookie-lifetime-audit

Auditing cookie lifetimes against regulatory recommendations and browser policies. Covers CNIL 13-month maximum recommendation, session vs persistent classification, third-party cookie phase-out impact, and Safari ITP duration caps.

インストール方法を見る

含まれるファイル(5)

  • SKILL.md9.8 KB
  • assets/template.md1.2 KB
  • references/standards.md1.6 KB
  • references/workflows.md1.6 KB
  • scripts/process.py10.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Auditing Cookie Lifetimes

Overview

Cookie lifetime is a critical compliance factor often overlooked in consent implementations. The CNIL recommends a maximum cookie lifetime of 13 months from the point of collection, after which consent must be renewed. The CJEU in Planet49 (Case C-673/17) established that cookie duration must be disclosed to users before consent is obtained. Additionally, browser-enforced restrictions — Safari's Intelligent Tracking Prevention (ITP), Firefox's Enhanced Tracking Protection (ETP), and Chrome's third-party cookie deprecation — impose technical limits on cookie lifetimes that may conflict with server-set durations. A cookie lifetime audit identifies cookies exceeding regulatory or technical limits and ensures accurate duration disclosure.

Cookie Duration Classification

Session vs. Persistent Cookies

TypeDurationBehaviorConsent Implications
Session cookieNo Expires or Max-Age attributeDeleted when browser closesStill requires consent if non-essential under ePrivacy Art. 5(3)
Persistent cookieHas Expires or Max-AgeSurvives browser restartRequires consent; duration must be disclosed (Planet49)
Server-refreshedReset on each visit via Set-CookieEffectively indefinite if user visits regularlyDuration is from last visit, not first set — must disclose rolling nature

Duration Categories

CategoryDuration RangeExamplesRegulatory Concern
Short-lived< 24 hoursSession IDs, CSRF tokensLow — typically strictly necessary
Medium-lived24 hours - 30 daysA/B test assignments, session replayMedium — review necessity
Long-lived30 days - 13 monthsAnalytics IDs, preference cookiesHigh — must justify duration
Excessive> 13 monthsLegacy tracking cookies, _ga (2 years)Very high — CNIL non-compliant duration

CNIL 13-Month Recommendation

Regulatory Basis

CNIL's Recommendation on Cookies (1 October 2020, following Deliberation 2020-091 of 17 September 2020) states:

"The duration of validity of the consent of the user to the deposit of trackers should not exceed thirteen months. At the end of this period, the consent of the user should be collected again."

This 13-month maximum applies to:

  • The consent cookie itself (the cookie that records the user's consent choice)
  • Non-essential tracking cookies (the cookies enabled by consent)

Impact on Common Cookies

Cookies Exceeding CNIL 13-Month Limit:

CookieDefault DurationSet ByCNIL CompliantRemediation
_ga2 years (730 days)Google AnalyticsNo — exceeds 13 monthsSet cookie_expires to 34128000 (395 days / ~13 months)
_ga_XXXXXXX2 yearsGA4No — exceeds 13 monthsSet cookie_expires to 34128000
IDE13 monthsDoubleClickBorderline compliantMonitor — at the limit
fr90 daysMeta/FacebookYesNo action needed
_gcl_au90 daysGoogle AdsYesNo action needed
hjSessionUser*1 yearHotjarYes — under 13 monthsNo action needed
NID6 monthsGoogle SearchYesNo action needed

GA4 Cookie Lifetime Configuration for Pinnacle E-Commerce Ltd

Override default GA4 cookie duration to comply with CNIL:

gtag.js implementation:

gtag('config', 'G-PINNACLE123', {
  'cookie_expires': 34128000,     // 395 days (~13 months) in seconds
  'cookie_update': true,           // Refresh cookie on each visit
  'cookie_domain': '.pinnacle-ecommerce.com',
  'cookie_flags': 'SameSite=Lax;Secure'
});

GTM implementation: In the GA4 Configuration tag, set the field:

  • Field name: cookie_expires
  • Value: 34128000

Browser-Enforced Lifetime Restrictions

Safari Intelligent Tracking Prevention (ITP)

Safari imposes strict cookie lifetime caps:

Cookie TypeITP RuleEffective Lifetime
Client-side JavaScript cookie (document.cookie)Capped at 7 days7 days maximum
Client-side JS cookie with link decoration (e.g., ?gclid=)Capped at 24 hours24 hours
Server-set cookie (Set-Cookie header), first-partyNo capAs set by server
Server-set cookie, classified as trackingCapped at 7 days7 days
Third-party cookieBlocked entirely0 (cannot be set)
LocalStorageCapped at 7 days7 days

Impact on Pinnacle E-Commerce Ltd:

  • GA4 _ga cookie set via JavaScript: Effective lifetime is 7 days on Safari, not 2 years
  • Server-side tagging (via data.pinnacle-ecommerce.com) sets _ga via Set-Cookie header: Full configured lifetime applies
  • Google Ads click IDs in URL parameters: _gcl_au cookie capped at 24 hours on Safari

Firefox Enhanced Tracking Protection (ETP)

SettingDefault (Standard)Strict
Third-party tracking cookiesBlockedBlocked
Cross-site tracking cookiesBlockedBlocked
First-party tracking cookiesAllowedLimited to 7 days (if tracker classified)
Fingerprinting scriptsBlockedBlocked
Cryptomining scriptsBlockedBlocked

Chrome Third-Party Cookie Changes

As of 2025, Chrome has moved toward a user-choice model for third-party cookies rather than full deprecation:

PhaseStatusImpact
Privacy Sandbox APIs availableActiveTopics API, Attribution Reporting API available
Third-party cookie user controlsActiveUsers can block third-party cookies in settings
IP Protection (Gnatcatcher)In developmentMay affect IP-based tracking

Cookie Lifetime Audit Process

Step 1: Extract Current Cookie Lifetimes

For each cookie on pinnacle-ecommerce.com, record:

Cookie NameDomainSet ByDeclared DurationActual Max-Age/ExpiresRefreshed on VisitCategory
_ga.pinnacle-ecommerce.comJavaScript2 yearsMax-Age=63072000YesAnalytics
_ga_PINNACLE.pinnacle-ecommerce.comJavaScript2 yearsMax-Age=63072000YesAnalytics
_gid.pinnacle-ecommerce.comJavaScript24 hoursMax-Age=86400YesAnalytics
_fbp.pinnacle-ecommerce.comJavaScript90 daysMax-Age=7776000NoAdvertising
_fbc.pinnacle-ecommerce.comJavaScript90 daysMax-Age=7776000NoAdvertising
_gcl_au.pinnacle-ecommerce.comJavaScript90 daysMax-Age=7776000NoAdvertising
session_id.pinnacle-ecommerce.comServerSessionNo Max-AgeN/ANecessary
csrf_token.pinnacle-ecommerce.comServerSessionNo Max-AgeN/ANecessary
locale.pinnacle-ecommerce.comServer1 yearMax-Age=31536000NoFunctionality
consent_state.pinnacle-ecommerce.comJavaScript6 monthsMax-Age=15768000NoNecessary

Step 2: Compare Against Limits

CookieServer-Set DurationCNIL 13-Month LimitSafari ITP LimitCompliantAction Required
_ga2 yearsExceeds7 days (JS)NoReduce to 13 months; move to server-side
_ga_PINNACLE2 yearsExceeds7 days (JS)NoReduce to 13 months; move to server-side
_gid24 hoursWithin7 days (JS)YesNone
_fbp90 daysWithin7 days (JS)PartialMove to server-side for Safari
locale1 yearWithinNo cap (server)YesNone
consent_state6 monthsWithin7 days (JS)PartialMove to server-side; aligns with CNIL 6-month reconsent

Step 3: Verify Disclosure Accuracy

Compare actual cookie lifetimes with durations stated in the cookie policy:

CookiePolicy StatesActual DurationAccurate
_ga"up to 2 years"2 yearsYes — but update to reflect 13-month override
_fbp"3 months"90 daysYes
locale"12 months"1 yearYes
_gid"24 hours"24 hoursYes

Step 4: Generate Remediation Plan

For Pinnacle E-Commerce Ltd:

  1. Immediate: Override GA4 cookie duration to 13 months (cookie_expires: 34128000)
  2. Short-term: Implement server-side tagging for _ga, _fbp cookies to bypass Safari ITP 7-day cap
  3. Medium-term: Implement automatic consent recollection at 6 months (CNIL reconsent cycle)
  4. Ongoing: Add cookie lifetime checks to CI/CD pipeline — flag any new cookie with duration > 13 months

Key Legal and Technical References

  • CNIL Deliberation No. 2020-091 (17 September 2020) — 13-month maximum cookie lifetime recommendation
  • CNIL Recommendation on Cookies (1 October 2020) — Practical implementation of lifetime limits
  • CJEU Case C-673/17 (Planet49), para. 81 — Cookie duration must be disclosed before consent
  • ePrivacy Directive 2002/58/EC, Article 5(3) — Consent required for non-essential cookie storage
  • Apple WebKit ITP Documentation — Safari cookie lifetime restrictions
  • Mozilla ETP Documentation — Firefox tracking protection policies
  • Google Privacy Sandbox Timeline — Chrome third-party cookie deprecation status
  • GDPR Article 5(1)(e) — Storage limitation principle applicable to cookie-stored personal data

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Implements 42 CFR Part 2 protections for substance use disorder patient records. Covers written consent requirements stricter than HIPAA, re-disclosure prohibition, court order procedures, qualified service organization agreements, and 2024 amendments aligning Part 2 with HIPAA. Keywords: 42 CFR Part 2, substance use disorder, SUD records, re-disclosure, consent, Part 2 amendments.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Guides assessment of third-country adequacy decisions under GDPR Article 45 for international data transfers. Covers the current EC adequacy decisions list, adequacy assessment criteria, partial adequacy handling, and monitoring of adequacy decision reviews. Keywords: adequacy decision, Article 45, third country, adequate protection, EC adequacy list.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Implements age-gating mechanisms for online services to restrict access based on user age. Covers hard gates versus soft gates, neutral age prompts, re-verification triggers, circumvention prevention, and regulatory requirements under GDPR, COPPA, UK Online Safety Act, and DSA. Keywords: age gate, age restriction, neutral prompt, children, online services, access control.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Evaluates and implements age estimation and verification technologies for online services. Covers facial age estimation, digital ID verification, self-declaration with risk assessment, AI-based age estimation, and the accuracy versus privacy tradeoff. Includes ICO guidance and euCONSENT framework. Keywords: age verification, age estimation, facial analysis, digital ID, children, online safety.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Preparing EU AI Act compliance documentation for high-risk AI systems. Covers Annex III classification, technical documentation under Art. 11, conformity assessment, risk management systems, and CE marking requirements. Keywords: EU AI Act, high-risk AI, Annex III, conformity assessment, CE marking.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Implements GDPR Art. 22 automated decision-making and AI Act Art. 14 human oversight requirements for AI systems. Covers identification of solely automated decisions, meaningful human intervention design, logic explanation mechanisms, and contestation procedures. Keywords: Art. 22, automated decision, human oversight, AI Act, profiling, contestation.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

mukul975 のスキルをすべて見る

このスキルの問題を報告する