AI-GENERATED CODEBASE & WORKFLOW SECURITY AUDIT CHECKLIST Horizon Dynamics | 28 November 2026 Guide: https://www.horizon-dynamics.tech/blog/ai-generated-code-security-audit Security scope: https://www.horizon-dynamics.tech/security-expertise Discuss an audit: https://www.horizon-dynamics.tech/contact?source=ai-assessment USE THIS WORKSHEET BEFORE PRODUCTION ROLLOUT OR APPLICATION TAKEOVER Record actual evidence (file path, test result, owner, date) for each item. An unchecked box or missing negative test is an open risk, not a pass. 1. SYSTEM INVENTORY AND OWNERSHIP - Repositories, branches, build pipelines and hosting accounts listed with current owners: - Modules, scripts or automations generated or heavily modified with AI tools identified: - External APIs, webhooks, databases and LLM providers mapped with spending limits: - Third-party credentials, API keys and service accounts inventoried (no shared personal tokens): - Named technical owner who can disable writes or pause automated workflows: 2. AUTHENTICATION, TENANT ISOLATION AND ACCESS CONTROL - Every API route, server action and file download enforces authentication and role checks on the server (never UI-only hiding): - Tenant or organisation ID is derived from the verified session and enforced in every query and export: - Negative authorization tests verify that restricted roles cannot read, modify or export another account's records (IDOR / BOLA check): - Admin, billing and permission-change endpoints require explicit role verification and log every action: - Session expiry, token revocation, MFA/SSO and account recovery paths tested end to end: 3. AI DATA BOUNDARIES AND PROMPT-INJECTION CONTROLS - Exact list of business records, documents and fields permitted to reach external or hosted models: - Retrieval (RAG) enforces the caller's live permissions BEFORE context is assembled and sent to the model: - Retrieved documents, emails and user notes are treated as untrusted data (cannot trigger privileged tools or bypass approvals): - Write actions (updating CRM/ERP records, sending customer emails, issuing refunds) require explicit schema validation and human approval: - Prompts, tool responses and logs exclude raw secrets, passwords and unnecessary personal data: 4. CODE QUALITY, DEPENDENCIES AND SILENT FAILURE MODES - Lockfile and direct dependencies audited against unmaintained, vulnerable or hallucinated packages: - No hardcoded secrets, permissive CORS wildcards, disabled TLS checks or insecure auth fallbacks in code or config: - Critical mutations and webhook/sync handlers are idempotent (retries do not create duplicate orders, invoices or notifications): - Errors are never silently swallowed; failed external API or model calls surface in a visible queue with a named recovery owner: - Rate limits, payload size caps, timeouts and token/spend ceilings configured on public and AI endpoints: 5. DEPLOYMENT, AUDIT LOGGING AND INCIDENT RECOVERY - Separate staging and production environments with least-privilege deployment permissions: - Append-only audit log captures sign-ins, permission edits, AI tool executions, approvals and denied access attempts: - Automated tests cover critical business workflows and security boundaries in CI before release: - Database backups and rollback procedure rehearsed and timed (not only scheduled): - Monitoring alerts route to an accountable person with documented escalation steps: 6. GO / HOLD / STABILISE DECISION RECORD System / workflow reviewed: Primary business risk if deployed unchanged: Critical blockers (must fix before production): High-priority stabilisation items (fix in sprint 1): Accepted residual risks and approving owner: Decision (HOLD / STABILISE FIRST / APPROVED FOR LIMITED PILOT): Review owner and date: Next verification checkpoint: