Disclosure of Information Analysis (LINDDUN D2)
Analyze source code for disclosure threats where personal data is accessible to
unauthorized parties. Focuses specifically on personal and sensitive data rather
than general system information. Covers direct disclosure (data breach vectors)
and indirect disclosure (third-party sharing, over-collection).
Supported Flags
Read ../../shared/schemas/flags.md for full flag
documentation. This skill supports all cross-cutting flags.
| Flag |
Disclosure-Specific Behavior |
--scope |
Default changed. Focuses on files handling personal data: API handlers, data models, logging, caching, third-party integrations, and error handling. |
--depth quick |
Grep patterns only: scan for PII in logs, error messages, and third-party data sharing. |
--depth standard |
Full code read, trace personal data flows within each file, check access controls on personal data stores. |
--depth deep |
Cross-file personal data flow tracing. Map all paths where PII exits the application boundary. |
--depth expert |
Deep + breach simulation: model what personal data is exposed in each attack scenario. |
--severity |
Filter output. PII in logs is typically high; over-fetching is medium. |
--fix |
Generate redaction, field-level access control, and data minimization replacements. |
Framework Context
LINDDUN D2 -- Disclosure of Information
Disclosure of information in the LINDDUN context refers specifically to
unauthorized access to personal data. Read
../../shared/frameworks/linddun.md for the
full LINDDUN framework reference including the distinction between LINDDUN
disclosure (personal data focus) and STRIDE information disclosure (general
system information).
Privacy Property Violated: Confidentiality of Personal Data
STRIDE Mapping: Information Disclosure (LINDDUN narrows focus specifically
to personal data rather than general system information)
Workflow
Step 1 -- Determine Scope
- Parse
--scope flag (default: changed).
- Resolve to a concrete file list.
- Filter to relevant files: API handlers, data models, logging configuration,
error handling, caching logic, third-party SDK integrations, data export
endpoints, and serialization logic.
- Prioritize files containing: user data structures, PII fields, third-party
API calls with user data, log statements, cache writes, and error responses.
Step 2 -- Analyze for Personal Data Disclosure
Read each scoped file and assess personal data exposure vectors:
- Check logging for PII: Scan log statements for personal data fields
(name, email, phone, address, SSN, health data, financial data).
- Assess API response data: Determine whether endpoints return more
personal fields than the consumer needs (over-fetching).
- Examine third-party data sharing: Identify where personal data flows
to external services (analytics, advertising, logging, error tracking).
- Check error handling: Look for personal data in error messages, stack
traces, and debug output.
- Evaluate cache and temporary storage: Determine whether personal data
in caches, temp files, or browser storage is properly protected.
At --depth deep or --depth expert, trace all paths where personal data
exits the application boundary and map the full disclosure surface.
Step 3 -- Report Findings
Output findings per ../../shared/schemas/findings.md.
Each finding needs: DDSCL-NNN id, title, severity (based on data sensitivity
and exposure scope), location with snippet, description of what personal data is
disclosed and through which channel, impact (unauthorized data access), fix
(redaction, minimization, or encryption), and CWE/LINDDUN references.
Analysis Checklist
- Do log statements include personal data (names, emails, phone numbers, addresses)?
- Are API responses returning full user objects instead of only needed fields?
- Is personal data sent to third-party analytics or error tracking services?
- Do error messages or stack traces contain personal data values?
- Is PII passed through URL query parameters (visible in logs and referrer headers)?
- Are personal data fields encrypted at rest, or stored in plaintext?
- Do caching layers store personal data without appropriate TTLs or access controls?
- Do debug modes expose additional personal data that production would not?
What to Look For
- PII in log statements: Personal data written to logs, console, or debug output.
- Grep:
log\.\w+\(.*email|logger\.\w+\(.*password|console\.log\(.*ssn|print\(.*credit.card
- Over-fetched API responses: Returning complete user objects with unnecessary fields.
- Grep:
res\.json\(user\)|response\.send\(userData\)|SELECT \*.*FROM.*user|\.toJSON\(\)
- Third-party data sharing: PII sent to analytics, error tracking, or advertising SDKs.
- Grep:
Sentry\.captureException.*user|analytics\.track.*email|gtag.*user_id|bugsnag.*user
- PII in error responses: Personal data leaked through error handling.
- Grep:
res\.status\(.*\.json\(.*user|catch.*res\.send\(.*err|error.*message.*email
- Personal data in URLs: PII in query parameters or path segments.
- Grep:
\?email=|&phone=|/users/\$\{email\}|encodeURIComponent\(.*email\)|queryString.*ssn
- Plaintext PII storage: Personal data stored without encryption.
- Grep:
password.*varchar|ssn.*text|credit_card.*string|healthData.*column|plaintext.*pii
- Cache with personal data: PII stored in cache layers without protection.
- Grep:
cache\.set\(.*user|redis\.set\(.*email|localStorage\.setItem\(.*token|sessionStorage.*user
- Missing field-level access control: No column or field restriction on personal data.
- Grep:
SELECT \*|findAll\(\)|\.find\(\{\}\)|\.aggregate\(\[|include:.*all
Regulatory Mapping
| Regulation |
Provision |
Relevance |
| GDPR Art. 5(1)(f) |
Integrity and confidentiality |
Personal data must be protected against unauthorized disclosure |
| GDPR Art. 32 |
Security of processing |
Appropriate technical measures to protect personal data |
| GDPR Art. 33-34 |
Breach notification |
Disclosure of personal data triggers 72-hour notification |
| CCPA 1798.100 |
Right to know |
Consumers must know what personal data is collected and shared |
| CCPA 1798.150 |
Private right of action |
Data breaches exposing personal data create liability |
| HIPAA 164.312 |
Technical safeguards |
Protected health information requires access controls and encryption |
Output Format
Use finding ID prefix DDSCL (e.g., DDSCL-001, DDSCL-002).
All findings follow the schema in
../../shared/schemas/findings.md with:
references.cwe: CWE-200, CWE-311, or CWE-532 as appropriate
references.owasp: A01:2021 (Broken Access Control) or A02:2021 (Cryptographic Failures)
metadata.tool: "data-disclosure"
metadata.framework: "linddun"
metadata.category: "D2"
Summary table after all findings:
| Disclosure Pattern | Critical | High | Medium | Low |
|------------------------------|----------|------|--------|-----|
| PII in logs | | | | |
| Over-fetched API responses | | | | |
| Third-party data sharing | | | | |
| PII in error messages | | | | |
| Personal data in URLs | | | | |
| Plaintext PII storage | | | | |
| Cache / temp storage leaks | | | | |
Followed by: top 3 priorities, personal data flow map, and overall assessment.
1---2name: data-disclosure3description: This skill should be used when the user asks to "check for personal data disclosure", "analyze PII exposure", "find privacy issues related to data leakage", "check for unauthorized data sharing", or mentions "disclosure" in a privacy context. Maps to LINDDUN category D2. Focuses specifically on PERSONAL data disclosure, complementing STRIDE information disclosure.4---56# Disclosure of Information Analysis (LINDDUN D2)78Analyze source code for disclosure threats where personal data is accessible to9unauthorized parties. Focuses specifically on personal and sensitive data rather10than general system information. Covers direct disclosure (data breach vectors)11and indirect disclosure (third-party sharing, over-collection).1213## Supported Flags1415Read [`../../shared/schemas/flags.md`](../../shared/schemas/flags.md) for full flag16documentation. This skill supports all cross-cutting flags.1718| Flag | Disclosure-Specific Behavior |19|------|------------------------------|20| `--scope` | Default `changed`. Focuses on files handling personal data: API handlers, data models, logging, caching, third-party integrations, and error handling. |21| `--depth quick` | Grep patterns only: scan for PII in logs, error messages, and third-party data sharing. |22| `--depth standard` | Full code read, trace personal data flows within each file, check access controls on personal data stores. |23| `--depth deep` | Cross-file personal data flow tracing. Map all paths where PII exits the application boundary. |24| `--depth expert` | Deep + breach simulation: model what personal data is exposed in each attack scenario. |25| `--severity` | Filter output. PII in logs is typically `high`; over-fetching is `medium`. |26| `--fix` | Generate redaction, field-level access control, and data minimization replacements. |2728## Framework Context2930**LINDDUN D2 -- Disclosure of Information**3132Disclosure of information in the LINDDUN context refers specifically to33unauthorized access to personal data. Read34[`../../shared/frameworks/linddun.md`](../../shared/frameworks/linddun.md) for the35full LINDDUN framework reference including the distinction between LINDDUN36disclosure (personal data focus) and STRIDE information disclosure (general37system information).3839**Privacy Property Violated**: Confidentiality of Personal Data4041**STRIDE Mapping**: Information Disclosure (LINDDUN narrows focus specifically42to personal data rather than general system information)4344## Workflow4546### Step 1 -- Determine Scope47481. Parse `--scope` flag (default: `changed`).492. Resolve to a concrete file list.503. Filter to relevant files: API handlers, data models, logging configuration,51 error handling, caching logic, third-party SDK integrations, data export52 endpoints, and serialization logic.534. Prioritize files containing: user data structures, PII fields, third-party54 API calls with user data, log statements, cache writes, and error responses.5556### Step 2 -- Analyze for Personal Data Disclosure5758Read each scoped file and assess personal data exposure vectors:59601. **Check logging for PII**: Scan log statements for personal data fields61 (name, email, phone, address, SSN, health data, financial data).622. **Assess API response data**: Determine whether endpoints return more63 personal fields than the consumer needs (over-fetching).643. **Examine third-party data sharing**: Identify where personal data flows65 to external services (analytics, advertising, logging, error tracking).664. **Check error handling**: Look for personal data in error messages, stack67 traces, and debug output.685. **Evaluate cache and temporary storage**: Determine whether personal data69 in caches, temp files, or browser storage is properly protected.7071At `--depth deep` or `--depth expert`, trace all paths where personal data72exits the application boundary and map the full disclosure surface.7374### Step 3 -- Report Findings7576Output findings per [`../../shared/schemas/findings.md`](../../shared/schemas/findings.md).77Each finding needs: `DDSCL-NNN` id, title, severity (based on data sensitivity78and exposure scope), location with snippet, description of what personal data is79disclosed and through which channel, impact (unauthorized data access), fix80(redaction, minimization, or encryption), and CWE/LINDDUN references.8182## Analysis Checklist83841. Do log statements include personal data (names, emails, phone numbers, addresses)?852. Are API responses returning full user objects instead of only needed fields?863. Is personal data sent to third-party analytics or error tracking services?874. Do error messages or stack traces contain personal data values?885. Is PII passed through URL query parameters (visible in logs and referrer headers)?896. Are personal data fields encrypted at rest, or stored in plaintext?907. Do caching layers store personal data without appropriate TTLs or access controls?918. Do debug modes expose additional personal data that production would not?9293## What to Look For94951. **PII in log statements**: Personal data written to logs, console, or debug output.96 - Grep: `log\.\w+\(.*email|logger\.\w+\(.*password|console\.log\(.*ssn|print\(.*credit.card`972. **Over-fetched API responses**: Returning complete user objects with unnecessary fields.98 - Grep: `res\.json\(user\)|response\.send\(userData\)|SELECT \*.*FROM.*user|\.toJSON\(\)`993. **Third-party data sharing**: PII sent to analytics, error tracking, or advertising SDKs.100 - Grep: `Sentry\.captureException.*user|analytics\.track.*email|gtag.*user_id|bugsnag.*user`1014. **PII in error responses**: Personal data leaked through error handling.102 - Grep: `res\.status\(.*\.json\(.*user|catch.*res\.send\(.*err|error.*message.*email`1035. **Personal data in URLs**: PII in query parameters or path segments.104 - Grep: `\?email=|&phone=|/users/\$\{email\}|encodeURIComponent\(.*email\)|queryString.*ssn`1056. **Plaintext PII storage**: Personal data stored without encryption.106 - Grep: `password.*varchar|ssn.*text|credit_card.*string|healthData.*column|plaintext.*pii`1077. **Cache with personal data**: PII stored in cache layers without protection.108 - Grep: `cache\.set\(.*user|redis\.set\(.*email|localStorage\.setItem\(.*token|sessionStorage.*user`1098. **Missing field-level access control**: No column or field restriction on personal data.110 - Grep: `SELECT \*|findAll\(\)|\.find\(\{\}\)|\.aggregate\(\[|include:.*all`111112## Regulatory Mapping113114| Regulation | Provision | Relevance |115|-----------|-----------|-----------|116| GDPR Art. 5(1)(f) | Integrity and confidentiality | Personal data must be protected against unauthorized disclosure |117| GDPR Art. 32 | Security of processing | Appropriate technical measures to protect personal data |118| GDPR Art. 33-34 | Breach notification | Disclosure of personal data triggers 72-hour notification |119| CCPA 1798.100 | Right to know | Consumers must know what personal data is collected and shared |120| CCPA 1798.150 | Private right of action | Data breaches exposing personal data create liability |121| HIPAA 164.312 | Technical safeguards | Protected health information requires access controls and encryption |122123## Output Format124125Use finding ID prefix **DDSCL** (e.g., `DDSCL-001`, `DDSCL-002`).126127All findings follow the schema in128[`../../shared/schemas/findings.md`](../../shared/schemas/findings.md) with:129- `references.cwe`: `CWE-200`, `CWE-311`, or `CWE-532` as appropriate130- `references.owasp`: `A01:2021` (Broken Access Control) or `A02:2021` (Cryptographic Failures)131- `metadata.tool`: `"data-disclosure"`132- `metadata.framework`: `"linddun"`133- `metadata.category`: `"D2"`134135**Summary table** after all findings:136137```138| Disclosure Pattern | Critical | High | Medium | Low |139|------------------------------|----------|------|--------|-----|140| PII in logs | | | | |141| Over-fetched API responses | | | | |142| Third-party data sharing | | | | |143| PII in error messages | | | | |144| Personal data in URLs | | | | |145| Plaintext PII storage | | | | |146| Cache / temp storage leaks | | | | |147```148149Followed by: top 3 priorities, personal data flow map, and overall assessment.