| name | anima-security-basics |
| description | Secure Anima and Figma tokens for design-to-code pipelines.
Use when protecting API credentials, restricting Figma access scope,
or hardening CI/CD design automation pipelines.
Trigger: "anima security", "anima token safety", "figma token security".
|
| allowed-tools | Read, Write, Edit, Grep |
| version | 1.4.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","design","figma","anima","security"] |
| compatibility | Designed for Claude Code |
Anima Security Basics
Security Checklist
Instructions
Step 1: Figma Token Scope Restriction
Step 2: Server-Side Only Enforcement
function validateEnvironment(): void {
if (typeof window !== 'undefined') {
throw new Error('Anima SDK must run server-side only — never import in browser code');
}
if (!process.env.ANIMA_TOKEN) throw new Error('ANIMA_TOKEN not set');
if (!process.env.FIGMA_TOKEN) throw new Error('FIGMA_TOKEN not set');
}
validateEnvironment();
Step 3: Secret Manager Integration
async function loadAnimaSecrets(): Promise<{ animaToken: string; figmaToken: string }> {
const { SecretManagerServiceClient } = await import('@google-cloud/secret-manager');
const client = new SecretManagerServiceClient();
const [animaVersion] = await client.accessSecretVersion({
name: `projects/${process.env.GCP_PROJECT}/secrets/anima-token/versions/latest`,
});
const [figmaVersion] = await client.accessSecretVersion({
name: `projects/${process.env.GCP_PROJECT}/secrets/figma-token/versions/latest`,
});
return {
animaToken: animaVersion.payload?.data?.toString() || '',
figmaToken: figmaVersion.payload?.data?.toString() || '',
};
}
Output
- Figma token with minimal scope (read-only)
- Server-side enforcement preventing browser usage
- Secrets loaded from cloud secret manager
Resources
Next Steps
For production deployment, see anima-prod-checklist.