Back to skill

Security audit

outlook-calendar

Security checks for vulnerabilities and agentic risk

Overview

This is a transparent Outlook calendar helper that uses Microsoft Graph with disclosed local token storage and explicit controls for calendar writes and deletes.

Install only if you are comfortable granting this skill offline_access, User.Read, and Calendars.ReadWrite for your Microsoft account. Treat ~/.outlook-calendar/ as sensitive, prefer interactive confirmation for real writes/deletes, and revoke or clear the token store when you no longer need the skill.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (42)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

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

md
…and removes the temporary `device.json`.

> **Important:** never commit `~/.outlook-calendar/` to git. The `setup-device-code.sh`
> script refuses to overwrite existing files unless you pass `--force`.

## Reading events

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `SKILL.md` | this file |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/calendar-write.sh (reported line 334)May include surrounding context.

sh
exit 0
    fi

    log_info "DELETE /me/events/$eid"
    # Graph returns 204 No Content on successful delete
    graph_request DELETE "/me/events/$eid" "" >/dev/null
    log_info "deleted."

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/calendar-write.sh (reported line 336)May include surrounding context.

sh
log_info "DELETE /me/events/$eid"
    # Graph returns 204 No Content on successful delete
    graph_request DELETE "/me/events/$eid" "" >/dev/null
    log_info "deleted."
}

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 216)May include surrounding context.

md
#!/usr/bin/env bash
# scripts/token.sh
# Inspect or refresh the Microsoft Graph access token used by outlook-calendar.
#
# Subcommands:
#   status    Show token presence & expiry (no token value ever printed).

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 · scripts/_lib.sh (reported line 232)May include surrounding context.

sh
#!/usr/bin/env bash
# scripts/token.sh
# Inspect or refresh the Microsoft Graph access token used by outlook-calendar.
#
# Subcommands:
#   status    Show token presence & expiry (no token value ever printed).

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 · scripts/_lib.sh (reported line 390)May include surrounding context.

sh
#!/usr/bin/env bash
# scripts/token.sh
# Inspect or refresh the Microsoft Graph access token used by outlook-calendar.
#
# Subcommands:
#   status    Show token presence & expiry (no token value ever printed).

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 · scripts/token.sh (reported line 3)May include surrounding context.

sh
#!/usr/bin/env bash
# scripts/token.sh
# Inspect or refresh the Microsoft Graph access token used by outlook-calendar.
#
# Subcommands:
#   status    Show token presence & expiry (no token value ever printed).

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 · scripts/token.sh (reported line 15)May include surrounding context.

sh
#!/usr/bin/env bash
# scripts/token.sh
# Inspect or refresh the Microsoft Graph access token used by outlook-calendar.
#
# Subcommands:
#   status    Show token presence & expiry (no token value ever printed).

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 · scripts/token.sh (reported line 31)May include surrounding context.

sh
#!/usr/bin/env bash
# scripts/token.sh
# Inspect or refresh the Microsoft Graph access token used by outlook-calendar.
#
# Subcommands:
#   status    Show token presence & expiry (no token value ever printed).

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 · scripts/token.sh (reported line 33)May include surrounding context.

sh
#!/usr/bin/env bash
# scripts/token.sh
# Inspect or refresh the Microsoft Graph access token used by outlook-calendar.
#
# Subcommands:
#   status    Show token presence & expiry (no token value ever printed).

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 · tests/test-local.sh (reported line 353)May include surrounding context.

sh
#!/usr/bin/env bash
# scripts/token.sh
# Inspect or refresh the Microsoft Graph access token used by outlook-calendar.
#
# Subcommands:
#   status    Show token presence & expiry (no token value ever printed).

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 · tests/test-local.sh (reported line 382)May include surrounding context.

sh
#!/usr/bin/env bash
# scripts/token.sh
# Inspect or refresh the Microsoft Graph access token used by outlook-calendar.
#
# Subcommands:
#   status    Show token presence & expiry (no token value ever printed).

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 · tests/test-local.sh (reported line 388)May include surrounding context.

sh
#!/usr/bin/env bash
# scripts/token.sh
# Inspect or refresh the Microsoft Graph access token used by outlook-calendar.
#
# Subcommands:
#   status    Show token presence & expiry (no token value ever printed).

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 · tests/test-local.sh (reported line 391)May include surrounding context.

sh
#!/usr/bin/env bash
# scripts/token.sh
# Inspect or refresh the Microsoft Graph access token used by outlook-calendar.
#
# Subcommands:
#   status    Show token presence & expiry (no token value ever printed).

