T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:11
- Finding
- Unpinned Unofficial Dependency Handles Sensitive ClassCharts Credentials and Student Data## Vulnerability Details **File Location**: `SKILL.md:11-24`, with credential use at `SKILL.md:36-43` and `SKILL.md:54-62` **Vulnerability Type**: Unpinned third-party dependency and supply-chain exposure **Risk Level**: Medium ### Vulnerable Code ```yaml install: npm install classcharts-api ``` ```markdown ## Installation ```bash npm install classcharts-api ``` ``` The installed package is subsequently given sensitive authentication material: ```typescript import { ParentClient } from "classcharts-api"; const client = new ParentClient( process.env.CLASSCHARTS_EMAIL!, process.env.CLASSCHARTS_PASSWORD!, ); await client.login(); ``` ```typescript import { StudentClient } from "classcharts-api"; // Date of birth MUST be DD/MM/YYYY const client = new StudentClient( process.env.CLASSCHARTS_CODE!, // e.g. "ABCD1234" "01/01/2010", ); await client.login(); ``` ### Technical Analysis The Skill installs `classcharts-api` without specifying an exact version, lockfile, or integrity hash. Consequently, each installation can resolve to a different package release. The documentation explicitly identifies this as an unofficial API library and passes parent email addresses, passwords, student access codes, and dates of birth into that dependency. Network authentication is necessary for the declared ClassCharts integration, and the audited file does not contain evidence of deliberate exfiltration to an unrelated destination. However, the dependency implementation is not included in the project, so its network destinations and handling of credentials cannot be verified from the audited artifact. Because npm dependencies execute with the installing user's privileges, a compromised package version could run code during installation or intercept credentials and educational records during normal operation. The absence of version and integrity controls expands the supply-chain attack surface beyo ...[truncated 1791 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to a specific reviewed version rather than installing the latest mutable release: ```bash npm install --save-exact classcharts-api@<reviewed-version> ``` 2. Commit a `package.json` and lockfile containing resolved versions and integrity hashes. Use `npm ci` in controlled environments so installations cannot silently update dependency versions. 3. Review the pinned package and its transitive dependencies, including npm lifecycle scripts, credential handling, session storage, and all outbound network destinations. 4. Disable lifecycle scripts where they are not required: ```bash npm ci --ignore-scripts ``` 5. Verify package provenance, maintainer history, signatures or registry attestations where available, and monitor for ownership or release anomalies. 6. Run the integration under a dedicated, non-administrative operating-system account or isolated container with restricted filesystem and network access. 7. Restrict outbound traffic to documented ClassCharts endpoints and block arbitrary destinations where operationally possible. 8. Supply credentials only at runtime through a secret manager or narrowly scoped environment variables. Do not expose unrelated secrets to the process. 9. Avoid embedding real dates of birth or other pupil information in source code, prompts, logs, shell history, or committed configuration. 10. Document that the API is unofficial, obtain appropriate authorization before accessing pupil records, and ensure handling complies with applicable safeguarding and data-protection requirements.
