Back to skill

Security audit

Widgetkit Code Review

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a normal WidgetKit review guide, but it requires an unbundled parent-directory protocol that can suppress review findings.

Review the external protocol dependency before installing. The WidgetKit guidance itself is ordinary documentation, but the skill should ideally bundle or pin the full verification checklist and avoid letting a missing or mutable sibling file suppress valid findings.

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
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:47
Finding

External Instruction Redirection Can Hijack or Suppress Audit Results

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:47-56
Vulnerability Type: External instruction dependency with finding-suppression authority
Risk Level: High

Vulnerable Code

markdown
## Hard gates (before reporting)

Complete **in order** for each finding you intend to report. Do not advance until the pass condition is satisfied.

1. **Location artifact** — The finding includes `[FILE:LINE]` (or a line range) copied from the current file contents; the path resolves in this repo.
2. **Scope read** — You read the full surrounding implementation: the `TimelineProvider` (including `placeholder`, `getSnapshot`, and `getTimeline` when relevant), the `@main` `Widget` / widget bundle, or the configurable widget’s `AppIntentConfiguration` / intent types—not only a diff hunk or snippet.
3. **Platform or system claim** (only if the finding depends on refresh budget, ~30MB memory guidance, Lock Screen accessory families, iOS 17+ `containerBackground`, App Groups data sharing, or migration from `IntentConfiguration` to `AppIntentConfiguration`) — You name one concrete artifact you inspected (for example `.entitlements` / App Group id in project, `WidgetFamily` handling in source, `IPHONEOS_DEPLOYMENT_TARGET`, or the exact reference subsection you used) **or** you drop or downgrade the finding to an open question.
4. **Protocol** — Pre-report steps in [review-verification-protocol](../review-verification-protocol/SKILL.md) are satisfied for this item (no finding if they are not).

Use the issue format `[FILE:LINE] ISSUE_TITLE` for each reported finding. Hard gate 4 is the full pre-report checklist for this skill’s review type.

Technical Analysis

The Skill makes compliance with ../review-verification-protocol/SKILL.md a mandatory prerequisite for reporting findings. This path resolves outside the audited Skill directory, and the referenced file is not included in the project contents reviewed during this audit. Its integrity, ownership, and ...[truncated 2632 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the mandatory dependency on ../review-verification-protocol/SKILL.md.
  2. Place the complete verification checklist directly inside this project so all effective instructions are included in the reviewable artifact.
  3. Remove the unconditional “no finding if they are not” directive. Verification failures should be reported transparently as limitations rather than silently suppressing otherwise supported findings.
  4. If shared guidance is unavoidable, load it only from a trusted, immutable, version-pinned source whose integrity is verified before use.
  5. Restrict referenced files to the Skill’s own directory and reject paths containing parent-directory traversal such as ../.
  6. State explicitly that supplemental guidance cannot override system instructions, developer instructions, user requirements, tool restrictions, or independently supported security findings.
  7. Treat unavailable or unverifiable external guidance as non-authoritative and continue the review using the locally documented checklist.
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 (1)

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 · references/performance.md (reported line 121)May include surrounding context.

Image(uiImage: mapSnapshot)

text

### Keychain Access

Keychain can fail with `errSecInteractionNotAllowed` after extended periods. Use App Groups instead.

Static analysis

No suspicious patterns detected.