Swift Analyzer
Documentation sections

SWIFT ANALYZER / RULE CATALOG

Problem. Evidence. Boundary.

138 rules about whole-program Swift behavior, from state that becomes stale across await to repeated collection work and sensitive data reaching logs.

138 rules141 conditions33 accepted in bounded scopes10 families

Rules: 138 · conditions: 141

ARCHAccepted subset

Unused declaration or declaration group

[email protected]

Unused declaration or declaration group. It examines repository-wide reachability, dependencies, resources, and API boundaries. The result remains unknown when the required evidence is incomplete.

V-ARCH-01Contract violation
ARCHAccepted subset

Production code used only by tests

[email protected]

Production code used only by tests. It examines repository-wide reachability, dependencies, resources, and API boundaries. The result remains unknown when the required evidence is incomplete.

V-ARCH-02Contract violation
ARCHAccepted subset

Forbidden dependency or layer bypass

[email protected]

Forbidden dependency or layer bypass. It examines repository-wide reachability, dependencies, resources, and API boundaries. The result remains unknown when the required evidence is incomplete.

V-ARCH-03Contract violation
ARCHAccepted subset

Excessive API visibility

[email protected]

Excessive API visibility. It examines repository-wide reachability, dependencies, resources, and API boundaries. The result remains unknown when the required evidence is incomplete.

V-ARCH-04Improvement opportunity
ARCHAccepted subset

Unused product dependency

[email protected]

Unused product dependency. It examines repository-wide reachability, dependencies, resources, and API boundaries. The result remains unknown when the required evidence is incomplete.

V-ARCH-05Improvement opportunity
ARCHAccepted subset

Undeclared direct provider

[email protected]

Undeclared direct provider. It examines repository-wide reachability, dependencies, resources, and API boundaries. The result remains unknown when the required evidence is incomplete.

V-ARCH-06Contract violation
ARCHAccepted subset

Disallowed component cycle

[email protected]

Disallowed component cycle. It examines repository-wide reachability, dependencies, resources, and API boundaries. The result remains unknown when the required evidence is incomplete.

V-ARCH-07Contract violation
ARCHAccepted subset

Implementation type exposed through an API

[email protected]

Implementation type exposed through an API. It examines repository-wide reachability, dependencies, resources, and API boundaries. The result remains unknown when the required evidence is incomplete.

V-ARCH-08Contract violation
ARCHAccepted subset

Parameter unused across its dispatch family

[email protected]

Parameter unused across its dispatch family. It examines repository-wide reachability, dependencies, resources, and API boundaries. The result remains unknown when the required evidence is incomplete.

V-ARCH-11Improvement opportunity
ARCHAccepted subset

Property is written but never observed

[email protected]

Property is written but never observed. It examines repository-wide reachability, dependencies, resources, and API boundaries. The result remains unknown when the required evidence is incomplete.

V-ARCH-12Improvement opportunity
ARCHAccepted subset

Redundant protocol or conformance

[email protected]

Redundant protocol or conformance. It examines repository-wide reachability, dependencies, resources, and API boundaries. The result remains unknown when the required evidence is incomplete.

V-ARCH-13Improvement opportunity
ARCHAccepted subset

Semantically redundant import

[email protected]

Semantically redundant import. It examines repository-wide reachability, dependencies, resources, and API boundaries. The result remains unknown when the required evidence is incomplete.

V-ARCH-14Improvement opportunity
EXECRecovery required

Call crosses incompatible isolation

[email protected]

Call crosses incompatible isolation. It examines isolation, executor, scheduler, and execution-domain relationships. The result remains unknown when the required evidence is incomplete.

V-EXEC-01Defect
EXECRecovery required

MainActor entry without a proven context

[email protected]

MainActor entry without a proven context. It examines isolation, executor, scheduler, and execution-domain relationships. The result remains unknown when the required evidence is incomplete.

V-EXEC-02Review signal
EXECRecovery required

Required context lost through detachment

[email protected]

