T09 · Insecure Skill Coding Practices
- Location
scripts/request/web/config.json:2- Finding
Plaintext Authentication Credential Committed to the Project
- Content
View full analysis
Vulnerability Details
File Location:
scripts/request/web/config.json, lines 2-5
Vulnerability Type: Hardcoded authentication secret
Risk Level: HighVulnerable Code
json "web_session": { "value": "040069b3dee5723cd2f869e7f93b4be9a776c9", "description": "Xiaohongshu web_session cookie value (required)" },Technical Analysis
The project contains a populated Xiaohongshu
web_sessioncookie in a tracked configuration file. This value is an authentication credential rather than a non-sensitive configuration parameter.Anyone with access to the distributed project, repository history, build artifacts, backups, or package caches can extract the credential. If it has not expired or been revoked, it may be replayed against Xiaohongshu APIs to impersonate the associated authenticated session.
Storing the credential in plaintext also makes it available to local processes and users that can read the project directory. The supplied
config.example.jsonalready provides an appropriate location for documenting the expected format without distributing a real value.Attack Path
- An attacker downloads the project or obtains a copy of its source history.
- The attacker reads
scripts/request/web/config.json. - The attacker extracts the populated
web_sessionvalue. - The attacker places the cookie in an HTTP client or another copy of this Skill.
- If the session remains valid, requests are sent under the affected user's authenticated Xiaohongshu session.
Impact Assessment
Successful replay may provide the access granted to the affected Xiaohongshu session. The exact scope depends on server-side session permissions and validity, but it can include authenticated account data and authenticated API operations.
This issue does not grant operating-system privileges by itself. Its scope is the account represented by the exposed session and every environment in which copies of th ...[truncated 30 chars]
- Remediation
View remediation
Remediation Suggestions
- Immediately revoke or invalidate the exposed Xiaohongshu session.
- Remove the populated value from the current tree and repository history.
- Ship
config.jsonwith a null or empty value, or generate it locally during onboarding. - Add the runtime secret file to
.gitignoreand package exclusion rules. - Load the credential from a protected environment variable, operating-system credential store, or secret manager.
- Restrict runtime configuration permissions to the owning user.
- Add automated secret scanning to commits and release builds.
- Document credential rotation and revocation procedures.
