T09 · Insecure Skill Coding Practices
- Location
SKILL.md:434- Finding
Production-Style Logging Exposes User Identifiers
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 434
Vulnerability Type: Sensitive information exposure through application logging
Risk Level: MediumComplete Code Snippet:
kotlin Log.i(TAG, "loadData: started, userId = $userId")Technical Analysis
The Skill presents an
INFO-level log containing a user identifier as a recommended logging pattern. User IDs are potentially personal or linkable information. The example has noBuildConfig.DEBUGguard, redaction, hashing, or release-build log suppression, so an agent following this guidance may incorporate it into production code.This recommendation also conflicts with
references/privacy-security.md, line 67, which correctly states that personal information must not be logged. Logging the identifier atINFOlevel increases the likelihood that it will be retained by diagnostic systems or included in collected application logs.Attack Path
- An agent uses the Skill while implementing Android application logging.
- The agent follows the recommended pattern and substitutes a real account identifier for
userId. - The logging statement remains enabled in a release build.
- The application writes the identifier to Logcat whenever data loading begins.
- A connected debugging host, a process with sufficient log access, device-diagnostic tooling, or a log-collection SDK obtains the log entry.
- The exposed identifier may be correlated with application activity or other collected records.
This does not independently provide privilege escalation or code execution; exploitation requires access to application logs or a diagnostic pipeline that collects them.
Impact Assessment
The issue can disclose user-linked identifiers and operational activity within the affected application. Its scope is limited to values passed to the logging statement and the parties capable of reading or collecting those logs. Potential consequences include privacy leakage, cross-record ...[truncated 257 chars]
- Remediation
View remediation
Remediation Suggestions
Remove user identifiers and other request parameters from the recommended logging example. Log only a generic operational event:
kotlin if (BuildConfig.DEBUG) { Log.d(TAG, "loadData: started") }Apply the following hardening measures:
- Prohibit passwords, tokens, email addresses, user IDs, session IDs, payment data, and other personal or linkable values in logs.
- Restrict development diagnostics to debug builds using
BuildConfig.DEBUG. - Configure release builds to remove or suppress verbose logging.
- If correlation is strictly necessary, use a short-lived, non-user-derived diagnostic identifier rather than a persistent account identifier.
- Add automated lint or static-analysis rules to detect sensitive values passed to Android logging APIs.
- Align the primary logging section with the stricter rule in
references/privacy-security.md.
