Skip to main content

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.

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).

Source: Microsoft Learn:Task Scheduler Schema Elements

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.

Source: Microsoft Learn:Task Scheduler Schema Elements

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.

Type to search projects and posts too