Command Palette

Search for a command to run...

Назад к скиллам
скилл № 14333

axiom-app-attest

Use when implementing app integrity verification, preventing fraud with DCAppAttestService, validating requests from legitimate app instances, using…

БесплатноБез исполняемых скриптов
ComeOnOliverот ComeOnOliver★ 67 звёзд на GitHub

Установить axiom-app-attest в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

App Attest

Device-backed app integrity verification for fraud prevention. Proves three things to your server: the request came from a genuine Apple device, running your genuine app, with an untampered payload.

When to Use This Skill

Use when you need to:

  • Verify requests come from legitimate app instances (not modified/cloned apps)
  • Prevent fraud in purchases, promotions, or competitive features
  • Implement DCAppAttestService attestation or assertion flows
  • Handle DeviceCheck 2-bit per-device state for promotional abuse
  • Build server-side validation for attestation objects or assertion signatures
  • Plan a gradual App Attest rollout for a large install base

Example Prompts

"How do I verify my app hasn't been tampered with?" "DCAppAttestService attestKey keeps failing with serverUnavailable" "How do I prevent users from claiming a free trial multiple times?" "What's the difference between attestation and assertion?" "How do I validate an attestation object on my server?" "isSupported returns false — should I block the user?" "We have 2M DAU, how do I roll out App Attest safely?" "How do I detect if someone is creating fake app instances?"

Red Flags

Signs you're headed for trouble:

  • Validating app integrity on-device — Modified apps control the runtime. Any local check can be patched out. Verification MUST happen server-side.
  • Not guarding with isSupported — DCAppAttestService crashes on unsupported devices. Always check before calling any API.
  • Blocking users when isSupported returns false — Some legitimate devices return false. Treat as risk signal, not hard block.
  • Reusing keys across multiple users on same device — One key per user per device. Shared keys break account-level trust association.
  • Enabling App Attest for all users at once — attestKey calls Apple's servers. At scale, rate limiting causes failures. Gradual rollout required (WWDC 2021-10244).
  • Using assertions for every API call — Cryptographic cost per call. Reserve for sensitive operations (purchases, account changes), not routine fetches.
  • Discarding key on serverUnavailable error — Transient Apple server issue. Retry with same key. Only discard on other errors.
  • Skipping counter validation on server — Counter must be ever-increasing. Without this, replay attacks succeed.

Three Properties Verified

App Attest proves three things about each request:

Property What It Proves How
Genuine device Request comes from real Apple hardware Hardware-backed key in Secure Enclave
Genuine app Your app binary, unmodified App identity hash in attestation
Untampered payload Request data hasn't been altered Digest signing in assertions

Privacy design: Anonymous. No hardware identifiers. Keys don't survive reinstall/migration/restore. Apple can't correlate across apps or users.

Key Generation

import DeviceCheck

func generateAppAttestKey(for userId: String) async throws -> String {
    let service = DCAppAttestService.shared

    guard service.isSupported else {
        // NOT an error — use as risk signal, not blocker
        reportUnattestedDevice()
        throw AppAttestError.unsupported
    }

    let keyId = try await service.generateKey()
    // Cache persistently — one key per user per device
    UserDefaults.standard.set(keyId, forKey: "appAttestKeyId_\(userId)")
    return keyId
}

Key lifecycle: One key per user per device. Cache keyId persistently (Keychain or UserDefaults). Keys don't survive reinstall, migration, or restore. App Clips share identity with full app. Generate new key on sign-out.

Attestation Flow

Attestation registers the key with Apple and your server. Happens once per key.

digraph attestation {
    "Server issues\nchallenge" [shape=ellipse];
    "SHA256 hash\nchallenge" [shape=box];
    "attestKey API\n(Apple servers)" [shape=box];
    "Send attestation\nto your server" [shape=box];
    "Server validates\ncertificate chain" [shape=box];
    "Store public key\n+ key association" [shape=doublecircle];

    "Error?" [shape=diamond];
    "serverUnavailable?" [shape=diamond];
    "Retry same key" [shape=box];
    "Discard key\ngenerate new" [shape=box];

    "Server issues\nchallenge" -> "SHA256 hash\nchallenge";
    "SHA256 hash\nchallenge" -> "attestKey API\n(Apple servers)";
    "attestKey API\n(Apple servers)" -> "Error?" ;
    "Error?" -> "Send attestation\nto your server" [label="success"];
    "Error?" -> "serverUnavailable?" [label="error"];
    "serverUnavailable?" -> "Retry same key" [label="yes"];
    "serverUnavailable?" -> "Discard key\ngenerate new" [label="no"];
    "Send attestation\nto your server" -> "Server validates\ncertificate chain";
    "Server validates\ncertificate chain" -> "Store public key\n+ key association";
}
func attestKey(userId: String) async throws {
    guard let keyId = storedKeyId(for: userId) else {
        t
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл axiom-app-attest?

Use when implementing app integrity verification, preventing fraud with DCAppAttestService, validating requests from legitimate app instances, using DeviceCheck for promotional abuse prevention, or needing server-side attestation/assertion validation. Covers key generation, attestation, assertion, rollout strategy, and risk metrics.

Как установить скилл axiom-app-attest?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл axiom-app-attest запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить axiom-app-attest с