Back to skill

Security audit

SIGAA

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent SIGAA login and scraping helper, but it handles institutional passwords and sessions with weak destination validation and inaccurate credential-safety claims.

Install only if you trust the skill author and will set SIGAA_URL yourself to the exact HTTPS URL for your institution. Before using it with a real account, review or fix the login script so passwords are not exposed in curl process arguments and credential submissions are limited to approved SIGAA/CAS hosts. Avoid using this with reused passwords or professor accounts until those issues are addressed.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/sigaa_login.sh:57
Finding
Credentials Can Be Submitted to an Unvalidated or Cleartext Authentication Host<![CDATA[ ## Vulnerability Details **File Location**: `scripts/sigaa_login.sh`, lines 57–80 and 95–108 **Vulnerability Type**: Unvalidated credential destination **Risk Level**: High ### Vulnerable Code ```bash INITIAL_URL=$(curl -s -o /dev/null -w "%{url_effective}" -L \ -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \ -A "$AGENT" \ "${SIGAA_URL}/sigaa/verTelaLogin.do" 2>/dev/null) if echo "$INITIAL_URL" | grep -qiE "autenticacao|sso-server|/cas"; then LOGIN_PAGE=$(curl -s \ -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \ -A "$AGENT" "$INITIAL_URL") ACTION_PATH=$(echo "$LOGIN_PAGE" | grep -oP 'action="[^"]*"' | head -1 | sed 's/action="//;s/"//') LT=$(echo "$LOGIN_PAGE" | grep 'name="lt"' | grep -oP 'value="[^"]*"' | sed 's/value="//;s/"//') EXEC=$(echo "$LOGIN_PAGE" | grep 'name="execution"' | grep -oP 'value="[^"]*"' | sed 's/value="//;s/"//') CAS_BASE=$(echo "$INITIAL_URL" | grep -oP 'https?://[^/]+') FULL_ACTION="${CAS_BASE}${ACTION_PATH}" RESULT=$(curl -s -L \ -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \ -A "$AGENT" \ -X POST "$FULL_ACTION" \ --data-urlencode "username=${SIGAA_USER}" \ --data-urlencode "password=${SIGAA_PASSWORD}" \ ``` The direct-login branch similarly submits credentials to the unchecked `SIGAA_URL`: ```bash LOGIN_PAGE=$(curl -s \ -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \ -A "$AGENT" \ "${SIGAA_URL}/sigaa/verTelaLogin.do") RESULT=$(curl -s -L \ -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \ -A "$AGENT" \ -X POST "${SIGAA_URL}/sigaa/logar.do" \ -d "dispatch=logOn" \ --data-urlencode "user.login=${SIGAA_USER}" \ --data-urlencode "user.senha=${SIGAA_PASSWORD}" \ ``` ### Technical Analysis The script accepts `SIGAA_URL` without requiring HTTPS, validating its hostname, or checking it against the documented institution list. In the CAS branch, it follows redirects and treats a final URL as CAS solely when its text contains `autenticacao`, `sso-ser ...[truncated 2242 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require `SIGAA_URL` to use `https://`; reject HTTP and malformed URLs before making any request. 2. Normalize the URL and reject embedded credentials, fragments, unexpected ports, and ambiguous host representations. 3. Maintain an explicit mapping from each supported SIGAA hostname to its authorized CAS hostname. 4. For unlisted institutions, require explicit user approval of both normalized hostnames before credentials are submitted. 5. Do not infer trust from path or hostname substrings such as `/cas` or `autenticacao`. 6. Validate that the CAS form action resolves to the approved CAS origin. Reject protocol-relative, cross-origin, malformed, or cleartext actions. 7. Process redirects one at a time and validate every `Location` destination against the approved SIGAA/CAS origins. 8. Set appropriate connection and request timeouts and use `curl --fail-with-body --show-error` so transport failures are not mistaken for successful authentication. 9. Document the exact credential recipients before login and display them for user confirmation when an unknown institution is configured. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sigaa_login.sh:75
Finding
Password Is Exposed in the curl Process Command Line<![CDATA[ ## Vulnerability Details **File Location**: `scripts/sigaa_login.sh`, lines 75–84 and 102–110 **Vulnerability Type**: Sensitive information exposure through process arguments **Risk Level**: Medium ### Vulnerable Code CAS authentication expands the password into a `curl` argument: ```bash RESULT=$(curl -s -L \ -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \ -A "$AGENT" \ -X POST "$FULL_ACTION" \ --data-urlencode "username=${SIGAA_USER}" \ --data-urlencode "password=${SIGAA_PASSWORD}" \ --data-urlencode "lt=${LT}" \ --data-urlencode "execution=${EXEC}" \ -d "_eventId=submit" \ -w "\n__FINAL_URL__:%{url_effective}") ``` Direct authentication has the same issue: ```bash RESULT=$(curl -s -L \ -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \ -A "$AGENT" \ -X POST "${SIGAA_URL}/sigaa/logar.do" \ -d "dispatch=logOn" \ --data-urlencode "user.login=${SIGAA_USER}" \ --data-urlencode "user.senha=${SIGAA_PASSWORD}" \ --data-urlencode "javax.faces.ViewState=${VS}" \ -w "\n__FINAL_URL__:%{url_effective}") ``` ### Technical Analysis The project documentation states that credentials are used through environment variables and are “never CLI args.” However, shell expansion occurs before `curl` starts. The expanded strings therefore become arguments in the `curl` process command line. Depending on operating-system process visibility and local monitoring configuration, command-line arguments can be exposed through process inspection interfaces, process-listing tools, audit services, tracing tools, or monitoring agents. Clearing `SIGAA_PASSWORD` after login does not remove this transient exposure. The username and password are legitimate inputs to the authentication request, but placing the password in process arguments is unnecessary and conflicts with the Skill's stated security design. ### Attack Path 1. A local process or user with permission to observe command lines continuously monitors newly created processes. 2. The ...[truncated 893 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not include credentials in `curl` arguments, URLs, headers, or command-line configuration options. 2. Construct the URL-encoded request body and provide it to `curl` through standard input, using a form that does not place the secret in argv. 3. Prefer a small helper that performs correct form encoding and writes the complete request body directly to the `curl` process through a pipe. 4. Ensure temporary files are not used for plaintext passwords. If unavoidable, create them atomically with mode `0600`, store them outside shared paths, and securely remove them immediately. 5. Minimize the period for which `SIGAA_PASSWORD` remains exported. Prefer reading it into a non-exported shell variable immediately before authentication. 6. Continue unsetting the password after use, but treat that only as defense in depth rather than a remedy for argv exposure. 7. Correct the inaccurate “never CLI args” statements in `README.md` and `SKILL.md` until the implementation is fixed. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sigaa_login.sh:75
Finding
Credential-Bearing POST Requests Follow Unrestricted Redirects<![CDATA[ ## Vulnerability Details **File Location**: `scripts/sigaa_login.sh`, lines 75–84 and 102–110 **Vulnerability Type**: Sensitive request replay across unvalidated redirects **Risk Level**: Medium ### Vulnerable Code The CAS request combines automatic redirect following with an explicitly selected POST method and credential-bearing form data: ```bash RESULT=$(curl -s -L \ -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \ -A "$AGENT" \ -X POST "$FULL_ACTION" \ --data-urlencode "username=${SIGAA_USER}" \ --data-urlencode "password=${SIGAA_PASSWORD}" \ --data-urlencode "lt=${LT}" \ --data-urlencode "execution=${EXEC}" \ -d "_eventId=submit" \ -w "\n__FINAL_URL__:%{url_effective}") ``` The direct-login request uses the same redirect behavior: ```bash RESULT=$(curl -s -L \ -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \ -A "$AGENT" \ -X POST "${SIGAA_URL}/sigaa/logar.do" \ -d "dispatch=logOn" \ --data-urlencode "user.login=${SIGAA_USER}" \ --data-urlencode "user.senha=${SIGAA_PASSWORD}" \ --data-urlencode "javax.faces.ViewState=${VS}" \ -w "\n__FINAL_URL__:%{url_effective}") ``` ### Technical Analysis The `-L` option allows `curl` to follow redirects automatically, while `-X POST` explicitly controls the request method. Redirect behavior varies by status code, but redirects such as HTTP 307 and 308 preserve the method and request body. The current implementation does not inspect or approve redirect destinations before following them. An authentication endpoint, compromised intermediary, or attacker-controlled fake endpoint can therefore return a body-preserving redirect to another origin. The credential-bearing form body may then be replayed to that destination. Even for redirect responses that alter or omit the body, unrestricted redirect handling remains unsafe during authentication because the script does not enforce the expected SIGAA-to-CAS trust relationship before continuing. ### Attack Path 1. The victi ...[truncated 1183 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not use unrestricted `-L` on a request containing credentials. 2. Submit credentials once without automatic redirect following. 3. Capture the response status and `Location` header. 4. Resolve and normalize the redirect target, then validate its scheme, hostname, port, and expected path against the authorized institution/CAS mapping. 5. Follow the approved post-authentication redirect with a separate request that contains no username or password. 6. Reject HTTP 307 and 308 redirects from credential-submission endpoints unless the destination is the same approved origin and replay is explicitly required by the known protocol. 7. Apply a small, explicit maximum redirect count and reject redirect loops. 8. Add automated tests covering cross-origin 301, 302, 303, 307, and 308 responses to verify that credentials are never sent to an unauthorized destination. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (16)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- 🎓 **Student Portal**: enrollment status, grades, academic history, class schedule
- 👨🏫 **Professor Portal**: class management, attendance, grade entry
- 🏛️ **Multi-institution**: UNB, UFRN, UFC, UFPE, UFCG, UFPI, UFRRJ, and 40+ more
- 🔒 **Security-first**: cookies chmod 600 + auto-deleted on exit, password cleared from env after login, rate limiting built-in

## Supported Institutions
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- 🎓 **Student Portal**: enrollment status, grades, academic history, class schedule
- 👨🏫 **Professor Portal**: class management, attendance, grade entry
- 🏛️ **Multi-institution**: UNB, UFRN, UFC, UFPE, UFCG, UFPI, UFRRJ, and 40+ more
- 🔒 **Security-first**: cookies chmod 600 + auto-deleted on exit, password cleared from env after login, rate limiting built-in

## Supported Institutions
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- 🎓 **Student Portal**: enrollment status, grades, academic history, class schedule
- 👨🏫 **Professor Portal**: class management, attendance, grade entry
- 🏛️ **Multi-institution**: UNB, UFRN, UFC, UFPE, UFCG, UFPI, UFRRJ, and 40+ more
- 🔒 **Security-first**: cookies chmod 600 + auto-deleted on exit, password cleared from env after login, rate limiting built-in

## Supported Institutions
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- 🎓 **Student Portal**: enrollment status, grades, academic history, class schedule
- 👨🏫 **Professor Portal**: class management, attendance, grade entry
- 🏛️ **Multi-institution**: UNB, UFRN, UFC, UFPE, UFCG, UFPI, UFRRJ, and 40+ more
- 🔒 **Security-first**: cookies chmod 600 + auto-deleted on exit, password cleared from env after login, rate limiting built-in

## Supported Institutions
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- 🎓 **Student Portal**: enrollment status, grades, academic history, class schedule
- 👨🏫 **Professor Portal**: class management, attendance, grade entry
- 🏛️ **Multi-institution**: UNB, UFRN, UFC, UFPE, UFCG, UFPI, UFRRJ, and 40+ more
- 🔒 **Security-first**: cookies chmod 600 + auto-deleted on exit, password cleared from env after login, rate limiting built-in

## Supported Institutions
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- 🎓 **Student Portal**: enrollment status, grades, academic history, class schedule
- 👨🏫 **Professor Portal**: class management, attendance, grade entry
- 🏛️ **Multi-institution**: UNB, UFRN, UFC, UFPE, UFCG, UFPI, UFRRJ, and 40+ more
- 🔒 **Security-first**: cookies chmod 600 + auto-deleted on exit, password cleared from env after login, rate limiting built-in

## Supported Institutions
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill clearly expects shell execution (`source`, `bash`, `curl`, `python3`) yet does not declare an explicit tool scope such as permissions or allowed-tools. In an agent environment, this weakens policy boundaries and can allow broader command execution than reviewers or orchestrators expect, which is especially sensitive because the skill handles live institutional credentials and authenticated sessions.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
source scripts/sigaa_login.sh
# Sets $SIGAA_COOKIE_FILE and $SIGAA_USER_ID
# Cookie file is chmod 600 and auto-removed on shell exit
```

### 2. Student Operations
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

External Transmission

Medium
Category
Data Exfiltration
Content
"${SIGAA_URL}/sigaa/portais/discente/discente.jsf" | \
  grep -oP 'name="javax\.faces\.ViewState"[^>]*value="\K[^"]+' | head -1)

curl -s -L -b "$SIGAA_COOKIE_FILE" -c "$SIGAA_COOKIE_FILE" \
  -X POST "${SIGAA_URL}/sigaa/portais/discente/discente.jsf" \
  -d "menu%3Aform_menu_discente=menu%3Aform_menu_discente" \
  -d "id=${SIGAA_USER_ID}" \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
This markdown file provides step-by-step login automation details, including extraction and submission of credentials, tokens, and session cookies. Because the content describes processing sensitive authentication data, the skill description should include a clear warning about credential handling and privacy/security implications.

External Transmission

Medium
Category
Data Exfiltration
Content
CAS_BASE=$(echo "$INITIAL_URL" | grep -oP 'https?://[^/]+')
  FULL_ACTION="${CAS_BASE}${ACTION_PATH}"

  RESULT=$(curl -s -L \
    -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \
    -A "$AGENT" \
    -X POST "$FULL_ACTION" \
Confidence
90% confidence
Finding
The script transmits SIGAA credentials to a remote authentication endpoint, which is inherently sensitive because usernames and passwords leave the local environment and are sent over the network. This is expected for a login helper, but it becomes dangerous because the destination is derived from attacker-controllable HTML/redirect data and the script does not enforce strong origin validation or HTTPS-only constraints, so credentials could be posted to an unexpected host if SIGAA_URL or the login flow is tampered with.

External Transmission

Medium
Category
Data Exfiltration
Content
VS=$(echo "$LOGIN_PAGE" | grep -oP 'name="javax\.faces\.ViewState"[^>]*value="\K[^"]+' | head -1)

  RESULT=$(curl -s -L \
    -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \
    -A "$AGENT" \
    -X POST "${SIGAA_URL}/sigaa/logar.do" \
Confidence
80% confidence
Finding
This direct-login branch sends the user's password to the configured SIGAA endpoint, so compromise or misconfiguration of SIGAA_URL can expose credentials to an arbitrary server. While credential transmission is necessary for authentication, the script does not validate that SIGAA_URL is an expected trusted HTTPS endpoint, which increases the risk of credential exfiltration in an agent context where environment variables may be influenced externally.

Missing User Warnings

Medium
Confidence
82% confidence
Finding
This shell script performs multiple authenticated HTTP requests using the user's SIGAA cookie file and user ID, which transmits session and account-linked data to the remote portal. Although the header comments list required variables and actions, there is no explicit warning, confirmation, or user-facing disclosure that running the script will send authenticated requests and retrieve potentially sensitive class/student information.

External Transmission

Medium
Category
Data Exfiltration
Content
local vs
  vs=$(echo "$html" | grep -oP 'name="javax\.faces\.ViewState"[^>]*value="\K[^"]+' | head -1)
  sleep 0.5
  curl -s -L -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \
    -A "$AGENT" \
    -X POST "${SIGAA_BASE_URL}/sigaa/verPortalDocente.do" \
    -d "menu%3Aform_menu_docente=menu%3Aform_menu_docente" \
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The helper functions perform authenticated HTTP requests using the student's session cookie and user ID to retrieve portal data, but the script provides no user-facing warning about sending personal academic information over the network. While the file comments describe actions, they do not disclose the network access or use of authenticated session state.

External Transmission

Medium
Category
Data Exfiltration
Content
vs=$(echo "$html" | grep -oP 'name="javax\.faces\.ViewState"[^>]*value="\K[^"]+' | head -1)

  sleep 0.5
  curl -s -L -c "$SIGAA_COOKIE_FILE" -b "$SIGAA_COOKIE_FILE" \
    -A "$AGENT" \
    -X POST "${SIGAA_BASE_URL}/sigaa/portais/discente/discente.jsf" \
    -d "menu%3Aform_menu_discente=menu%3Aform_menu_discente" \
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.