Vibe coding security audit: what flaws should we look for in AI-written code?

A dark technical blueprint showing a prototype’s access gate, customer data, backup and accountability checkpoint.

A colleague builds a CRM with AI over a few afternoons. Customer entry works, contacts are searchable and reports are generated. The team starts using it, and customer data gradually moves into a system that the head of IT may not even know about. Behind this quick success, security, operational and legal risks are already accumulating.

A vibe coding security audit examines whether an application that appears to work is actually suitable for business use. As part of our coverage of “The 10 biggest risks of vibe coding,” we now review access controls, secrets management, dependencies and the consequences of shadow IT. We also address what happens when the employee who built the system leaves.

1. Shadow IT begins when a working prototype quietly becomes a business system

In vibe coding, developers build applications using natural-language instructions and AI-generated code. This does not constitute a security flaw in itself. The risk increases when rapid implementation is not accompanied by planning, expert review and clearly assigned operational responsibility.

The term shadow IT refers to solutions created outside an organization's official IT governance. A CRM running on a personal subscription is a typical example: it handles company data, while its hosting, source code and administrator account are tied to a single employee.

  • Who authorized the use of the application and the uploading of data?

  • Where are the database, source code and backups stored?

  • Whose name are the service subscriptions registered under?

  • Who is responsible for updates, incidents and recovery?

If these questions have no answers, this is more than a documentation gap. The company may depend on a system over which it has no effective control. The first audit task is therefore to assess the situation, not to read the code.

2. Access control flaws: login is not authorization management

AI can easily create a login page and hide administration buttons. However, the underlying API may still process unauthorized requests. Permissions must be checked on the server side for every relevant operation.

What should we test in an AI-generated CRM?

  • Record-level access: can changing a customer ID provide access to another salesperson's or another organization's customer?

  • Roles: can a regular user create an administrator or export the entire database through a direct API call?

  • Sessions: are expiration settings appropriate, and can sessions be revoked on logout or when an account is disabled?

  • Password reset: does it use single-use, time-limited tokens, and can it withstand high-volume attempts?

  • Default protection: are new endpoints blocked until access has been explicitly granted?

Tests should be performed using multiple roles and at least two isolated datasets. A single administrator test account conceals precisely the most important flaws.

Beyond permissions, we should also check data-handling operations. Database queries: does the code treat user input as parameters, or insert it directly into the query string? File uploads: does the server validate permitted file types and sizes? Rendering: does proper output encoding prevent content entered in a customer's notes field from being rendered as executable code?

3. Leaked secrets and vulnerable dependencies: risks beyond the code

A common shortcut is to put the database password or a service's API key directly into the code. The same can happen in files sent to the browser, error logs or examples pasted into an AI tool. A secret stored in client-side code is not a secret.

  • Search for access keys throughout the entire source code history, not just in the current version.

  • Check whether production customer data, passwords or tokens have been included in AI prompts and support tickets.

  • Revoke and replace leaked keys; simply deleting them from the code is not enough.

  • Separate access to development, test and production environments.

  • Review the logs: they should not store personal data or authentication information unnecessarily.

Dependencies require a separate review. AI may recommend packages that are outdated, incorrectly named or unnecessary for the task. Check each package's source, actual version, maintenance status, known vulnerabilities and license terms. Transitive dependencies also matter: although not selected directly, they still become part of the application.

Automated package scanning is a good starting point, but not a final verdict. Findings must be assessed in the context of how the application is used, and remediation must be followed by retesting.

Disorganized paper-based review work on the left; an orderly digital review queue with feedback loops for fixes and retesting on the right.

4. Turning the Audit into an Actionable Remediation Plan

A vibe coding security audit involves more than running a single scanner. The source code, running application and deployment environment must be examined together, within a predefined scope. Only authorized, controlled testing should be performed on production systems.

  1. Inventory: map systems, data categories, integrations, owners and service providers.

  2. Automated checks: code analysis, secret scanning and dependency scanning.

  3. Manual testing: verify permissions, business logic, export functionality and data isolation.

  4. Operational testing: test backup and restoration, account disabling and key rotation.

  5. Remediation and verification: assign an owner, deadline and verifiable acceptance criterion to every finding.

Every flaw should include reproducible evidence and a description of its business impact. “API error” is insufficient; “a standard user can export all customer data” supports management decisions. Severity is determined jointly by exposure, exploitability and the data affected.

