| name | lokalise-security-basics |
| description | Apply Lokalise security best practices for API tokens and access control.
Use when securing API tokens, implementing least privilege access,
or auditing Lokalise security configuration.
Trigger with phrases like "lokalise security", "lokalise secrets",
"secure lokalise", "lokalise API token security".
|
| allowed-tools | Read, Write, Edit, Bash(curl:*), Bash(jq:*), Grep |
| version | 1.14.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","lokalise","api","security","audit"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Lokalise Security Basics
Overview
Security practices for Lokalise integrations: API token management with scoped permissions, translation content sanitization, CI/CD secret handling, webhook secret verification, and audit logging. Lokalise handles translation strings that may contain user-facing content, interpolation variables, and occasionally PII embedded in keys or values.
Prerequisites
- Lokalise API token provisioned (admin token for audit, scoped tokens for operations)
- Understanding of Lokalise token permission model (read-only vs read-write)
- Secret management infrastructure (GitHub Secrets, AWS Secrets Manager, GCP Secret Manager, or Vault)
Instructions
Step 1: Token Scope Management
Lokalise API tokens are either read-only or read-write. Create separate tokens per use case to enforce least privilege.
import { LokaliseApi } from "@lokalise/node-api";
const TOKENS = {
ciDownload: process.env.LOKALISE_READ_TOKEN,
ciUpload: process.env.LOKALISE_WRITE_TOKEN,
admin: process.env.LOKALISE_ADMIN_TOKEN,
} as const;
function getClient(scope: keyof typeof TOKENS): LokaliseApi {
const token = TOKENS[scope];
if (!token) {
throw new (
+
);
}
({ : token, : });
}
readClient = ();
bundle = readClient.().(projectId, {
: ,
: ,
: ,
});