Required context lost through detachment. It examines isolation, executor, scheduler, and execution-domain relationships. The result remains unknown when the required evidence is incomplete.

V-EXEC-03Contract violation
EXECRecovery required

Invalid isolation assumption

[email protected]

Invalid isolation assumption. It examines isolation, executor, scheduler, and execution-domain relationships. The result remains unknown when the required evidence is incomplete.

V-EXEC-05Defect
EXECRecovery required

Blocking call on a critical executor

[email protected]

Blocking call on a critical executor. It examines isolation, executor, scheduler, and execution-domain relationships. The result remains unknown when the required evidence is incomplete.

V-EXEC-09Contract violation
EXECRecovery required

Removable scheduling boundary

[email protected]

Removable scheduling boundary. It examines isolation, executor, scheduler, and execution-domain relationships. The result remains unknown when the required evidence is incomplete.

V-EXEC-11Improvement opportunity
EXECRecovery required

Cost amplified by actor crossings

[email protected]

Cost amplified by actor crossings. It examines isolation, executor, scheduler, and execution-domain relationships. The result remains unknown when the required evidence is incomplete.

V-EXEC-12Improvement opportunity
ASYNCRecovery required

State check becomes stale across await

[email protected]

State check becomes stale across await. It examines task ordering, suspension, cancellation, progress, and async obligations. The result remains unknown when the required evidence is incomplete.

V-ASYNC-01Defect
ASYNCRecovery required

Continuation can finish without resume

[email protected]

Continuation can finish without resume. It examines task ordering, suspension, cancellation, progress, and async obligations. The result remains unknown when the required evidence is incomplete.

V-ASYNC-06Defect
ASYNCRecovery required

Continuation can resume more than once

[email protected]

Continuation can resume more than once. It examines task ordering, suspension, cancellation, progress, and async obligations. The result remains unknown when the required evidence is incomplete.

V-ASYNC-07Defect
ASYNCRecovery required

Task outlives its required lifecycle scope

[email protected]

Task outlives its required lifecycle scope. It examines task ordering, suspension, cancellation, progress, and async obligations. The result remains unknown when the required evidence is incomplete.

V-ASYNC-12Contract violation
ASYNCRecovery required

Required task result or error is lost

[email protected]

Required task result or error is lost. It examines task ordering, suspension, cancellation, progress, and async obligations. The result remains unknown when the required evidence is incomplete.

V-ASYNC-13Contract violation
ASYNCRecovery required

Guard is held across a disallowed await

[email protected]

Guard is held across a disallowed await. It examines task ordering, suspension, cancellation, progress, and async obligations. The result remains unknown when the required evidence is incomplete.

V-ASYNC-14Defect
ASYNCRecovery required

Wait cycle blocks required producers

[email protected]

Wait cycle blocks required producers. It examines task ordering, suspension, cancellation, progress, and async obligations. The result remains unknown when the required evidence is incomplete.

V-ASYNC-15Defect
ASYNCRecovery required

Priority inversion through opaque waiting

[email protected]

Priority inversion through opaque waiting. It examines task ordering, suspension, cancellation, progress, and async obligations. The result remains unknown when the required evidence is incomplete.

V-ASYNC-17Improvement opportunity
ASYNCRecovery required

Custom executor loses or repeats a job

[email protected]

Custom executor loses or repeats a job. It examines task ordering, suspension, cancellation, progress, and async obligations. The result remains unknown when the required evidence is incomplete.

V-ASYNC-20Defect
LIFERecovery required

Use after free

[email protected]

Use after free. It examines ownership, resource state, and lifetime obligations across program paths. The result remains unknown when the required evidence is incomplete.

V-LIFE-02Defect
LIFERecovery required

Repeated or incompatible deallocation

[email protected]

Repeated or incompatible deallocation. It examines ownership, resource state, and lifetime obligations across program paths. The result remains unknown when the required evidence is incomplete.

V-LIFE-03Defect
LIFERecovery required

Unowned access after owner deallocation

