T09 · Insecure Skill Coding Practices
- Location
wrapper.js:20- Finding
OAuth Tokens Stored in an Unprotected Plaintext File
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Withings skill does what it says, but it handles sensitive health data and stores OAuth tokens in an under-protected local file.
Review this before installing, especially on shared systems. The skill can access sensitive Withings health data, stores OAuth tokens locally in plaintext, and may lead users to put client secrets in a .env file that is not actually ignored by this package. Use only if you are comfortable managing those secrets yourself, restrict file permissions, exclude .env and tokens.json from any repository or archive, and revoke Withings tokens if the token file is exposed.
wrapper.js:20OAuth Tokens Stored in an Unprotected Plaintext File
SKILL.md:64Documentation Incorrectly Claims That the Credential File Is Ignored by Git
SKILL.md:82OAuth Authorization Code Is Supplied Through Process Arguments
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const querystring = require('querystring');
// CONFIGURATION
// Load from local .env file if present
try {
const envPath = path.join(__dirname, '.env');
if (fs.existsSync(envPath)) {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
// CONFIGURATION
// Load from local .env file if present
try {
const envPath = path.join(__dirname, '.env');
if (fs.existsSync(envPath)) {
const envContent = fs.readFileSync(envPath, 'utf8');
envContent.split('\n').forEach(line => {
The skill requires sensitive environment variables (WITHINGS_CLIENT_ID and WITHINGS_CLIENT_SECRET) and instructs execution of a local wrapper script, but it does not declare explicit tool scope or permissions. That weakens reviewability and sandbox enforcement, making it easier for an agent/runtime to expose secrets or grant broader execution capability than intended.
This skill processes highly sensitive health data, including weight, body composition, activity, and sleep metrics, and sends/receives that data through the Withings API, but it provides no privacy warning or consent guidance. Users may unknowingly expose regulated or intimate health information without understanding retention, transmission, or sharing implications.
The code persists OAuth access and refresh tokens to a local tokens.json file in plaintext without any warning, consent flow, or file-permission hardening. Because this skill handles sensitive health data, theft of the token file could allow continued API access to highly private user information until the tokens are revoked or expire.
The code formats sleep timestamps using toLocaleTimeString('fr-FR'), which imposes a specific locale regardless of user preference or environment. This is a natural-language/locale policy issue because the skill does not offer a choice or document a justified region-specific constraint.
No suspicious patterns detected.