Key Takeaways
- An empirical study found security weaknesses in 29.5% of sampled AI-generated Python snippets and 24.2% of JavaScript, across 43 CWE categories. That is not a defect rate for every AI-assisted application, but it is why correct-looking output cannot be assumed secure.
- AI-built and AI-enabled are different problems. The first concerns the resulting application, APIs, cloud services and supply chain. The second adds prompt injection and excessive agency. Using AI to build an ordinary booking portal does not make prompt injection relevant to that portal.
- The findings that matter are contextual, not version numbers. A scanner will flag an outdated library; it is far less reliable at noticing that a user can approve their own transaction, read another tenant's records or reach an admin function through an undocumented API.
- For most public vibe-coded applications the baseline is an authenticated web application test plus API testing, with cloud review added where the coding agent configured storage, secrets or identity. Grey-box or source-assisted access suits generated code: the point is not to spend days discovering an API exists, but to test whether every API, role and data flow is protected.
- A prompt can replace authentication, add an admin dashboard or connect a payment provider in minutes, and each change can invalidate earlier assurance. Retesting should follow material architectural or security change, not only a calendar anniversary.
AI-assisted development can turn an idea into a working web application remarkably quickly. It can also move untested assumptions, weak access controls and insecure integrations into production just as quickly. Penetration testing provides an evidence-based way to determine whether the finished application can withstand realistic attack techniques.
Fast development changes the risk
“Vibe coding” describes an AI-assisted development style in which a person explains the desired outcome in natural language and an AI tool generates or modifies the code. The term was popularised in early 2025, but the underlying practice now ranges from generating isolated functions to building and deploying complete applications through conversational instructions.[1]
This approach has real value. It lowers the barrier to prototyping, reduces repetitive development work and allows teams to test an idea quickly. The security concern is not that AI was involved; it is that software can become functional, connected to real data and publicly accessible before anyone with suitable security expertise has assessed how it behaves under hostile conditions.
A generated application can look polished, pass a demonstration and handle expected user journeys while still failing when a user changes an object identifier, modifies an API request, bypasses the user interface or supplies input the original prompt never anticipated. Functionality answers, “Does the intended workflow work?” Security testing asks the different question, “What can an unauthorised or malicious user make it do?”
Research supports the need for that distinction. An empirical study of AI-generated code found security weaknesses in 29.5% of sampled Python snippets and 24.2% of JavaScript snippets, covering 43 Common Weakness Enumeration categories. A separate 2025 industry evaluation of more than 100 large language models reported that generated code introduced security flaws in 45% of its tests. These figures should not be treated as a universal defect rate for every AI-assisted application, but they demonstrate why correct-looking output should not be assumed to be secure.[2][3]
Has an AI-assisted application moved from prototype to production? Scope a penetration test in four short steps. No IP ranges or sensitive technical details are required at the initial quote stage.
The risk can be amplified when a team does not fully understand the generated code, the framework conventions it relies on or the cloud services it configures. Repeated prompting may repair a visible symptom without addressing its root cause, or introduce a new weakness elsewhere. Rapid iteration can also produce abandoned endpoints, duplicated authentication logic, excessive permissions and dependencies that nobody has formally reviewed.
Two different AI attack surfaces
It is important to distinguish between two related scenarios:
- AI-built applications: AI generated some or most of the source code, infrastructure configuration or deployment logic. The security assessment focuses on the resulting web application, APIs, cloud services, data flows and software supply chain.
- AI-enabled applications: The deployed product itself uses a language model, retrieval-augmented generation, autonomous agent, chatbot or AI-connected tools. This adds model-specific risks such as prompt injection, insecure output handling, excessive agency and unintended disclosure of retrieved information. OWASP identifies prompt injection and excessive agency among the leading risks for LLM applications.[4]
An application may fall into either category or both. Using AI to build an ordinary booking portal does not automatically make prompt injection relevant to that portal. Conversely, a conventional development team can build an AI-enabled product that requires specialised LLM security testing. Good scoping establishes which attack surfaces actually exist instead of applying an “AI security” label too broadly.
What penetration testing does
A penetration test is a controlled security assessment in which qualified testers use attacker-like techniques to identify and safely validate exploitable weaknesses. OWASP’s Web Security Testing Guide provides a structured framework for testing web applications and web services, while the OWASP Application Security Verification Standard provides testable security requirements that can help define the required level of assurance.[5][6]
Penetration testing is not the same as running a vulnerability scanner. Automated scanning is useful for broad and repeatable detection of known issues, including common injection flaws and insecure server configuration. A penetration test adds manual analysis: testers examine trust boundaries, alter requests, compare user roles, chain weaknesses and determine whether a theoretical issue can create meaningful business impact. OWASP notes that controlled exploitation can support more accurate risk ratings than vulnerability scanning alone.[7][8]
That human element matters in vibe-coded systems. Automated tools may identify an outdated library, but they are less reliable at recognising that a user can approve their own transaction, read another tenant’s records, redeem the same entitlement repeatedly or reach an administrative function through an undocumented API. These are contextual failures involving authorisation or business logic, not simply vulnerable software versions.
A professional engagement should begin with written authorisation, a defined scope and agreed rules of engagement. Scope identifies what may be tested; the rules of engagement define how testing may occur, including timing, prohibited actions, test accounts, data-handling arrangements and escalation contacts. This protects the client, the tester and any third-party services connected to the application.[9]
Selecting the right test
“Penetration test” is not a single standard package. The appropriate testing type depends on what the application does, how it is deployed and which risks matter to the organisation.
| Testing type | What it examines | When it is particularly relevant |
|---|---|---|
Web application penetration test | Browser-accessible functions, authentication, authorisation, sessions, input handling, file processing, workflows and security configuration | The primary product is a website, portal, SaaS platform or internal web application |
API penetration test | REST, GraphQL or other service endpoints; object and function-level authorisation; token handling; rate limits; schemas and undocumented methods | A generated front end relies heavily on backend APIs, mobile clients or third-party integrations |
External infrastructure test | Internet-facing hosts, services, DNS, TLS, exposed management interfaces and perimeter configuration | The application includes custom hosting, virtual machines, containers, gateways or other public infrastructure |
Cloud configuration review and testing | Identity and access management, storage exposure, serverless functions, secrets, network boundaries and service configuration | AI tooling has provisioned or modified AWS, Azure, Google Cloud or backend-as-a-service resources |
Source-assisted application test | Runtime testing supported by source code, architecture information and configuration access | Assurance depth matters, development is rapid, or hidden code paths and controls need efficient examination |
LLM or agent security test | Prompt injection, retrieval boundaries, output handling, tool permissions, model data exposure and resource abuse | The application itself includes generative AI, RAG, agents or model-connected actions |
Internal network test | Post-compromise access paths, trust relationships, privilege escalation and exposure of supporting systems | The web application connects to material internal services or a compromise could become an entry point into the organisation |
For most public vibe-coded web applications, the sensible baseline is an authenticated web application test plus API testing. Cloud review should be added where the builder or coding agent configured storage, database policies, functions, secrets or identity settings. If the deployed application uses an LLM, a specialised AI test should supplement rather than replace normal application and API testing.
Not sure which testing types belong in scope? Use the penetration testing scope form for an initial fixed-price proposal, or book a free 15- or 30-minute call to work through the application, APIs, cloud services and AI components.
Knowledge levels matter
Testing can also be described by how much information the tester receives:
| Approach | Tester knowledge | Strengths | Limitations |
|---|---|---|---|
Black box | Little beyond public target details | Closely resembles an unknown external attacker and can test exposed discovery paths | Time may be spent rediscovering architecture; hidden functions and roles may receive less coverage |
Grey box | User accounts, role information and selected documentation | Efficiently tests authenticated workflows, horizontal and vertical privilege boundaries, and common real-world attack paths | Does not provide complete visibility into implementation weaknesses |
White box or source-assisted | Source code, architecture, configurations and multiple roles | Enables deeper coverage, faster root-cause analysis and inspection of controls that are difficult to reach externally | Requires secure handling of sensitive technical material and remains different from a full code audit |
A grey-box or source-assisted approach is often well suited to AI-generated applications. The objective is usually not to make testers spend days discovering that an API exists; it is to give them enough context to test whether every API, role and data flow is protected correctly. Black-box testing can still be included to examine what an unauthenticated attacker can discover from the public internet.
Risks a test can expose
Broken access control
Access control is one of the most consequential areas for a multi-user application. A common example occurs when a request contains /api/invoices/4821 and the server returns invoice 4821 merely because the requester is logged in. If changing the number to 4822 returns another customer’s invoice, the interface has hidden the record but the server has not enforced ownership.
OWASP’s API guidance calls this broken object-level authorisation and states that authorisation should be checked whenever an endpoint uses an identifier to access data. Testers examine this behaviour across normal users, administrators, support roles, organisations and tenants. They also look for vertical privilege escalation, where a normal user invokes an administrative function directly, and horizontal escalation, where one user accesses a peer’s information.[10]
Authentication and session weaknesses
Prompt-generated authentication may work for the happy path yet omit controls around password reset, account enumeration, multi-factor authentication, token expiry, logout, session invalidation or brute-force resistance. A tester may find that an old session remains valid after a password change, that a reset token can be reused, or that a privileged token is stored where browser scripts can access it.
Authentication must also be tested across every interface. Protecting the web page is insufficient if the backend endpoint accepts an unauthenticated request or trusts a user-controlled role value.
Injection and unsafe input handling
Generated code may concatenate untrusted input into database queries, operating-system commands, templates or browser output. Depending on context, this can lead to SQL injection, command injection, server-side template injection or cross-site scripting. The ACSC recommends secure coding, code analysis, fuzzing, dynamic testing and penetration testing to identify vulnerabilities in web applications and verify security requirements.[11][12]
A penetration tester does more than send a standard payload. The tester traces where the input travels, checks alternative encodings and content types, examines second-order behaviour and determines whether exploitation can expose data, modify records or execute actions in another user’s browser.
Exposed secrets and cloud data
Rapidly built applications often depend on API keys, database credentials, service-role tokens and webhook secrets. These can be embedded in client-side JavaScript, committed to a repository, returned in verbose errors or exposed through build artefacts. A public key is not always a vulnerability, but a credential with excessive privileges can provide direct access to data or paid services.
Backend-as-a-service platforms require particular care. A browser may legitimately communicate directly with a hosted database or API, but row-level security and access policies must enforce tenant and record boundaries on the server side. A polished user interface cannot compensate for an open data store.
API and business-logic abuse
OWASP’s API Security Top 10 includes unrestricted resource consumption, broken function-level authorisation and unrestricted access to sensitive business flows. In practical terms, an attacker might automate coupon creation, reserve scarce inventory, trigger thousands of paid SMS messages, repeatedly call an expensive AI model or bypass the intended sequence of an approval process.[13]
These flaws may not involve malformed input. Every individual request can be technically valid while the sequence, frequency or user context creates the abuse. Testers therefore assess rate limits, replay protections, workflow state, idempotency, concurrency and assumptions about which screen a user visited first.
File upload and content processing
Applications that accept résumés, images, invoices or other documents may fail to validate file type, size, storage location or retrieval permissions. Risks include stored cross-site scripting, malware distribution, overwrite of existing files, unauthorised document access and resource exhaustion. If an AI feature later processes uploaded content, a malicious document may also contain indirect instructions intended to influence the model.
Dependencies and deployment configuration
AI coding tools can select packages, frameworks and container images without establishing whether they are maintained, genuine or appropriate. Security testing should therefore be supported by software composition analysis, dependency review and secrets scanning. Penetration testing then examines whether a vulnerable component or insecure deployment is actually reachable and what impact exploitation could have.
Configuration deserves equal attention. Debug routes, permissive cross-origin resource sharing, default credentials, exposed administration panels, verbose stack traces and missing security headers can all turn an implementation oversight into an attack path. OWASP specifically recommends including deployment and infrastructure configuration in application security testing.[14]
AI-specific failures
Where the finished application contains an LLM or agent, additional testing is needed. A direct prompt injection attempts to override the application’s instructions through user input. An indirect injection hides malicious instructions in content the model later reads, such as a webpage, uploaded document or email.
The impact depends on what the model can access and do. A chatbot that can only draft text presents a different risk from an agent that can read customer records, send messages, issue refunds or execute code. OWASP recommends least privilege, deterministic validation of model outputs, human approval for high-risk actions and regular adversarial testing. Testing should therefore examine the entire system around the model: tools, identities, retrieval sources, output consumers, approval gates, logs and cost controls.[15]
Defining an effective scope
A weak scope produces a weak assurance result. Testing only the public homepage when the material risk sits in authenticated APIs, cloud storage or an administrative portal may generate a reassuring report without answering the organisation’s real security question.
For a vibe-coded web application, scoping should consider:
- All production domains, subdomains, APIs and relevant IP addresses.
- Staging environments where safe exploitation can be performed, while confirming material differences from production.
- User roles, including unauthenticated users, customers, staff, administrators, support personnel and separate tenants.
- Registration, login, password reset, multi-factor authentication and single sign-on flows.
- Sensitive workflows such as payments, approvals, exports, invitations, account recovery and changes to identity data.
- Data stores, object storage, serverless functions, background jobs and administrative interfaces.
- Third-party integrations, webhooks, identity providers, payment services and email or messaging platforms.
- File uploads, imports, exports and document-processing functions.
- LLM providers, system prompts, retrieval sources, agent tools and approval controls where generative AI exists at runtime.
- Explicit exclusions, rate limits, test windows, prohibited actions and third-party permissions.
OWASP ASVS can provide a useful requirements baseline, while OWASP WSTG supplies detailed testing scenarios. The final scope should still be tailored to the architecture and business impact. A healthcare intake portal, construction contractor system and public marketing tool do not warrant identical depth merely because each is a web application.[6][5]
Reasons to test
Validate security before release
The best time to discover that one customer can read another customer’s records is before real information enters the system. Pre-production testing provides an opportunity to repair design and implementation problems without incident response, mandatory notifications or emergency downtime.
Testing should not be postponed until the application is “finished”. Australian cyber security guidance recommends security throughout development, before releases and periodically afterwards, using complementary practices such as peer review, code review, unit and integration testing, SAST, DAST and software composition analysis. Penetration testing provides a later, adversarial validation of how those controls perform together in the running system.[11]
Measure real business impact
A scanner may report dozens of findings without showing which ones matter. Controlled exploitation can demonstrate that two moderate-looking weaknesses combine to expose customer data or obtain administrative access. This allows remediation to be prioritised according to credible attack paths rather than raw issue counts.
Support governance and assurance
Boards, executives, customers and procurement teams increasingly need evidence that a deployed application has been independently challenged, not simply a statement that it was built using a reputable platform. A well-structured report records scope, methodology, limitations, findings, evidence, risk ratings and recommended treatment. A retest then provides evidence that corrective work addressed the exploit path rather than only changing the visible symptom.
Penetration testing can also support specific obligations, depending on the organisation and system. APRA CPS 234 requires regulated entities to operate a systematic testing program whose nature and frequency reflect changing threats, asset criticality, incident consequences and material changes. PCI DSS v4.0.1 includes regular internal and external penetration testing and correction of exploitable vulnerabilities for the cardholder data environment. Under Australian Privacy Principle 11, covered entities must take reasonable steps to protect personal information from misuse, loss and unauthorised access, modification or disclosure. A penetration test can contribute evidence to these broader control frameworks, but it does not by itself establish complete compliance.[16][17][18]
Test after material change
Vibe-coded applications can change significantly through a short prompt: replace authentication, add an admin dashboard, connect a payment provider, expose an export function or migrate the database. Each change can alter trust boundaries and invalidate earlier assurance. Risk-based retesting is appropriate after material architectural or security changes, not only on a calendar anniversary.
Improve development practices
A useful report identifies patterns as well as individual defects. If several findings arise because access control is enforced only in front-end components, the corrective action should include a central server-side authorisation pattern and regression tests. If secrets repeatedly appear in code, the organisation needs stronger credential management and repository scanning, not only removal of the exposed key.
A practical engagement lifecycle
A structured assessment commonly includes the following stages:
- Scoping and authorisation: Confirm objectives, assets, user roles, testing depth, exclusions, emergency contacts and third-party approvals.
- Architecture and threat review: Understand the application, technologies, sensitive information, trust boundaries and likely abuse cases.
- Reconnaissance and mapping: Identify exposed functions, endpoints, parameters, services and unexpected attack surface.
- Automated and manual testing: Use tools for breadth, then manually investigate authentication, authorisation, sessions, inputs, workflows and configurations.
- Controlled exploitation: Validate genuine weaknesses safely, capture evidence and assess whether issues can be chained.
- Risk analysis and reporting: Explain technical root cause, reproducible evidence, realistic impact and practical remediation to both executive and technical readers.
- Remediation support and retesting: Clarify findings, verify corrective work and document whether the original attack path has been closed.
PTES similarly describes pre-engagement, intelligence gathering, threat modelling, vulnerability analysis, exploitation, post-exploitation and reporting as distinct phases. The exact activities should be proportionate to risk and constrained by the agreed rules of engagement.[19]
What penetration testing cannot prove
A penetration test is a point-in-time assessment of an agreed scope. It cannot prove that an application is permanently secure, identify every possible defect or compensate for poor asset management and uncontrolled deployment. Results can also become stale quickly when AI tools or developers continue changing the application after testing.
Penetration testing should therefore sit within a wider secure development and governance process. That process should include documented security requirements, threat modelling, peer review, automated code and dependency analysis, secrets management, environment separation, logging, vulnerability handling and change control. CISA’s Secure by Design guidance treats customer security as a core product requirement across the lifecycle rather than an optional feature added after release.[20]
The goal is not to prohibit AI-assisted development. It is to apply the same engineering discipline expected of any software that processes sensitive data, handles money, supports business decisions or is exposed to the internet. Faster code generation should be matched by faster, repeatable and appropriately independent assurance.
Preparing for a test
Before engaging a penetration testing team, an organisation should be able to answer:
- What business process does the application support, and what would a compromise affect?
- What personal, financial, commercial or regulated data does it collect, process or expose?
- Which components were generated or configured using AI tools?
- Does the deployed product itself use an LLM, agent, RAG pipeline or AI-connected tools?
- Which domains, APIs, cloud accounts, storage services and administrative interfaces belong to the application?
- What user roles and tenant boundaries exist, and can representative test accounts be supplied?
- Which third parties must approve testing?
- Is a production-like test environment available, and how closely does it match production?
- Which actions are prohibited because they could affect customers, safety, availability or third-party costs?
- Who will own remediation, and when can retesting occur?
Incomplete answers are not a reason to avoid testing. They often reveal governance gaps that should be resolved as part of scoping.
From rapid build to defensible assurance
Vibe coding can compress weeks of development into days, but it does not remove the need for secure architecture, accountable change and technical verification. An application that works is only the starting point. Before it is trusted with customer information, payments, business operations or privileged integrations, the organisation needs evidence about how it behaves when someone deliberately steps outside the intended workflow.
Assured’s penetration testing team can assess web applications, APIs and associated attack surfaces using a scope matched to the application’s architecture, information sensitivity and business risk. For AI-enabled products, the engagement can also consider model-specific attack paths alongside conventional application security controls. The result should be more than a list of scanner findings: it should explain what can be exploited, why it matters, how to fix it and whether remediation has been effective.
Ready to assess an application?
If the application is already online, approaching release or has changed materially, the next step is to define what requires testing. The initial form asks for testing type, rough size and business context; it does not require IP ranges or a full technical inventory.
- Scope a penetration test in four short steps to request a fixed-price proposal.
- Book a free 15- or 30-minute call if it would be easier to discuss the scope first.
There is no obligation either way, and no testing or scanning begins from submitting the initial form.
References
- Andrej Karpathy on X: "There's a new kind of coding I call "vibe ...
- Veracode October 2025 Update: GenAI Code Security Report
- Security Weaknesses of Copilot-Generated Code in GitHub ...
- OWASP Top 10 for Large Language Model Applications
- OWASP Web Security Testing Guide
- OWASP Application Security Verification Standard (ASVS)
- Security Testing - OWASP Foundation
- Vulnerability Scanning Tools - OWASP Foundation
- Pre-engagement - The Penetration Testing Execution Standard
- OWASP Top 10 API Security Risks – 2023
- Guidelines for software development - Cyber.gov.au
- Preventing Web Application Access Control Abuse | Cyber.gov.au
- OWASP API Security Project
- The Web Security Testing Framework - OWASP Foundation
- LLM01:2025 Prompt Injection - OWASP Gen AI Security Project
- CPS 234 Information Security - APRA
- Payment Card Industry Data Security Standard - Middlebury
- Chapter 11: APP 11 Security of personal information | OAIC
- Penetration Testing Methodologies - OWASP Foundation
- Secure by Design - CISA
Need help with compliance?
Our GRC specialists can guide your organisation through implementation, from gap analysis and risk assessment to certification readiness.




