Back to skill

Security audit

swift-dev

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Swift/iOS/macOS development reference and does not show hidden execution, data theft, or deceptive behavior.

Install this as Apple development reference material, but treat commands involving App Store Connect Admin keys, notarization credentials, Xcode MCP always-allow settings, login items, Accessibility, and screen/audio capture permissions as sensitive and run them only when they match your project and account intent.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (126)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| New iOS app | XcodeGen `project.yml` (generated `.xcodeproj` gitignored) + logic in a local SPM package - `ios-project-setup.md` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| New iOS app | XcodeGen `project.yml` (generated `.xcodeproj` gitignored) + logic in a local SPM package - `ios-project-setup.md` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| New iOS app | XcodeGen `project.yml` (generated `.xcodeproj` gitignored) + logic in a local SPM package - `ios-project-setup.md` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| New Mac app | XcodeGen for a full app; a bare SPM executable only for CLIs and small agents (manual `.app` assembly in `spm-and-builds.md`) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| New Mac app | XcodeGen for a full app; a bare SPM executable only for CLIs and small agents (manual `.app` assembly in `spm-and-builds.md`) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| New Mac app | XcodeGen for a full app; a bare SPM executable only for CLIs and small agents (manual `.app` assembly in `spm-and-builds.md`) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Ship | iOS: `ios-distribution.md` (TestFlight, App Store). Mac: `macos-distribution.md` (Developer ID + notarization, Mac App Store) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Ship | iOS: `ios-distribution.md` (TestFlight, App Store). Mac: `macos-distribution.md` (Developer ID + notarization, Mac App Store) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| WindowGroup, scenePhase, NavigationStack, sheets, toolbars, Settings deep link, Liquid Glass | `ios-swiftui.md` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Table, sidebar, inspector, menus and commands, forms, popovers, 27-SDK SwiftUI changes | `macos-swiftui.md` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Shortcuts, drag and drop, bookmarks, AXUIElement, login items, XPC, logging, privacy strings | `macos-system-integration.md` |

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · references/concurrency-migration.md (reported line 58)May include surrounding context.

md
| `ApproachableConcurrency` | enables both `NonisolatedNonsendingByDefault` and `InferIsolatedConformances` (what `swift package init` emits on 6.4) | opt in |
| `ImmutableWeakCaptures` | explicit `[weak x]` captures are immutable, so they work in `@Sendable` closures (SE-0481) | on in Swift 7 |

A misspelled feature name is silently ignored - no warning on Swift 6.4. `swiftc -print-supported-features` is not a complete name list either: it omits `ApproachableConcurrency`, which the compiler accepts. Enabling a feature already implied by Swift 6 mode usually prints `upcoming feature 'X' already enabled as of the Swift 6 language mode` (`InferSendableFromCaptures` does); `StrictConcurrency` prints nothing.

## GCD, Combine and ObservableObject to async

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
85% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · references/concurrency-migration.md (reported line 271)May include surrounding context.

md
| [SE-0491](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0491-module-selectors.md) (6.3) | module selectors: `Foundation::Date`, `MyKit::Task` | - | disambiguates clashing names |
| SE-0519, 0517, 0527, 0516 | `Ref`/`MutableRef`, `UniqueBox`, `UniqueArray`, `Iterable` for noncopyable and copy-free code | iOS 27 / macOS 27 | performance work only |

Unused throwing tasks (SE-0520): `Task { try await save() }` now warns `unstructured throwing task created by 'init(name:priority:operation:)' is not used, which may accidentally ignore errors thrown inside the task [#NoUseUnstructuredThrowingTask]` - the error was always silently dropped. Handle it inside (`Task { do { try await save() } catch { report(error) } }`), keep the task and `try await task.value`, or discard on purpose with `_ = Task { ... }`. Non-throwing tasks do not warn.

