T09 · Insecure Skill Coding Practices
- Location
scripts/session.py:15- Finding
Unrestricted API origin override can redirect credentials, session cookies, and source code
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is coherent for solving and submitting NCCUOJ problems, but it handles real account credentials and session cookies in under-protected ways that users should review before installing.
Review this skill carefully before installing. It appears intended for legitimate NCCUOJ problem solving, but do not provide a valuable or reused password through the documented command examples, avoid running it in shared or logged environments, check that NCCUOJ_BASE_URL is unset or points only to the real NCCUOJ site, and remove .nccuoj/cookies.txt after use if you proceed.
scripts/session.py:15Unrestricted API origin override can redirect credentials, session cookies, and source code
scripts/submit.py:40Passwords are accepted and documented as command-line arguments
scripts/session.py:20Authentication cookies are persistently stored without enforced restrictive permissions or cleanup
The skill declares no explicit tool restrictions even though it instructs use of network access, file reads, and environment-adjacent execution behavior through helper scripts. Without declared scope, an agent may apply broader capabilities than necessary, increasing the blast radius if the skill or referenced scripts are modified or abused.
The skill instructs users to pass NCCUOJ usernames and passwords directly as command-line arguments. CLI arguments are commonly exposed through shell history, process listings, logs, and telemetry, so this unnecessarily risks credential disclosure to other local users or monitoring systems.
The submission and result-check workflow repeats the insecure pattern of embedding plaintext credentials in command invocations. This expands exposure because the highest-value operations in the skill—submission and account-authenticated status checks—would routinely place credentials where they can be captured by logs or process inspection.
The skill not only suggests passing credentials on the command line but does so without any warning about visibility in shell history, audit logs, or process tables. In this skill's context, users are likely to follow canned commands verbatim, making silent credential exposure more probable.
The contest workflow also requires plaintext credentials in command arguments, creating the same disclosure risk in a context where compromise may additionally affect active contest participation. Repeated insecure guidance normalizes unsafe handling of passwords and increases the chance of accidental leakage across shared machines or recorded terminal sessions.
The script accepts the account password via a command-line argument, which can expose credentials through shell history, process listings, job control logs, and CI/runtime telemetry. Because this skill is specifically for logging into an online judge and handling real user accounts, the issue is more dangerous in context: users are likely to supply actual NCCUOJ credentials that could be recovered by other local users or monitoring tools.
This code accepts credentials from command-line arguments and immediately sends them in an HTTP login request, which is a safety-relevant network operation involving sensitive data. While the module docstring shows how to supply credentials, it does not warn that the password will be transmitted to a remote service or exposed via command-line usage patterns.
The script persists authenticated session cookies to a predictable file under the current working directory and reloads them on later runs, but provides no disclosure, consent flow, or permission hardening. If the workspace is shared, backed up, or has weak filesystem permissions, another local user or process could reuse those cookies to access the NCCUOJ account without credentials.
The script requires the password to be passed as a command-line argument, which commonly exposes credentials through shell history, process listings, job-control logs, and CI/CD command output. Even if the login request itself is expected behavior for this skill, the lack of any safer input method or warning makes accidental credential disclosure likely.
No suspicious patterns detected.