website security testing
Website Security Testing: A Checklist Based on OWASP, Thailand's NCSA Standard and Supabase RLS
Website Security Testing: A Checklist Based on OWASP, Thailand's NCSA Standard and Supabase RLS
A website is an organisation's front door on the internet, and one of the points most frequently attacked. Thailand's Website Security Standard B.E. 2568 (2025), published in the Royal Gazette (the Thai government's official journal, in which laws and regulations are formally published), states in its introduction that, according to cyber threat response statistics for 2023–2024, 44 per cent of all cyber threats involved websites. These included hacked websites (for example, defaced pages or pages injected with gambling content) as well as fake websites (Royal Gazette, Vol. 142, Special Part 305 Ngor).
This article brings together a website and web app security checklist that your team can work through itself, with reference to OWASP Top 10:2025 and Thailand's website standard. It also includes a dedicated section for apps that use Supabase as their backend, an approach that is becoming very popular among start-ups and apps built with AI tools.
Use this checklist only to check your own systems. Testing other people's systems without permission may be against the law.
What is the Website Security Standard B.E. 2568 (2025)?
The Notification of the National Cyber Security Committee on the Website Security Standard B.E. 2568 (2025), also known as Website Security Standard Version 1.0. The standard is overseen by the NCSA (Thailand's National Cyber Security Agency, the government body responsible for national cyber security policy and incident coordination).
| Topic | What the notification states |
|---|---|
| Date of notification | Signed on 10 Sep 2025; published in the Royal Gazette on 16 Sep 2025 |
| Effective date | Once one year has elapsed from the date of publication in the Royal Gazette |
| Who must comply | Government agencies, regulatory or supervisory bodies, and Critical Information Infrastructure (CII) organisations |
| Private sector | The NCSA promotes and supports adopting it as a guideline |
| Scope | Internet-connected websites, whether on the organisation's own systems (on-premises), in the cloud or on web hosting services. It is divided into security governance, security of web servers (websites, web server software, web applications, CMS, operating systems, SSL/TLS) and database servers |
| Other components to consider | For example EDR, XDR, firewalls, WAF, DNS/DNSSEC and physical access control |
| Vulnerability scanning | Should be carried out regularly, at intervals not exceeding 90 days (a footnote recommends every 30 days) |
| Penetration testing | Organisations "may" consider carrying it out; testers should hold certifications such as OSCP, OSWE, GPEN or GWAPT |
The NCSA has created a website explaining the standard at websitesecurity.ncsa.or.th, which summarises the structure of the requirements, website impact levels and a self-assessment form. That website states that the text of the notification as published in the Royal Gazette takes precedence.
The table above summarises only the parts the author read directly in the notification as published in the Royal Gazette. For the full requirements, exemptions by impact level and the assessment forms, rely on the full notification.
For private businesses: although it is not mandatory for you, this standard is a good Thai-language reference framework, and it may be used as a benchmark when working with government agencies or large organisations.
OWASP Top 10:2025 made simple
The OWASP Top 10 is a list of web application security risks used as a reference worldwide. The latest edition is OWASP Top 10:2025.
| Rank | Risk | Common examples |
|---|---|---|
| A01 | Broken Access Control | Changing the id number in a link and seeing someone else's order (IDOR); ordinary users being able to call admin APIs |
| A02 | Security Misconfiguration | Debug pages left on in production; databases open to the public; no security headers |
| A03 | Software Supply Chain Failures | Using libraries that have vulnerabilities or have been injected with malicious code |
| A04 | Cryptographic Failures | Storing passwords without encryption; sending sensitive data over unencrypted channels |
| A05 | Injection | SQL injection and XSS caused by not validating or escaping user input |
| A06 | Insecure Design | Designing a password reset or coupon system that can be reused |
| A07 | Authentication Failures | No limit on password guessing; sessions that never expire |
| A08 | Software or Data Integrity Failures | Applying updates or accepting data without verifying its integrity |
| A09 | Security Logging and Alerting Failures | No logs and no alerts, so you never know you have been attacked |
| A10 | Mishandling of Exceptional Conditions | The system exposes data or skips checks when an error occurs |
Note that broken access control is ranked number one in both the 2021 and 2025 editions, and it is a category that automated scanning tools often fail to detect.
A website security checklist your team can work through itself
1. Inventory and configuration
- Keep a list of all the organisation's websites, domains, subdomains and APIs, with a named owner for each
- Every page uses HTTPS, and SSL/TLS certificates have not expired
- Turn off debug pages, detailed error pages, backup files and directories that should not be exposed
- Set the key security headers, such as Content-Security-Policy, Strict-Transport-Security and X-Content-Type-Options
- Admin pages are not open to the public unless necessary, or access to them is restricted
2. Authentication and access control
- Limit the number of failed login attempts, and use multi-factor authentication for administrators
- Sessions expire when inactive, and logging out genuinely ends the session
- Test with two accounts: can account A access account B's data, through both the web pages and the API?
- Ordinary users cannot call admin functions directly through the API
- Access checks are carried out on the server or in the database, not just by hiding buttons on the web page
3. User input
- Use parameterised queries or an ORM rather than building SQL strings yourself
- Escape data before displaying it, to prevent XSS
- Check the type and size of uploaded files, and do not allow uploaded files to be executed as code
4. Secrets and libraries
- No API keys, passwords or secrets in front-end code or in the git history
- Check for libraries with publicly disclosed vulnerabilities using the tooling for your language (such as
npm audit), and update them on a regular cycle - Update your CMS, plugins and themes (if used) regularly, and remove plugins you don't use
5. Monitoring and recovery
- Keep logs of logins, permission changes and access to important data
- Have alerts in place for unusual behaviour
- Back up your data and genuinely test restoring it
- Have an incident response plan, including steps to assess and notify a personal data breach within 72 hours under Section 37(4) of the Personal Data Protection Act B.E. 2562 (2019), where the conditions apply. The PDPA is Thailand's main data-privacy law, overseen by the PDPC (Personal Data Protection Committee) (unofficial translation, PDPC Office)
6. Periodic scanning and testing
- Scan for vulnerabilities regularly (the 2025 website standard states this should not exceed 90 days)
- Have specialists carry out penetration testing before launching a new system and after major changes
- Use OWASP ASVS 5.0 as your list of requirements when you need a more detailed review
Apps using Supabase: check Row Level Security before anything else
Supabase is a very popular backend for quickly built apps, including apps built with AI tools (vibe coding). The key point to understand is that apps like these often let the web page talk to the database directly through an API, using a key that sits in the web page. Data security therefore depends mainly on Row Level Security (RLS).
What Supabase's documentation says
- Tables in a schema exposed through the API without RLS can be read and written by any role that has access, and Supabase recommends enabling RLS on every table in an exposed schema (Supabase Docs: Row Level Security)
- Once RLS is enabled, the publishable key cannot access any data through the API until you create policies
- The publishable key (formerly called the anon key) can be exposed in a web page, but it can only access what RLS allows. The secret key (formerly called service_role), however, bypasses RLS entirely and must be used only on the backend (Supabase Docs: API keys)
- Supabase's database linter has an ERROR-level rule,
0013_rls_disabled_in_public, which warns that anyone with the project URL can read, edit and delete all data in tables that do not have RLS enabled (Supabase Docs: Database Linter)
A real-world example
In 2025, CVE-2025-48757 was published concerning apps built with the Lovable platform, which uses Supabase as its backend. It stated that insufficient RLS policies allowed unauthenticated attackers to read or write the tables of the generated apps (NVD). The researcher who reported it stated that 1,645 projects were scanned and 170 projects (around 10.3%) were found to have insufficient RLS configuration (reporter's statement).
A fair observation: this CVE concerns apps built with Lovable, not a vulnerability in Supabase itself, and the platform provider has argued that data security is the responsibility of each app's owner. The lesson is therefore clear: tools let you build apps quickly, but configuring data security is still the app owner's job.
Supabase checklist
- Open the Security Advisor in Supabase Studio and fix every ERROR-level item, especially
rls_disabled_in_public - RLS is enabled on every table in the
publicschema (and any other schema exposed through the API) - Every table with RLS enabled has policies that restrict access by the actual user, not a policy that unintentionally allows everyone (
using (true)) - Policies for insert and update include
with check, so users cannot write data in someone else's name - The secret key / service_role is not in web page code, mobile apps or any published files
- Storage buckets holding private files are not set to public and are governed by policies
- Edge Functions or server-side APIs that use the secret key check the caller's permissions before doing anything
- Test with two user accounts to confirm that neither can read or edit the other's data
A basic policy example
This example is adapted from the pattern in Supabase's documentation, so that logged-in users can see only their own rows.
alter table public.orders enable row level security;
create policy "Users can view their own orders"
on public.orders for select
to authenticated
using ( (select auth.uid()) = user_id );
create policy "Users can create their own orders"
on public.orders for insert
to authenticated
with check ( (select auth.uid()) = user_id );
Real policies depend on each app's data structure and business rules, for example data shared by several members of a team, or admin permissions. Test every policy with accounts in several roles before going live.
When to bring in specialists
The checklist above helps close many basic vulnerabilities, but there are several situations in which you should have specialists carry out testing:
- Your web app stores customers' personal, financial or health data
- You are about to launch a new system, or add features involving payments or user permissions
- Your app was built with AI tools or a rapid app-building platform, and the team isn't sure about the database configuration
- Corporate clients or government agencies are asking for evidence of security testing
- Your organisation must comply with the 2025 website standard or with the requirements of a regulator
(You can read more about the difference between a VA and a pentest, and how to choose a provider, in our article on what a pentest is.)
Summary
Website security starts with the basics: know which systems you have, configure them correctly, enforce access control on the server, look after secrets and libraries, monitor, and scan on a regular cycle. For apps that use Supabase, start by enabling RLS on every table and fixing the items in the Security Advisor. Organisations within the scope of the Website Security Standard B.E. 2568 (2025) should study the full notification and the NCSA's self-assessment form.
Want to know whether your system is secure enough?
Prompt Lab Technology tests the security of web apps, APIs and cloud back-end systems, including platforms popular with start-ups and SMEs such as Supabase, Firebase and Vercel. We check for vulnerabilities in line with the OWASP Top 10, database access rules such as row-level security, secret keys leaked in code, and security header configuration, always with written permission from the system owner. See the details on our penetration testing and security assessment service page.
References
- Notification of the National Cyber Security Committee on the Website Security Standard B.E. 2568 (2025) (in Thai). Royal Gazette, Vol. 142, Special Part 305 Ngor (16 Sep 2025), pp. 33–35 (the notification itself), and the standard annexed to the notification (introduction, scope, and the section on vulnerability assessment and penetration testing, document pages 27–28). https://ratchakitcha.soc.go.th/documents/86192.pdf (accessed 2026-11-25)
- NCSA. Website explaining the Website Security Standard. https://websitesecurity.ncsa.or.th/index.html (accessed 2026-11-25)
- OWASP. Top 10:2025. https://top10.owasp.org/2025 · Top 10:2021. https://top10.owasp.org/2021/ · ASVS 5.0.0. https://asvs.owasp.org/ (accessed 2026-11-25)
- Supabase Docs. Row Level Security. https://supabase.com/docs/guides/database/postgres/row-level-security · API keys. https://supabase.com/docs/guides/api/api-keys · Database Linter: 0013_rls_disabled_in_public. https://supabase.com/docs/guides/database/database-linter?lint=0013_rls_disabled_in_public (accessed 2026-11-25)
- NVD. CVE-2025-48757 (published 30 May 2025, status: disputed). https://nvd.nist.gov/vuln/detail/CVE-2025-48757 (accessed 2026-11-25 via the NVD API)
- Palmer, M. Statement on CVE-2025-48757 (29 May 2025). https://mattpalmer.io/posts/statement-on-CVE-2025-48757/ (accessed 2026-11-25)
- Personal Data Protection Act B.E. 2562 (2019), unofficial English translation (PDPC Office). https://www.pdpc.or.th/wp-content/uploads/2023/12/2_Personal-Data-Protection-Act-2019.pdf (accessed 2026-11-25)
Frequently asked questions
Does Thailand's Website Security Standard B.E. 2568 (2025) apply to private-sector websites?
The notification requires government agencies, regulatory or supervisory bodies, and Critical Information Infrastructure (CII) organisations to comply with the standard. For private-sector organisations, the NCSA will promote and support adopting it as a guideline. For the details, rely on the notification as published in the Royal Gazette.
How often should we scan a website for vulnerabilities?
The Website Security Standard B.E. 2568 (2025) states that organisations should scan for vulnerabilities regularly, at an appropriate interval but not exceeding 90 days, and a footnote recommends scanning every 30 days.
What is Supabase RLS?
Row Level Security is a PostgreSQL mechanism that Supabase uses to control which rows of data each user can read or write. Supabase's documentation states that tables in a schema exposed through the API without RLS enabled can be read and written by any role that has access, so RLS must be enabled on every table in an exposed schema.
Can the Supabase anon key be included in a web page?
Yes. Supabase's documentation states that the publishable key (formerly called the anon key) is safe to expose, but it can only access what RLS allows. The secret key (formerly called service_role), however, bypasses RLS entirely and must never be placed in a browser or any client-side app.
If we already use a free scanning tool, do we still need a pentest?
Scanning tools are good at catching known vulnerabilities, but they often miss flaws in access control and application logic, such as one user changing a number in a link and seeing someone else's data. Systems that store customer data should be tested by specialists periodically.
