Skip to content
Back to skills

Language 2026 10 08

ASecurity

`parseConfig` did:

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 26, 2026
ai-agents

Security analysis

A100/100

Pro scans all 19 files and shows the line behind each finding

Scanned October 26, 2026

npx -y skills add Siririn77/i-have-autism --skill language-2026-10-08 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Language 2026 10 08?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Language 2026 10 08
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/siririn77-language-2026-10-08-c34cd42f/badge)](https://www.skillsdirectory.com/skills/siririn77-language-2026-10-08-c34cd42f)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# T3 — parseConfig bug fix

## The bug

`parseConfig` did:

```js
const [key, value] = line.split('=');
out[key.trim()] = value.trim();
```

`String.split('=')` returns an array of length 1 for any line that contains no `=`
(e.g. an empty string, blank lines, comment/header lines). In that case `value` is
`undefined`, and `value.trim()` throws `TypeError: Cannot read properties of undefined
(reading 'trim')`. `parseConfig('')` crashes immediately because `''.split('\n')`
yields `['']`, and `''.split('=')` yields `['']`.

Two further latent issues: a line like `url=a=b` would lose everything after the
second `=` (destructuring only captures the first two elements), and whitespace-only
lines could produce an empty-string key.

## The fix

- Trim each line first; skip empty lines and `#` comments.
- Find the **first** `=` with `indexOf`; if absent, skip the line instead of crashing.
- Split on that first `=` only, so values may themselves contain `=` (`url=a=b=c` kept intact).
- Skip lines with an empty key.
- Coerce input via `String(text)` to avoid crashing on `null`/`undefined`.

## Verification

Ran the fixed module against: empty string, blank lines, comment lines, lines with no
`=`, values containing `=`, and lines with surrounding whitespace. All return correct
objects with no exceptions. Output:

```
empty string => {}
blank lines => {"a":"1","b":"2"}
comment => {"a":"1"}
line no equals => {"a":"1","b":"2"}
value with equals => {"url":"a=b=c"}
spaces => {"key":"value"}
```

Files in this skill

  • T1_with-skill.md11.8 KB
  • T1_without-skill.md6.4 KB
  • T2_with-skill.md9.1 KB
  • T2_without-skill.md4.5 KB
  • T3_with-skill.md1.9 KB
  • T3_without-skill.md1.5 KB
  • T4_with-skill.md1.2 KB
  • T4_without-skill.md1.1 KB
  • T5_with-skill.md6.2 KB
  • T5_without-skill.md3.5 KB
  • T6_with-skill.md5.6 KB
  • T6_without-skill.md3.7 KB
  • T7_with-skill.md1.9 KB
  • T7_without-skill.md2.3 KB
  • T8_with-skill.md2.9 KB
  • T8_without-skill.md4.4 KB
  • T9_with-skill.md7.1 KB
  • T9_without-skill.md3.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.