Back to skill

Security audit

infinitecampus-api

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly coherent for querying Infinite Campus, but its document-download guidance can send authentication material to an untrusted URL and it under-explains handling of sensitive student records.

Review before installing. Only use this with an account you are authorized to access, avoid shared machines, protect any .env files and cookie jars, and do not share raw outputs. The document download command should be changed to allow only HTTPS URLs on the same district portal host before sending cookies or XSRF tokens.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
references/endpoints.md:140
Finding
Authentication Material Forwarded to an Untrusted Document URL<![CDATA[ ## Vulnerability Details **File Location**: `references/endpoints.md:140-146` **Vulnerability Type**: Cross-origin disclosure of authentication material **Risk Level**: High ### Vulnerable Code ```sh ic_get "/campus/resources/portal/report/all?personID=$PID" \ | jq '.[] | {name, type, url, moduleLabel, endYear}' # download (url may be relative /campus/... or an absolute URL — handle both): DOC_URL='/campus/resources/portal/report/...' # from the .url field above curl -sS -b "$JAR" -H "X-XSRF-TOKEN: $XSRF" -o report-card.pdf \ "$( [[ "$DOC_URL" == http* ]] && echo "$DOC_URL" || echo "$IC_BASE_URL$DOC_URL" )" ``` ### Technical Analysis The document URL originates in a remote API response and may be an absolute URL. The recipe accepts any value beginning with `http` and passes it directly to `curl` while attaching the authenticated cookie jar and `X-XSRF-TOKEN` header. No validation ensures that the URL uses HTTPS or has the same scheme, hostname, and effective port as `IC_BASE_URL`. Consequently, an attacker-controlled absolute URL can receive the XSRF token because the header is added unconditionally. Curl normally applies cookie-domain rules to the cookie jar, which may prevent cookies from reaching an unrelated domain; however, cookies with sufficiently broad domain scope could still be sent to an attacker-controlled related host. The `http*` prefix test is not a security boundary and also permits plaintext HTTP URLs. This behavior exceeds the minimum privileges needed for document retrieval because portal authentication material should only be sent to the trusted district portal origin. ### Attack Path 1. An attacker compromises or influences a document metadata record returned by the portal, or otherwise causes its `url` field to contain an attacker-controlled absolute URL. 2. The user assigns that value to `DOC_URL` as instructed. 3. The `http*` check accepts the URL without validating its scheme or origin. 4. Curl requests the atta ...[truncated 1029 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Permit authenticated downloads only from the exact trusted portal origin: - Resolve relative paths against `IC_BASE_URL`. - Parse the resulting URL with a proper URL parser. - Require the `https` scheme. - Require an exact match of hostname and effective port with `IC_BASE_URL`. - Reject URLs containing user-information fields or otherwise malformed components. 2. Never attach `$JAR` or `X-XSRF-TOKEN` to a cross-origin request. If cross-origin document hosting is an intentional platform feature, use a documented allowlist and omit portal credentials unless the destination explicitly requires a separate, narrowly scoped credential. 3. Do not use a shell prefix check such as `[[ "$DOC_URL" == http* ]]` as URL validation. 4. Configure curl defensively: - Use `--proto '=https'`. - Avoid forwarding credentials across redirects, and validate the final destination before allowing redirects. - Use `--fail-with-body` and appropriate timeouts. - Store downloads with restrictive file permissions. 5. Apply equivalent same-origin validation to every API-provided URL before combining it with authenticated request headers. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill instructs users to use real Infinite Campus portal credentials and suggests reusing a repo .env or host secret store, but it does not explicitly warn that environment variables and local .env files can expose highly sensitive credentials through shell history, process inspection, accidental commits, logs, or weak local secret handling. In this context, the credentials grant access to student and family education records, so omission of handling guidance materially increases the risk of credential disclosure and downstream privacy compromise.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill provides a direct recipe to download student documents to a local file but does not warn that the output may contain sensitive educational records and will persist on disk where it can be exposed via backups, shared workstations, malware, or improper file permissions. Because the skill targets parent-portal data, these files may include especially sensitive student documents, making silent local persistence a meaningful privacy and data-handling risk.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The file provides detailed commands to retrieve grades, attendance, messages, documents, assessments, and fees for students using real authenticated parent-portal sessions, but it does so without explicit privacy and data-handling warnings. In a skill centered on direct access to education records, omission of sensitivity guidance increases the likelihood of mishandling FERPA-sensitive data, unsafe storage, casual sharing, or use on unmanaged machines.

Context-Inappropriate Capability

Low
Confidence
78% confidence
Finding
The manifest emphasizes querying Infinite Campus data directly with curl for grades, attendance, assignments, schedule, messages, documents, and fees. While listing documents fits that purpose, the example also performs a local file write (`-o report-card.pdf`), which is a separate capability not explicitly justified by the skill description's focus on querying API data.

Intent-Code Divergence

Low
Confidence
74% confidence
Finding
The section is labeled 'Not covered here (out of scope for this skill)', but it proceeds to describe the concrete linked-district discovery and switching sequence, including endpoint names and request flow. That documentation undermines the stated out-of-scope boundary by effectively instructing how to perform the excluded capability.

Static analysis

No suspicious patterns detected.