Skip to content

Security: zs-andy/lms-cli

SECURITY.md

Security and privacy boundaries

Reporting a vulnerability

Do not open a public issue containing exploit details, credentials or student data. Use GitHub private vulnerability reporting. If that entry is unavailable, contact the maintainer through their GitHub profile to arrange a private channel before sending details. Ordinary bug reports should use synthetic data.

The initial public version is a preview, not a school-certified or independently security-audited integration. See PRIVACY.md for user-facing data handling information.

Boundaries

  • The school owns authentication and MFA. This is user-driven session authorization, not a registered institutional OAuth integration and not an authentication bypass. Some institutions prohibit or block embedded login; honor that policy. Canvas personal tokens are optional only where institution policy allows them.
  • Login uses an isolated Electron session. When the user enables remember-password, the app may retain its own isolated persistent Chromium partition for that exact profile/platform so a school “remember this device” decision can survive the next launch; disabling the option clears that partition. Remote windows are sandboxed, have no Node access, reject non-HTTPS navigation and certificate exceptions, and cannot invoke the local controller's IPC. Popups use the same hardened preferences. Downloads and permission requests are denied. A narrow isolated preload supports opt-in password capture/fill; it exposes no bridge to page JavaScript. IPC verifies the registered authorization window and its top-level sender frame.
  • Remember-password and automatic-login are explicitly marked experimental, default off, and scoped to profile/platform/origins. User-submitted HTTPS POST login forms with one username and one password, or two exact username/password steps, are supported; exact page, action and field identities are persisted, including a cross-origin action only when it was part of that verified form. Password-change, CAPTCHA and ambiguous forms are excluded from password automation. Saved passwords are filled only for the exact captured HTTPS page and recorded action path, with no query/SSO state persisted. Each captured password form, username/password step or one-time-code form is automatically attempted at most once per authorization attempt. If the user explicitly imports an institution-issued TOTP seed through lms auth totp --stdin, a one-time-code page is allowed only when both page and action origins are already in the verified login chain; push approvals, CAPTCHA and other MFA remain manual. The seed is kept in the encrypted vault and never logged or sent upstream. Opt-out deletes the saved password and automatic-login consent. No unrelated browser password/session store is read.
  • The helper selects reviewed Canvas/Blackboard Cookie names matching the configured LMS origin/API path. The encrypted API credential record excludes identity-provider cookies; the separately consented app browser partition can retain the school's own login cookies so its trusted-device behavior works like a browser. Passwords are persisted only after explicit consent and successful read-only platform identity validation, encrypted through the same OS-key-backed vault, never in configuration, logs, public tool responses or model prompts. Silent renewal forever is not promised.
  • AES-256-GCM encrypts credentials and saved local tasks. The random master key is stored through OS credential services: macOS Keychain, Windows Credential Manager, or Linux Secret Service. There is no plaintext/key-file fallback. Locked/unavailable keychains fail closed. POSIX modes are best-effort hardening, not a Windows ACL claim. Protect the OS account, disk and backups.
  • The encrypted envelope binds the school/account/platform and session generation. Atomic locked writes prevent data loss; a stale worker cannot restore logged-out credentials or overwrite new authorization. Logging out locally deletes that platform's encrypted session, remembered password/options and TOTP seed; the next authorization launch also clears the old per-profile browser partition. This does not revoke the school's server-side session.
  • Tool responses are cached only in memory for 60 seconds. Errors are never cached or silently replaced by stale success. Upstream process stderr and raw error bodies are suppressed. doctor never reads credential contents. Do not submit real Cookies, HARs, passwords or private course documents in bug reports.
  • Read-only means no assignment/exam submission, quiz start/save, message sending, marking-read/reviewed, raw requests, or caller-chosen download destinations. Upstream file readers may save requested files beneath the profile's private downloads directory; downloaded documents are plaintext and are not erased by logout. Auth/session bookkeeping and school access logs are normal read side effects.
  • ask invokes the user's existing Codex CLI; relevant LMS content is processed by that configured service/account. No separate model API key is stored by this project. It uses an isolated temporary workspace, ignores unrelated Codex configuration, disables shell/browser/computer tools and uses read-only sandboxing. Temporary prompt/output workspace is removed afterward; the model provider's retention policies still apply. Content supplied by teachers/documents is untrusted input, never privileged instructions.
  • Settings, sessions and tasks are not bundled. New state defaults to the OS application-data directory; LMS_HOME overrides it. Public setup supports custom Canvas/Blackboard origins and retains an optional PolyU preset. Profiles and 0.2.0 state remain compatible; old prototype browser credentials are neither auto-read nor erased. A configured profile or successful identity/course-list probe is not certification of all features or institutions.
  • School origins are user-controlled trust boundaries: verify the actual HTTPS LMS origin before login. Paths, query strings and embedded URL credentials are rejected; some subpath/proxy deployments are therefore unsupported. Course content must never instruct the Agent to add an origin, change profiles or send data to another school. This is a local per-user client, not an SSRF-hardened public multi-tenant service; do not expose its MCP or configuration tools to unauthenticated remote clients.
  • Online discovery contacts the fixed public Canvas directory without credentials. Results are untrusted metadata: bound response size, sanitize names, reject unsafe domains, deduplicate, and require user selection and origin/timezone confirmation before configuration. No public Blackboard directory is assumed. Discovery is not proof of institutional approval or API compatibility.
  • Automatic version checks use a fixed GitHub repository and fail softly. Installation requires confirmation and a matching release asset/checksum. The updater restricts redirects, bounds archive extraction, verifies the new runtime before switching the pointer, and retains the previous version. SHA-256 detects corruption but does not protect against a compromised release publisher; publisher account security and signing remain separate controls. Program updates do not read or migrate school credentials.
  • Profile creation and default selection are explicit local writes, separate from school-platform reads. Creating a second profile does not switch the default or overwrite credentials. Login jobs bind to the requested profile, and reauthorization waits for newly validated credentials rather than accepting an old saved session. The controller renders profile labels and URLs as text, never executable HTML.

Before public release: run the acceptance checklist on target operating systems and real allowed school tenants; sign/notarize installers with the distributor's certificates; verify dependency audits and the installed Codex version. Unsigned test artifacts are not a production trust assertion. Report security issues privately to the distributor, with synthetic reproductions and no credentials.

There aren't any published security advisories