/apify-pack:apify-security-basicsfrom apify-pack
Harden Apify API token management, proxy security, and Actor data protection. For token rotation, environment isolation, and webhook verification.
Ships in apify-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Security best practices for Apify API tokens, Actor data, proxy credentials, and webhook verification. Apify uses personal API tokens (prefixed apify_api_) for all authentication. Because a single token grants full account access with no per-token scoping, token hygiene is the whole game.
Apify uses a single API token per user account for full API access. There is no scope-based permission system per token, so token security is critical.
| Token Type | Format | Where to Find |
|---|---|---|
| Personal API token | apify_api_... | Console > Settings > Integrations |
| Proxy password | Alphanumeric | Console > Proxy > Connection settings |
Follow the six hardening steps in order. Each has a lean summary below; the full copy-paste code for every step is in references/implementation.md.
Secure token storage — keep the token in .env (never hardcoded) and add
.env, .env.*.local, and storage/ to .gitignore. Validate presence at
startup so the app fails fast:
function requireToken(): string {
const token = process.env.APIFY_TOKEN;
if (!token) throw new Error('APIFY_TOKEN is required');
if (!token.startsWith('apify_api_')) console.warn('unexpected token prefix');
return token;
}
Per-environment token isolation — separate tokens (ideally separate
accounts) for dev / staging / prod, injected via each platform's secret store
(gh secret set, vercel env add, GCP Secret Manager).
Token rotation — generate the new token first (old stays valid), push to every environment, verify it authenticates, then revoke the old one.
Webhook payload verification — Apify does not sign webhooks; confirm the
run ID in the payload actually exists, or gate on a shared URL secret compared
with crypto.timingSafeEqual.
Actor data security — redact sensitive fields before pushData; keep
datasets named and private (no public sharing).
Proxy security — never log proxyConfig.newUrl() (it embeds the proxy
password); log the proxy group only.
See references/implementation.md for the complete code of every step, and references/examples.md for end-to-end scenarios.
Applying this skill produces a hardened project state:
.gitignore that excludes .env* and storage/, with no token in the tree.APIFY_TOKEN.APIFY_TOKEN stored in environment variables (never hardcoded).env and storage/ in .gitignoreIf a token is exposed:
git log --all -p -- '*.env' '*.json' | grep apify_api_| Issue | Detection | Mitigation |
|---|---|---|
| Token in git history | git log -p | grep apify_api_ | Rotate token, use BFG to clean |
| Unauthorized runs | Unexpected runs in Console | Rotate token immediately |
| Proxy password exposed | Credentials in logs | Regenerate proxy password |
| Data breach in dataset | PII in public dataset | Delete dataset, sanitize pipeline |
Quick starting point — bootstrap a new project's secrets safely:
cat >> .gitignore <<'EOF'
.env
.env.*.local
storage/
EOF
echo 'APIFY_TOKEN=apify_api_dev_token' > .env
git status --short # .env must NOT appear
Four full worked scenarios — secure bootstrap, cross-environment rotation, webhook-verify-then-sanitize, and a git-history leak audit — are in references/examples.md.
For production deployment hardening beyond secrets — health checks, rate limits,
and monitoring — see the apify-prod-checklist skill in this pack.
What SKILL.md sets; muted values are Claude Code's defaults
18 skills in this plugin
/apify-ci-integrationConfigure CI/CD pipelines for Apify Actor builds and deployments.
Use when automating Actor deployment via GitHub Actions, running
integration tests against the live Apify API, or building CI/CD for
scrapers that push to the Apify platform.
Trigger with "apify CI", "apify GitHub Actions", "apify automated deploy",
"CI apify", "apify pipeline", "auto deploy actor".
/apify-common-errorsDiagnose and fix common Apify Actor and API errors.
Use when an Apify run fails, an API call returns 401/403/404/413/429,
a proxy connection drops, an Actor build breaks, or a scrape hits an
anti-bot block, and you need the cause plus a copy-paste fix.
Trigger with "apify error", "fix apify", "actor failed",
"apify not working", "debug apify", "apify 429".
/apify-core-workflow-anpx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin apify-packOther plugins' skills for the same job