Skip to content
Agentmart
Submit a tool

add-app-attestation

Plan Apple App Attest for a React Native backend without turning illustrative pseudocode into an insecure cryptographic implementation.

Skill by khadinakbarlabs

IndexedMIT★ 3
Write a review

Chalk Labs

Need help deploying add-app-attestation?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/khadinakbarlabs-add-app-attestation

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Plan Apple App Attest for a React Native backend without turning illustrative pseudocode into an insecure cryptographic implementation. Use when the user says 'app attestation', 'devicecheck api', or 'prevent api abuse'.

Use cases: frontend, backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/add-app-attestation

What's inside

Skill name
add-app-attestation
Description
Plan Apple App Attest for a React Native backend without turning illustrative pseudocode into an insecure cryptographic implementation. Use when the user says 'app attestation', 'devicecheck api', or 'prevent api abuse'.
License
MIT
Instructions
73 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • openai.yaml · agents/

SKILL.md (first lines)

# Add Apple App Attest Safely

App Attest can raise the cost of automated abuse, but it is not a substitute for user authentication, authorization, quotas, or server-side provider-key protection. Use a maintained verifier or Apple's current server-side guidance; do not implement certificate and CBOR verification from a partial code snippet.

## Non-negotiable server contract

1. Generate a cryptographically random challenge on the server, bind it to the intended operation and request-body hash, set a short expiry, and store it server-side.
2. On registration, verify the attestation certificate chain to Apple's root, the app-identity hash, the challenge, and the returned public key before persisting the key.
3. On every asserted request, read the raw request body once, verify the assertion against the stored public key and the server-issued challenge, then atomically advance the counter.
4. Consume each challenge exactly once. A replay, stale challenge, mismatched body hash, or failed counter compare-and-swap must reject the request.
5. Apply normal user authentication and a server-side spend quota after the assertion. App Attest alone does not authorize a user.

## Safe handler shape

```ts
async function verifyProtectedRequest(req: Request) {
  const rawBody = await req.text();
  const keyId = req.headers.get('X-App-Attest-Key-Id');
  const assertion = req.headers.get('X-App-Attest-Assertion');
  const challengeId = req.headers.get('X-App-Attest-Challenge-Id');

  if (!keyId || !assertion || !challengeId) return { ok: false as const };

  const challenge = await consumeChallengeAtomically({
    challengeId,
    keyId,
    requestHash: sha256(rawBody),
  });
  if (!challenge) return { ok: false as const };

  const key = await db.attestationKeys.findUnique({ where: { keyId } });
  if (!key) return { ok: false as const };

  const verified = await appAttestVerifier.verifyAssertion({
    publicKey: key.publicKey,
    assertion,
    challenge: challenge.bytes,
    requestBody: rawBody,
  });
  if (!verified.ok) return { ok: false as const };

  const advanced = await advanceCounterAtomically({
    keyId,
    expectedPrevious: key.counter,
    nextCounter: verified.counter,
  });
  return advanced ? { ok: true as const, rawBody } : { ok: false as const };
}
```

The three named helpers are required security boundaries, not placeholders to skip: `consumeChallengeAtomically`, `appAttestVerifier.verifyAssertion`, and `advanceCounterAtomically` must be covered by server tests before use.

## Client considerations

- Generate and retain only the non-secret App Attest key identifier in secure storage.
- Request a fresh challenge for each protected operation; never reuse a challenge from local storage.
- Do not send backend or AI-provider keys to the device.
- Provide a safe fallback for unsupported devices that still requires normal user authentication and strict server-side rate limits.

## Security tests

- A stale, reused, or cross-user challenge is rejected.
- An assertion over a different raw request body is rejected.
- Two concurrent replays of the same assertion cannot both advance the counter.
- A valid App Attest assertion without a valid user session cannot use a paid backend feature.

## Pair with

- `add-openai-streaming-rn`
- `add-supabase-auth`
- `add-expo-secure-store`

From khadinakbarlabs/expo-mobile-app-builder, MIT.

More from khadinakbarlabs/expo-mobile-app-builder

Signals

Stars
3
Forks
0
Open issues
0
Last commit (this folder)
Aug 5, 2026 (2 months ago)
Last release
Oct 4, 2026 (26 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from khadinakbarlabs

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get add-app-attestation running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying add-app-attestation?

CallGet help
Cite this page

add-app-attestation skill. Agent Mart. https://agentmart.dev/skills/khadinakbarlabs-add-app-attestation (last updated 2026-10-24)