Back to skill

Security audit

Outlook

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed Microsoft 365 CLI integration, but it should go through Review because it installs an unpinned third-party executable that will handle OAuth-protected mail and OneDrive data.

Install only if you trust the olk maintainer and Homebrew tap. Before authenticating, verify the release source where possible, grant the minimum Microsoft scopes needed, avoid delegated mailbox scopes unless required, and use OLK_NO_WRITE, OLK_NO_SEND, OLK_NO_INPUT, and exact command allowlists for unattended agent use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:10
Finding
Unpinned Executable Installation from a Third-Party Homebrew Tap## Vulnerability Details **File Location**: `SKILL.md`, lines 10–18 **Vulnerability Type**: Supply-chain risk from an unpinned third-party dependency **Risk Level**: Medium ### Vulnerable Code ```yaml "install": [ { "id": "brew", "kind": "brew", "formula": "rlrghb/tap/olk", "bins": ["olk"], "label": "Install olk (Homebrew)", }, ], ``` ### Technical Analysis The Skill installs the `olk` executable from the custom Homebrew tap `rlrghb/tap`. It does not pin an immutable version, commit, artifact digest, or cryptographic signature. Consequently, the executable resolved during installation or a later upgrade may differ from the version originally reviewed. This is particularly sensitive because the Skill directs users to grant the executable OAuth access to Microsoft 365 data, including email, calendars, contacts, tasks, organizational directory information, delegated mailboxes, and OneDrive files. Although the documented network transfers match the Skill's declared functionality, the source and integrity of the executable performing those transfers are not established by the Skill package. No evidence shows that the current package is malicious. The vulnerability is the absence of dependency integrity controls around a privileged, externally maintained executable. ### Attack Path 1. An attacker compromises the custom Homebrew tap, its maintainer account, the formula, or a release artifact referenced by the formula. 2. The attacker publishes a modified `olk` binary or changes the formula to retrieve a malicious artifact. 3. A user or agent installs or upgrades `olk` through the mutable `rlrghb/tap/olk` reference. 4. The substituted executable is invoked for authentication or Microsoft 365 operations. 5. The malicious executable accesses OAuth credentials or authorized Microsoft 365 data. 6. It can transmit data or perform mutations using the permissions granted by the user, independently of the behavioral safeguards ...[truncated 960 chars]
Remediation
## Remediation Suggestions 1. Pin installation to a specific reviewed release rather than a mutable formula reference. 2. Pin the underlying source commit or release artifact using an immutable identifier. 3. Verify the downloaded artifact with a published SHA-256 or stronger cryptographic digest. 4. Prefer signed releases and verify signatures against a documented, trusted maintainer key. 5. Record the expected artifact source, version, digest, and signature-verification procedure in the Skill. 6. Prefer a trusted package registry or independently reviewed distribution channel where practical. 7. Audit the executable's source and build process before granting OAuth access. 8. Request only the Microsoft Graph scopes necessary for the immediate task. 9. Default unattended use to `OLK_NO_WRITE=1`, `OLK_NO_SEND=1`, `OLK_NO_INPUT=1`, and an exact command allowlist. 10. Separate read-only and write-enabled accounts or tokens where operationally possible, and avoid delegated mailbox scopes unless explicitly required.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
| `--mailbox EMAIL` | `OLK_MAILBOX` | Target another user's mailbox (delegated read; mail/calendar/contacts). Needs the matching `.Shared` scope + Exchange Full Access |
| `--results-only` | `OLK_RESULTS_ONLY` | Unwrap JSON envelope |
| `--select FIELDS` | `OLK_SELECT` | Command-specific field projection; `mail list --json` projects both the Graph request and JSON result |
| `--force` | `OLK_FORCE` | Skip confirmations |
| `--dry-run` | `OLK_DRY_RUN` | Preview without executing |
| `-v, --verbose` | `OLK_VERBOSE` | Verbose output |
| `--color auto\|never\|always` | `OLK_COLOR` | Color mode |
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Excessive Permissions

Low
Category
Privilege Escalation
Content
- **Send As** or **Send on Behalf Of** on the mailbox in Exchange; and
- **Full Access** on the mailbox.

Holding one tells you nothing about the others. Full Access alone grants no right to send, and Send As alone is not enough either: [Microsoft requires Full Access for `/users/{mailbox}/sendMail`](https://learn.microsoft.com/en-us/graph/outlook-send-mail-from-other-user), which is the endpoint `olk` uses so that the sent copy lands by default in the shared mailbox's Sent Items rather than yours. Without all three, `mail send --mailbox` fails. Which one is missing is usually not recoverable from the error — Graph often answers a bare `Access is denied`, and even the more specific `ErrorSendAsDenied` speaks only to the sending delegation — so the failure lists all three for you to check against. Immediate `mail reply` and `mail forward` need the same three grants because they read the original from that mailbox before sending as it — and the message ID must be one listed from that mailbox, since IDs are scoped to the mailbox they came from.

`mail reply --draft --mailbox` does not send. It creates the threaded reply in
the shared mailbox and needs `Mail.ReadWrite.Shared` plus Exchange Full Access,
Confidence
70% confidence
Finding
Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.

Static analysis

No suspicious patterns detected.