**Swift 6.4 optimizer bug ([swift#92915](https://github.com/swiftlang/swift/issues/92915), open):** in `-O` / `-Osize` builds, a method of a *generic* actor that awaits `withTaskCancellationHandler { await withCheckedContinuation { ... } } onCancel: { ... }` resumes off the actor's executor - a `preconditionIsolated()` after the await aborts with `Incorrect actor executor assumption` (reproduced with `-O`; `-Onone` passes). Debug builds are fine, so it shows up only in Release and TestFlight. Workaround: keep that state behind a `Mutex` instead of relying on actor isolation across the call.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
75% confidence
Finding

Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.

Content

Scanner excerpt · references/ios-distribution.md (reported line 21)May include surrounding context.

md
| Channel | Export `method` | Signed with | Who can install | Review |
|---|---|---|---|---|
| Development | `debugging` | Apple Development + development profile | Registered devices with Developer Mode on | No |
| Ad hoc | `release-testing` | Apple Distribution + ad hoc profile | Registered devices (UDIDs in the profile) | No |
| TestFlight internal | `app-store-connect` | Apple Distribution + App Store Connect profile | Up to 100 App Store Connect users | No |
| TestFlight external | `app-store-connect` | same | Up to 10,000 by email or public link | Beta App Review on the first build |

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
75% confidence
Finding

Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.

Content

Scanner excerpt · references/ios-distribution.md (reported line 72)May include surrounding context.

Development install on your own phone

Prerequisites: the phone is paired, unlocked and has Developer Mode on (see ios-devices-and-signing.md).

bash
DEVICE=$(xcrun devicectl list devices --json-output - 2>/dev/null | jq -r '[.result.devices[]

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
75% confidence
Finding

Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.

Content

Scanner excerpt · references/ios-distribution.md (reported line 101)May include surrounding context.

Development install on your own phone

Prerequisites: the phone is paired, unlocked and has Developer Mode on (see ios-devices-and-signing.md).

bash
DEVICE=$(xcrun devicectl list devices --json-output - 2>/dev/null | jq -r '[.result.devices[]

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/keychain.md (reported line 21)May include surrounding context.

md
import Foundation
import Security

/// Generic-password items in the data protection keychain, the same store on iOS and macOS.
nonisolated enum Keychain {
    struct Failure: Error, CustomStringConvertible {
        let status: OSStatus

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/keychain.md (reported line 70)May include surrounding context.

md
import Foundation
import Security

/// Generic-password items in the data protection keychain, the same store on iOS and macOS.
nonisolated enum Keychain {
    struct Failure: Error, CustomStringConvertible {
        let status: OSStatus

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/keychain.md (reported line 114)May include surrounding context.

md
import Foundation
import Security

/// Generic-password items in the data protection keychain, the same store on iOS and macOS.
nonisolated enum Keychain {
    struct Failure: Error, CustomStringConvertible {
        let status: OSStatus

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/keychain.md (reported line 117)May include surrounding context.

md
import Foundation
import Security

/// Generic-password items in the data protection keychain, the same store on iOS and macOS.
nonisolated enum Keychain {
    struct Failure: Error, CustomStringConvertible {
        let status: OSStatus

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/keychain.md (reported line 123)May include surrounding context.

md
import Foundation
import Security

/// Generic-password items in the data protection keychain, the same store on iOS and macOS.
nonisolated enum Keychain {
    struct Failure: Error, CustomStringConvertible {
        let status: OSStatus

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/macos-distribution.md (reported line 96)May include surrounding context.

md
import Foundation
import Security

/// Generic-password items in the data protection keychain, the same store on iOS and macOS.
nonisolated enum Keychain {
    struct Failure: Error, CustomStringConvertible {
        let status: OSStatus

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/app-intents.md (reported line 169)May include surrounding context.

md
import Security

/// Generic-password items in the data protection keychain, the same store on iOS and macOS.
nonisolated enum Keychain {
    struct Failure: Error, CustomStringConvertible {
        let status: OSStatus
        var description: String {

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/keychain.md (reported line 22)May include surrounding context.

md
import Security

/// Generic-password items in the data protection keychain, the same store on iOS and macOS.
nonisolated enum Keychain {
    struct Failure: Error, CustomStringConvertible {
        let status: OSStatus
        var description: String {

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/keychain.md (reported line 71)May include surrounding context.

md
import Security

/// Generic-password items in the data protection keychain, the same store on iOS and macOS.
nonisolated enum Keychain {
    struct Failure: Error, CustomStringConvertible {
        let status: OSStatus
        var description: String {

Static analysis

Detected: suspicious.destructive_delete_command

Documentation contains a destructive delete command without an explicit confirmation gate.

Warn
Code
suspicious.destructive_delete_command
Location
references/macos-audio-pipeline.md:470