[email protected]

Unowned access after owner deallocation. It examines ownership, resource state, and lifetime obligations across program paths. The result remains unknown when the required evidence is incomplete.

V-LIFE-04Defect
LIFERecovery required

Unmanaged ownership imbalance

[email protected]

Unmanaged ownership imbalance. It examines ownership, resource state, and lifetime obligations across program paths. The result remains unknown when the required evidence is incomplete.

V-LIFE-05Defect
LIFERecovery required

Registration outlives its allowed scope

[email protected]

Registration outlives its allowed scope. It examines ownership, resource state, and lifetime obligations across program paths. The result remains unknown when the required evidence is incomplete.

V-LIFE-08Contract violation
LIFERecovery required

Cleanup obligation is not discharged

[email protected]

Cleanup obligation is not discharged. It examines ownership, resource state, and lifetime obligations across program paths. The result remains unknown when the required evidence is incomplete.

V-LIFE-09Defect
LIFERecovery required

Read from an uninitialized buffer region

[email protected]

Read from an uninitialized buffer region. It examines ownership, resource state, and lifetime obligations across program paths. The result remains unknown when the required evidence is incomplete.

V-LIFE-11Defect
PERFRecovery required

Repeated invariant sorting

[email protected]

Repeated invariant sorting. It examines repeated work, allocation, traversal, retention, and scheduling cost. The result remains unknown when the required evidence is incomplete.

V-PERF-02Improvement opportunity
PERFRecovery required

Array used as a growing shifting FIFO

[email protected]

Array used as a growing shifting FIFO. It examines repeated work, allocation, traversal, retention, and scheduling cost. The result remains unknown when the required evidence is incomplete.

V-PERF-04Improvement opportunity
PERFRecovery required

Repeated physical copy-on-write detach

[email protected]

Repeated physical copy-on-write detach. It examines repeated work, allocation, traversal, retention, and scheduling cost. The result remains unknown when the required evidence is incomplete.

V-PERF-09Improvement opportunity
PERFRecovery required

Get-copy-modify-set amplifies cost

[email protected]

Get-copy-modify-set amplifies cost. It examines repeated work, allocation, traversal, retention, and scheduling cost. The result remains unknown when the required evidence is incomplete.

V-PERF-10Improvement opportunity
PERFRecovery required

Capacity policy violates the amortized bound

[email protected]

Capacity policy violates the amortized bound. It examines repeated work, allocation, traversal, retention, and scheduling cost. The result remains unknown when the required evidence is incomplete.

V-PERF-12Improvement opportunity
PERFRecovery required

Repeated element-by-element bridging

[email protected]

Repeated element-by-element bridging. It examines repeated work, allocation, traversal, retention, and scheduling cost. The result remains unknown when the required evidence is incomplete.

V-PERF-13Improvement opportunity
PERFRecovery required

Repeated expensive hashing or equality work

[email protected]

Repeated expensive hashing or equality work. It examines repeated work, allocation, traversal, retention, and scheduling cost. The result remains unknown when the required evidence is incomplete.

V-PERF-14Improvement opportunity
PERFRecovery required

Small slice retains large storage

[email protected]

Small slice retains large storage. It examines repeated work, allocation, traversal, retention, and scheduling cost. The result remains unknown when the required evidence is incomplete.

V-PERF-15Improvement opportunity
PERFRecovery required

Fine-grained tasks amplify scheduling work

[email protected]

Fine-grained tasks amplify scheduling work. It examines repeated work, allocation, traversal, retention, and scheduling cost. The result remains unknown when the required evidence is incomplete.

V-PERF-16Improvement opportunity
PERFRecovery required

Fanout retains excessive live data

[email protected]

Fanout retains excessive live data. It examines repeated work, allocation, traversal, retention, and scheduling cost. The result remains unknown when the required evidence is incomplete.

V-PERF-17Improvement opportunity
SECRecovery required

SQL injection

[email protected]

SQL injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects. The result remains unknown when the required evidence is incomplete.

