apify-security-basics
Secure Apify API tokens, configure proxy access, and protect Actor data. Use when hardening API key management, setting up environment-specific tokens, rotating a leaked token, or auditing Apify security configuration.
Install / Use
npx skills add jeremylongshore/tons-of-skills-marketplace --skill apify-security-basicsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
SecuritySupported Platforms
Our assessment of apify-security-basics
apify-security-basics scores 87/100 on our quality scale, 595th of 1,075 Security skills we index.
Its SKILL.md is 5.6 KB long, well organised into 12 sections with 1 code example: a solid amount of guidance for an agent.
With 2,785 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 8 days ago, so apify-security-basics is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-10-02. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
apify-security-basics compared with similar skills
All 4 of these similar skills score higher than apify-security-basics; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| apify-security-basics (this skill)by jeremylongshore | 87 | 2.8k | 8d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 88.1k | 17d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.3k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 85.2k | 1d ago | MCP Server |
| crawl4aiby unclecode | 100 | 84.6k | 7d ago | MCP Server |
Frequently asked questions
- How do I install apify-security-basics?
- Run
npx skills add jeremylongshore/tons-of-skills-marketplace --skill apify-security-basics. The install tabs above show the steps for each supported agent. - Which AI agents does apify-security-basics work with?
- It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is apify-security-basics safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is apify-security-basics still maintained?
- The repository was last updated 8 days ago, so apify-security-basics is actively maintained.
Skill content
View source on GitHubname: apify-security-basics description: | Secure Apify API tokens, configure proxy access, and protect Actor data. Use when hardening API key management, setting up environment-specific tokens, rotating a leaked token, or auditing Apify security configuration. Trigger with "apify security", "apify secrets", "secure apify token", "apify API key security", "rotate apify token". allowed-tools: Read, Write, Edit, Grep version: 1.5.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
- saas
- scraping
- automation
- apify compatibility: Designed for Claude Code
Apify Security Basics
Overview
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.
Prerequisites
- Apify account with Console access
- Understanding of environment variables
- Access to your deployment platform's secrets management
Token Architecture
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 |
Instructions
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, andstorage/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.
Output
Applying this skill produces a hardened project state:
- A
.gitignorethat excludes.env*andstorage/, with no token in the tree. - A startup token validator that throws on a missing/malformed
APIFY_TOKEN. - Environment-specific tokens wired into each platform's secret store.
- A documented rotation procedure and a completed Security Checklist (below).
- Webhook handlers that reject unverified runs and pipelines that redact PII before storage.
Security Checklist
- [ ]
APIFY_TOKENstored in environment variables (never hardcoded) - [ ]
.envandstorage/in.gitignore - [ ] Separate tokens for dev/staging/prod
- [ ] Token rotation schedule documented
- [ ] Webhook endpoints verify source
- [ ] Proxy URLs never logged
- [ ] Scraped PII redacted before storage
- [ ] Named datasets used for sensitive data (no public sharing)
- [ ] CI/CD secrets configured (not in repo)
Leaked Token Response
If a token is exposed:
- Immediately regenerate token in Console > Settings > Integrations
- Check recent Actor runs for unauthorized usage
- Review billing for unexpected charges
- Rotate proxy password if exposed
- Audit git history:
git log --all -p -- '*.env' '*.json' | grep apify_api_
Error Handling
| 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 |
Examples
Quick starting point — bootstrap a new project's secrets safely:
cat >> .gitignore <<'EOF'
.env
.env.*.local
storage/
EOF
echo 'APIFY_TOKEN=apif…[redacted]' > .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.
Resources
- Apify Account Security
- API Authentication
- Proxy Connection Settings
- Full implementation reference
- Worked examples
Next Steps
For production deployment hardening beyond secrets — health checks, rate limits,
and monitoring — see the apify-prod-checklist skill in this pack.
Related Skills
Agent-Reach
88.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.3kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Scrapling
85.2k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
crawl4ai
84.6kOpen-source web crawler and scraper for LLMs and AI agents: any website into clean, LLM-ready Markdown. Run it yourself, or use Crawl4AI Cloud with one key.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
