Bot: classes L–XL checklist
Note for AI agents: This page is baseline guidance, not an exact prescription. Read it, tell your owner what applies to their project, and get their approval before you change anything. Your project's own rules take precedence. If something important for this project is missing here, suggest it to your owner.
This page continues Bot. Read the main page first. This part holds the audit checklist items for classes L–XL.
Audit checklist
+ If it has an admin panel, file uploads, many users or a store app (L)
- Exact versions, 7-day rule, pinned images and actions
- What: Dependencies use exact versions (no
^or~); newly published versions wait at least 7 days before install (critical security fixes excepted, with a written reason and end date); Docker images are pinned by digest and CI actions by full commit ID; major upgrades are done one by one. - How to check: Read dependency files, Dockerfile and CI files; check the release dates of recent upgrades.
- Evidence: Dependency file lines; upgrade notes with release dates.
- What: Dependencies use exact versions (no
- Rate limits are per account and tolerate shared IPs
- What: Limits are per account; unauthenticated endpoints also have IP limits, tuned for mobile carriers that put thousands of users behind one IP (CGNAT).
- How to check: Read the limiter configuration and thresholds; test many users from one IP.
- Evidence: Limit table; test results.
- No “check then write” races
- What: State changes use conditional updates; counters are incremented in the database, not read and rewritten in code.
- How to check: Search for read-then-update patterns on balances, counters and status fields.
- Evidence: Code showing conditional updates; concurrency test.
- Unknown or missing settings stop the process
- What: The process refuses to start with an unrecognized environment value or a missing required setting; there is no silent fallback; checks ask “is this development or test?” rather than “is this not production?”; endpoint groups can be locked by a single feature-lock file.
- How to check: Start the app with a missing required variable and a wrong environment name; read the lock file.
- Evidence: Startup failure message; lock file.
- Container is hardened and stateless
- What: Multi-stage image, non-root user, base image pinned by digest, health check endpoint; runtime versions identical in CI, local and production; no state in the container disk (sessions and files live in the database or object storage).
- How to check: Read the Dockerfile; run
docker inspectfor the user; look for files written to the container disk. - Evidence: Dockerfile lines; health endpoint response.
- End-to-end tests, short CI run, guards, screenshot checks
- What: End-to-end tests exist; a short run happens in CI; guards (tests that enforce rules) protect important rules; screen checks cover both themes and all languages; new end-to-end tests pass three runs in a row before merging; a red test is fixed in code, never silenced.
- How to check: Read the CI file and test folders; look for skipped tests and quarantined guards.
- Evidence: CI run, guard inventory, three-run log.
- Encrypted backups sit with another provider, and code is copied
- What: Backups are encrypted and kept in a different provider or account so a compromised main account cannot delete them; object storage has versioning or backup; backups run as a separate service with failure alarms; a full copy of the code (all branches, history) is delivered to the owner regularly.
- How to check: Read backup configuration, destination account and alarms; find the last code copy.
- Evidence: Backup destination; alarm rule; date of last code copy.
- Limits and capacities are listed in one place
- What: Every rate limit and capacity is in one list: value, window, capacity reasoning, what an attacker could do, side effects.
- How to check: Find the inventory document and compare it with limiter code.
- Evidence: Inventory document.
- Industry standard list (S1–S16) is kept and “busy” is handled correctly
- What: A list of standard mechanisms (retries with backoff and jitter, idempotency keys, early load shedding, timeouts, circuit breaker, caching, background job guarantees, graceful shutdown, rate limits, security headers, monitoring, bounded queues, one error path, compression) with a status per item; capacity problems return 429 or 503 with Retry-After, never 500.
- How to check: Find the list; test overload and read the status code and headers.
- Evidence: List with status; overload test output.
+ If it targets millions of users (XL)
- Load tests with a coverage map and an attack drill
- What: Load tests use real request patterns (burst, long run, writes, a huge account, a database restart, media upload, attack drill); every endpoint and scheduled job is in a coverage map; a new endpoint without a map entry fails a guard; with hit-rate “busy” responses at target steps counted as findings.
- How to check: Read the load test folder and the map; check the guard.
- Evidence: Latest run report; coverage map.
- Scale rules are measured
- What: One event updates only its own item; memory, timers and subscriptions stay bounded on long lists; data loads gradually near the end of the list; small frequent writes are batched; query counts per endpoint have a guard; hot single rows use sharded counters; optimizations are decided by measurement.
- How to check: Run a long-scroll test and read the query count guard output.
- Evidence: Measurements before and after; guard test name.
- Leak detection and key rotation
- What: Decoy keys raise an alarm when used; cloud audit alerts exist for new service accounts and permission changes; unusual usage alarms exist; there is a key rotation plan that does not end sessions; an error tool strips personal data and samples.
- How to check: Read the monitoring and alert configuration; find the rotation plan.
- Evidence: Alert rules; rotation document.
- Disaster recovery plan with RPO and RTO
- What: A written plan states acceptable data loss (RPO), recovery time (RTO) and step-by-step recovery.
- How to check: Find the plan; check that a drill was run.
- Evidence: Plan and drill record.
Sources
- Telegram Bot API — Telegram
- Telegram Bots FAQ — Telegram
- Telegram Bot Features — Telegram
- Discord Developer Platform: Intro — Discord
- Discord: Rate Limits — Discord
- Discord: OAuth2 — Discord
- Slack: Security best practices — Slack
- Slack: Verifying requests from Slack — Slack
- Slack: Rate limits — Slack
- Secrets Management Cheat Sheet — OWASP Cheat Sheet Series
- Pro Build Guide v1.2: compiled team practices — Pro Build Guide