Back to skill

Security audit

Course

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for a PKU Blackboard CLI, but it tells agents to use stored credentials for automatic login and persist a session without clearly requiring user approval for sensitive account access.

Review this skill carefully before installing. It appears purpose-built for PKU Blackboard work, but installing it may lead an agent to authenticate with your stored account credentials and keep a Blackboard session on disk. Use it only when you want live account access, prefer logout after use, and confirm manually before submissions, OTP changes, or other account-changing actions.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:44
Finding

AI-Agent Auto-Login Uses Stored Credentials and Persists an Authenticated Session

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 44–51 and 61–62
Vulnerability Type: Automated use of stored credentials without a documented per-login authorization boundary
Risk Level: Medium

The skill explicitly instructs AI agents to authenticate to the Blackboard teaching platform using credentials obtained from the operating-system keyring or environment. It also states that the authenticated session is persisted in the user's home directory.

markdown
## Auto-Login for AI Agents

```bash
# Check session status
info-auth check

# Auto-login (reads credentials from OS keyring, no password needed)
course login -p
text

```markdown
- Session persisted to `~/.config/info/course/`
- Credentials resolved via `info_common::credential` (keyring → env → interactive)

Technical Analysis

The documented workflow gives an AI agent access to an authentication mechanism backed by stored user credentials. No password entry is required, and the skill does not require explicit user confirmation immediately before retrieving credentials or establishing the authenticated session.

This creates a least-privilege concern because tasks such as source-code debugging, HTML parser maintenance, or CLI feature development do not necessarily require access to the user's live teaching-platform account. Once authenticated, the documented CLI supports access to private courses, assignments, files, announcements, and recordings. It also supports state-changing operations such as assignment submission and TOTP management.

The environment-variable fallback further increases exposure because environment variables may be inherited by child processes or become accessible through debugging and process-inspection workflows. Session persistence can extend authenticated access beyond the command that established it. The reviewed file does not document session expiry, file permissions, command-speci ...[truncated 1863 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove automatic login as the default workflow for AI agents.
  2. Require explicit, informed user confirmation immediately before accessing the keyring, reading credential-bearing environment variables, or initiating authentication.
  3. Clearly distinguish offline development tasks from operations requiring a live account, and use fixtures or sanitized HTML samples for parser development and testing.
  4. Require a separate confirmation immediately before state-changing operations, especially assignment submission and TOTP management.
  5. Use short-lived, narrowly scoped sessions where the platform permits them, and document session expiry and revocation behavior.
  6. Store session material with restrictive owner-only filesystem permissions and reject session files with unsafe ownership or permissions.
  7. Avoid environment-variable credential fallback where practical. If retained, document the exposure risks and prevent credentials from appearing in logs, diagnostics, command output, or child-process environments.
  8. Provide a logout or session-revocation step at the end of agent-driven workflows.
  9. Display the target account and intended operation before authentication so the user can verify the authorization scope.
  10. Add audit logging for authentication and sensitive account operations without recording passwords, TOTP seeds, session cookies, or other secrets.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 50)May include surrounding context.

Check session status

info-auth check

Auto-login (reads credentials from OS keyring, no password needed)

course login -p

text

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation states that all user-facing strings are in Chinese, which imposes a specific language choice on users and agents. This is a natural-language policy concern because no opt-in, alternative locale, or justification for a Chinese-only interface is provided in the file.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.