V-SEC-03Defect
SECRecovery required

Shell injection

[email protected]

Shell injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects. The result remains unknown when the required evidence is incomplete.

V-SEC-04Defect
SECRecovery required

Format-string injection

[email protected]

Format-string injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects. The result remains unknown when the required evidence is incomplete.

V-SEC-05Defect
SECRecovery required

JavaScript or HTML context injection

[email protected]

JavaScript or HTML context injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects. The result remains unknown when the required evidence is incomplete.

V-SEC-07Defect
SECRecovery required

Predicate injection

[email protected]

Predicate injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects. The result remains unknown when the required evidence is incomplete.

V-SEC-09Defect
SECRecovery required

Regular-expression injection

[email protected]

Regular-expression injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects. The result remains unknown when the required evidence is incomplete.

V-SEC-10Defect
SECRecovery required

Unsafe password-derivation contract

[email protected]

Unsafe password-derivation contract. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects. The result remains unknown when the required evidence is incomplete.

V-SEC-16Defect
SECRecovery required

WebView receives forbidden capabilities

[email protected]

WebView receives forbidden capabilities. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects. The result remains unknown when the required evidence is incomplete.

V-SEC-22Contract violation
SECRecovery required

Cryptographic key has insufficient strength

[email protected]

Cryptographic key has insufficient strength. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects. The result remains unknown when the required evidence is incomplete.

V-SEC-23Contract violation
CORAccepted subset

Equality and hashing disagree

[email protected]

Equality and hashing disagree. It examines value, collection, identity, ordering, and control-flow contracts. The result remains unknown when the required evidence is incomplete.

V-COR-01Defect
CORAccepted subset

Incompatible length or index units

[email protected]

Incompatible length or index units. It examines value, collection, identity, ordering, and control-flow contracts. The result remains unknown when the required evidence is incomplete.

V-COR-03Defect
CORAccepted subset

Invalidated collection index is used

[email protected]

Invalidated collection index is used. It examines value, collection, identity, ordering, and control-flow contracts. The result remains unknown when the required evidence is incomplete.

V-COR-04Defect
CORAccepted subset

Ordering laws are violated

[email protected]

Ordering laws are violated. It examines value, collection, identity, ordering, and control-flow contracts. The result remains unknown when the required evidence is incomplete.

V-COR-06Defect
CORAccepted subset

Written value is lost before observation

[email protected]

Written value is lost before observation. It examines value, collection, identity, ordering, and control-flow contracts. The result remains unknown when the required evidence is incomplete.

V-COR-14Improvement opportunity
CORAccepted subset

Control-flow region is unreachable

[email protected]

Control-flow region is unreachable. It examines value, collection, identity, ordering, and control-flow contracts. The result remains unknown when the required evidence is incomplete.

V-COR-17Defect
CHANGERecovery required

ABI change breaks binary compatibility

[email protected]

ABI change breaks binary compatibility. It examines source, ABI, dependency, resource, and cache compatibility across changes. The result remains unknown when the required evidence is incomplete.

V-CHANGE-02Defect
CHANGERecovery required

Version range admits an incompatible provider

[email protected]

Version range admits an incompatible provider. It examines source, ABI, dependency, resource, and cache compatibility across changes. The result remains unknown when the required evidence is incomplete.

V-CHANGE-05Contract violation
CHANGERecovery required

Change bypasses required consumer review

[email protected]

Change bypasses required consumer review. It examines source, ABI, dependency, resource, and cache compatibility across changes. The result remains unknown when the required evidence is incomplete.

V-CHANGE-06Contract violation
CHANGERecovery required

Comparable resource bound regresses

[email protected]

Comparable resource bound regresses. It examines source, ABI, dependency, resource, and cache compatibility across changes. The result remains unknown when the required evidence is incomplete.

V-CHANGE-07Improvement opportunity

One RuleID can group several conditions. Result kind does not define severity, and first-result strategy does not imply readiness.