Publicly accessible customer data or active, leaked keys warrant immediate containment and an incident investigation. In such cases, further development must not take priority over mitigating the damage.

5. Who Owns the CRM If the Secretary Who Developed It Resigns?

Alongside fixing technical flaws, the company must clarify the rights under which it can use and modify the CRM after its creator leaves. The job description alone does not determine this. Under Hungarian law, the Copyright Act's provisions on works created in the course of employment, the contracts and the actual assignment of duties must be examined together.

If creating the software is part of the employee's employment duties, the employer acquires the economic rights upon delivery of the work, unless otherwise agreed. The job description is important evidence, but is not necessarily decisive on its own: employer instructions and other documents may also matter. Likewise, using a company laptop does not, by itself, settle ownership of the rights.

Unlabeled bars, an open pie chart and a stepped curve connect to a shared assessment bar, symbolizing a multifactor review of the legal situation.

Three Questions Must Be Addressed Separately

  • Copyright: what human creative contribution was made, who holds the rights to the protected elements, and what licensing or rights assignment agreement was concluded?

  • Data and secrets: who is authorized to process customer data, and what confidentiality obligations apply?

  • Practical access: who manages the hosting, domain, source code repository and administrator accounts?

The use of AI adds another layer: copyright protection for purely machine-generated output is not automatic. The human contribution, licenses for incorporated third-party code and the AI service's terms require separate examination.

A departing employee therefore cannot necessarily “take the CRM with them,” nor is a claim for additional remuneration automatically justified. Any rights to the code do not entitle them to take or delete customer data or use trade secrets. Uncertainty over the legal relationship can nevertheless lead to disputes and operational disruption.

From a data protection perspective, unauthorized development does not remove the company's responsibility as a data controller. The legal basis, data processing agreements, any international data transfers and incident management must be clarified. It is advisable to resolve the specific employment law and copyright issues with a specialist lawyer before the employee leaves.

6. xFLOWer: A Controlled Framework with Clear Responsibilities

The audit also raises a solution selection question: is it worth fixing and maintaining the custom application, or can the process be implemented within an existing framework? When evaluating xFLOWer, start with the identified requirements: what access rights, approvals, integrations and operational responsibilities must be provided?

One way to address the identified risks is to use a workflow framework such as xFLOWer: business processes are mapped within an existing framework rather than in a newly generated application. Selection criteria should include documented audits and testing of the framework, as well as professional oversight independent of the employee who configures the process. This avoids having to rebuild the security foundations for every new process.

A properly configured framework can reduce the number of custom components that need to be written repeatedly and enable more consistent controls. However, this does not automatically guarantee security or legal compliance. The solution’s permissions, integrations, data handling and operations must also be reviewed.

The risks of shadow IT can also be reduced: in many cases, custom development can be limited to the interface between the workflow and existing systems, which must also be approved and audited. Processes can have separate prototype, test, training and production lifecycle stages; even the demo version should operate with controlled access and appropriate test data. From a data protection perspective, implementation should include checks on permissions and logging for data exports, transfers and deletion, as well as enforcement of retention periods, so that these do not become unnoticed operations or forgotten tasks.

An implementation built around xFLOWer should therefore require an access control matrix, documented change management, tested recovery procedures and clearly assigned system ownership. Beyond platform selection, security depends on the quality of configuration and human oversight.

A miniature operations model with an access gate, a change-management workbench, a storage unit undergoing recovery testing and a supervising figure.

7. Summary: rapid development needs rapid oversight

Vibe coding does not make every application dangerous, but it can easily accelerate the spread of unchecked systems. Secure business use requires code audits, properly managed access, clearly established rights and operations that can be handed over. The critical question is: will the system still operate securely if its creator no longer works at the company tomorrow?

A properly vetted and supervised workflow framework, such as xFLOWer, can offer a solution: it keeps rapid process development under organizational control rather than accelerating it by replacing audits.

Are you using an internal application built with AI? Start with an inventory of systems and access rights, then assign someone to manage the identified risks. Discuss options for controlled, process-based implementation with the Click On team; explore AI-driven approaches on xFLOWer.ai.

This article is part of our comprehensive guide: The top 10 risks of vibe coding: a complete enterprise guide from security to copyright

xFLOWer.ai

Design the process behind this article – for free!

AI reads the processes hidden in this article; open any of them in xFLOWer.ai with one click.

Contact us

Let's talk about your processes

Tell us briefly which process you'd like to automate – we'll get back to you within 1 business day.