Scope Creep

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script documentation explicitly states that status uses User.Read to validate the token, indicating the skill depends on a permission outside its declared calendar-only access model. This is dangerous because it grants unnecessary access to user profile information and undermines least-privilege expectations for a calendar-scoped skill.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · tests/test-local.sh (reported line 83)May include surrounding context.

sh
printf '  \033[33m…\033[0m shellcheck: %s has advisories (see /tmp/sc.%s)\n' "$s" "$$"
        fi
    done
    rm -f /tmp/sc.$$
else
    printf '  (shellcheck not installed; skipping)\n'
fi

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
89% confidence
Finding

The skill intentionally persists OAuth credentials in its own token store so it can continue accessing the user's calendar without repeating interactive login. Persistent refresh-token storage creates a standing credential target: if the local account, home directory, backups, or endpoint are compromised, an attacker may be able to obtain ongoing calendar read/write access until the token is revoked.

Content

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

md
name: outlook-calendar
license: MIT
description: |
  Read and write the signed-in user's Microsoft 365 / Outlook.com personal calendar via Microsoft Graph.
  Calendar API surface only with a calendar-scoped device-code login and its own token store.
  Use when the user wants to list today's events, look at next week, create / update / delete
  a single event by id, or check token status. Trigger keywords: "outlook calendar", "ms calendar",

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
## ⚠️ Safety rules (read these before any write/delete)

1. **Every write is a two-step confirm.** `calendar-write.sh` defaults to **dry-run**: it
   prints the JSON payload it *would* send and exits 0. To actually call Graph you must
   pass **`--apply`**, and the script will then ask you to type `YES` at the terminal
   (or pass `--yes` for non-interactive use). There is no implicit write and **no

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
3. **No secrets in logs.** `access_token` and `refresh_token` are never echoed to stdout
   or stderr. Error responses are sanitized: any field whose name contains
   `token`, `refresh`, `access`, `secret`, or `password` is replaced with `[REDACTED]`.
4. **Token & config live under `~/.outlook-calendar/`** (chmod 700 dir, chmod 600 files).
   The `clear` subcommand of `token.sh` removes them — it requires `--yes-i-really-mean-it`.

## First-time setup

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/_lib.sh (reported line 80)May include surrounding context.

sh
3. **No secrets in logs.** `access_token` and `refresh_token` are never echoed to stdout
   or stderr. Error responses are sanitized: any field whose name contains
   `token`, `refresh`, `access`, `secret`, or `password` is replaced with `[REDACTED]`.
4. **Token & config live under `~/.outlook-calendar/`** (chmod 700 dir, chmod 600 files).
   The `clear` subcommand of `token.sh` removes them — it requires `--yes-i-really-mean-it`.

## First-time setup

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/_lib.sh (reported line 81)May include surrounding context.

sh
3. **No secrets in logs.** `access_token` and `refresh_token` are never echoed to stdout
   or stderr. Error responses are sanitized: any field whose name contains
   `token`, `refresh`, `access`, `secret`, or `password` is replaced with `[REDACTED]`.
4. **Token & config live under `~/.outlook-calendar/`** (chmod 700 dir, chmod 600 files).
   The `clear` subcommand of `token.sh` removes them — it requires `--yes-i-really-mean-it`.

## First-time setup

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/_lib.sh (reported line 82)May include surrounding context.

sh
3. **No secrets in logs.** `access_token` and `refresh_token` are never echoed to stdout
   or stderr. Error responses are sanitized: any field whose name contains
   `token`, `refresh`, `access`, `secret`, or `password` is replaced with `[REDACTED]`.
4. **Token & config live under `~/.outlook-calendar/`** (chmod 700 dir, chmod 600 files).
   The `clear` subcommand of `token.sh` removes them — it requires `--yes-i-really-mean-it`.

## First-time setup

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · tests/test-local.sh (reported line 346)May include surrounding context.

sh
3. **No secrets in logs.** `access_token` and `refresh_token` are never echoed to stdout
   or stderr. Error responses are sanitized: any field whose name contains
   `token`, `refresh`, `access`, `secret`, or `password` is replaced with `[REDACTED]`.
4. **Token & config live under `~/.outlook-calendar/`** (chmod 700 dir, chmod 600 files).
   The `clear` subcommand of `token.sh` removes them — it requires `--yes-i-really-mean-it`.

## First-time setup

Static analysis

No suspicious patterns detected.