Tools · Self-hosting Checks
Self-hosting Checks
Five checks from running this very site: CSP headers, Cloudflare Tunnel config, Windows scheduled-task XML, PowerShell script encoding and Tailwind v4 variables. Paste or drop it in; it's checked in your browser.
A long Content-Security-Policy you can't read? Paste it to see what each directive does, where it's too loose and what's missing, all at once.
6 directives: 1 high-risk, 3 medium-risk, 2 low-risk.
Findings
High riskscript-src'unsafe-inline' lets any inline script run, including a <script> injected through XSS, which makes script-src practically useless.
→ Use a nonce (a random value generated per request, set in <script nonce=…> and in the header) or a hash, and add 'strict-dynamic'.
Medium riskscript-srchttps://cdn.jsdelivr.net is a public CDN: any script anyone uploads there can be loaded by your page (known CSP bypasses exist).
→ Add a path (https://cdn.example/your-package/) or pin the file with a hash (SRI).
Medium riskobject-srcobject-src isn't blocked: plugin content (<object>, <embed>) falls back to default-src, which is usually wider than needed.
→ Add object-src 'none'.
Medium riskbase-uriNo base-uri: an injected <base href> can redirect every relative script path on the page to an attacker's site (base-uri does not fall back to default-src).
→ Add base-uri 'self' (or 'none').
Low riskstyle-src'unsafe-inline' allows all inline styles. It is less dangerous than for scripts (mostly used to leak data or spoof the UI), and many frameworks can't drop it yet.
→ Use a nonce/hash if you can; Next.js and CSS-in-JS often need it for now.
Low riskform-actionNo form-action: an injected form can submit data to any URL (form-action does not fall back to default-src).
→ Add form-action 'self'.
NoteNo upgrade-insecure-requests: leftover http:// resources on the page won't be upgraded to https://.
NoteNo report-uri / report-to: you won't be told when the browser blocks something. While tuning a policy, start with Report-Only and collect the reports.
Directives
default-src
Default source when a more specific -src directive is missing (fallback)
'self'
script-src
Where JavaScript may load from, and whether inline scripts may run
'self''unsafe-inline'https://cdn.jsdelivr.net
style-src
Where CSS may load from, and whether inline <style> is allowed
'self''unsafe-inline'
img-src
Image sources
'self'data:https:
connect-src
Where fetch, XHR, WebSocket and EventSource may connect
'self'https://api.example.com
frame-ancestors
Who may embed this page in an iframe (clickjacking protection, replaces X-Frame-Options)
'self'
This site's own CSP was tuned from Report-Only up to enforcing: collect violation reports first, add the sources that were blocked by mistake, then switch to a policy that really blocks. This tool turns the things I kept checking during that process into a checklist.
It only judges how the policy is written: for example 'unsafe-inline' in script-src, *, a bare https:, or a public CDN without a path all let an XSS-injected script run anyway. It doesn't connect to check that URLs exist and doesn't know what your site actually loads, so "no findings" doesn't mean "no problems". Frameworks (Next.js inline scripts, for example) sometimes have to accept certain patterns first, so tighten gradually with Report-Only after you get the results.
Everything is compared in your browser; what you paste is never sent anywhere.
Paste a config.yml to check the ingress rules and see how routes will be matched.
△ No errors, 1 note
- △ NoteLine 7Rule 2 "blog.example.com" comes after rule 1, the wildcard "*.example.com", which may catch it first. Cloudflare's examples put specific rules first; run `cloudflared tunnel ingress rule https://blog.example.com` to see which rule really matches.
Route order (top to bottom)
- 1*.example.com→http://localhost:8080
- 2blog.example.com→http://localhost:3000
- 3(everything else)→http_status:404
The checks follow what Cloudflare's Configuration file page says explicitly: a config with ingress must end in a catch-all rule (no hostname and no path); wildcards are only supported at the start (*.example.com); warp-routing is no longer supported from cloudflared 2023.9.0. Things the docs don't spell out (whether the first matching rule wins, whether service must include a protocol) only get a note, not an error.
This is not a full YAML parser; it only understands the common shapes of tunnel, credentials-file and the ingress list. The most reliable check is cloudflared tunnel ingress validate on the machine itself, and to see which rule a URL matches use cloudflared tunnel ingress rule https://your-url.
Config looks fine but the site is still unreachable? Check that the service's start command includes tunnel run; how I found that out is in the post about the site being down for 4 days without anyone noticing.
Paste the XML exported from Windows Task Scheduler to see when the task runs, what it runs and as whom, with the settings that usually bite flagged.
The facts here come from Microsoft Learn's Task Scheduler schema reference: without ExecutionTimeLimit a task is stopped after 72 hours (PT0S means no limit), and RestartOnFailure takes an interval of 1 minute to 31 days and a count of 1 to 255. Settings the documentation does not pin down, such as the default of MultipleInstancesPolicy, are only described as written, never guessed.
The XML is read by a small parser in your browser and never uploaded; the tool explains the file and does not change any task.
Does a .ps1 with non-English text come out garbled, or fail with a baffling "string is missing the terminator" error under Windows PowerShell 5.1? Drop it in to see whether it's missing a BOM.
When the Windows built-in PowerShell 5.1 (powershell.exe) reads a file without a BOM, it doesn't guess UTF-8; it uses the system code page, which is Big5 on Traditional Chinese Windows and Shift-JIS on Japanese Windows. A UTF-8 CJK character is 3 bytes, and read as a legacy code page the bytes are split in the wrong places and swallow the quotes, giving errors like "the string is missing the terminator" that have nothing to do with your logic, and that land somewhere different each time.
The fix is to save as "UTF-8 with BOM": 3 extra bytes (EF BB BF) at the start, which tell PowerShell 5.1 the file is UTF-8. PowerShell 7 (pwsh) defaults to UTF-8 and doesn't have the problem, but plenty of scheduled tasks and older servers still run 5.1. This site's own monitoring scripts hit it once.
Adding a BOM doesn't change a single character, only prepends 3 bytes. Files are read in your browser and never uploaded.
After upgrading to Tailwind v4, did some button backgrounds or text colors vanish? It is most likely the v3 square-bracket-plus-CSS-variable syntax. Paste your code to find what to change.
Found 4 usages that break in v4:
- Line 1bg-[--accent] → bg-(--accent)
- Line 1text-[--bg] → text-(--bg)
- Line 1hover:bg-[--accent-lt] → hover:bg-(--accent-lt)
- Line 2border-[--border] → border-(--border)
Fixed version
<button className="bg-(--accent) text-(--bg) hover:bg-(--accent-lt)"> <span className="border-(--border)/50 w-[1px] text-[13px]">ok</span> </button>
v4 removed the shorthand that puts a CSS variable straight inside square brackets and replaced it with parentheses, for example bg-(--accent). The old syntax doesn't raise an error; it compiles to an invalid CSS declaration (the value becomes the literal --accent instead of var()), and the browser ignores it. So a theme that happens to get by on an inherited color looks fine while the other theme goes completely invisible.
That is exactly what happened to this site in July 2026: 116 places, and the home page buttons turned transparent in light mode. The fix, and another trap I hit (Tailwind compiles counter-examples in .md docs as classes too), are written up on this site's project page. Square brackets are kept for real literal values (w-[1px], text-[13px]), and this tool leaves those alone.
Everything is compared in your browser; what you paste is never sent anywhere.
FAQ
Why does my Task Scheduler task stop by itself after 3 days?
When ExecutionTimeLimit is missing from the XML, the default is 72 hours, and the task is stopped when it is reached (running it manually is not subject to the limit). Long-running programs need PT0S (no limit).
How do I get a task's XML?
In Task Scheduler, right-click the task and choose Export, or run schtasks /query /tn "TaskName" /xml on the command line, and paste the output into the tool.
What range do RestartOnFailure's Interval and Count accept?
According to Microsoft's documentation, Interval must be between 1 minute and 31 days and Count an integer from 1 to 255; the tool flags anything outside that as an error.
Is the XML I paste uploaded?
No. It is parsed entirely in your browser, and the tool only explains it; it never changes your tasks.