Security
Security of this site.
This site is a set of static files. There is no database, no login, no admin panel and no forms: no code of mine runs on the server at all.
What there is to attack
- Static HTML, CSS and JavaScript, built in GitHub Actions and copied to the web server.
- No server-side code: PHP and other scripts are blocked on the server.
- The deployment pipeline: a deploy-only key, used only by GitHub Actions.
Threat model
| Threat | Defence |
|---|---|
| Injected scripts (XSS) | A strict content security policy allows only this site's own scripts, plus hashes for the few inline ones. There is no user-generated content on the pages. |
| Spam and form abuse | There are no forms. Contact links open your own email app, so there is nothing on the server to abuse. |
| Leaked secrets | The pages need no secrets at all. Deployment credentials exist only in CI secrets, never in the pages or the repository. |
| Supply-chain compromise | A committed lockfile, clean installs in CI, GitHub Actions pinned to commit hashes, and no third-party scripts in the pages. |
| Clickjacking and data leaks to other sites | Framing is refused, and the referrer policy sends only the origin to other sites. |
| Personal data published by mistake | Every build is scanned for identity numbers and other personal details, and fails if any are found. |
Headers this site sends
Strict-Transport-Securitymax-age=31536000; includeSubDomainsX-Content-Type-OptionsnosniffReferrer-Policystrict-origin-when-cross-originX-Frame-OptionsDENYCross-Origin-Opener-Policysame-originCross-Origin-Resource-Policysame-sitePermissions-Policycamera=(), microphone=(), geolocation=(), payment=(), usb=(), interest-cohort=(), browsing-topics=()
Content security policy
The policy allows scripts only from this site and the optional cookieless analytics beacon, and forbids forms and embedded frames. Search runs as WebAssembly, which needs the wasm-unsafe-eval keyword; it permits compiling WebAssembly only, not JavaScript eval.
| Directive | Allowed sources |
|---|---|
default-src | 'self' |
script-src | 'self', 'wasm-unsafe-eval', https://static.cloudflareinsights.com, 5 sha256 hashes for inline code |
style-src | 'self', 1 sha256 hash for inline code |
img-src | 'self', data:, https://images.unsplash.com |
font-src | 'self' |
connect-src | 'self', https://cloudflareinsights.com |
frame-src | 'none' |
form-action | 'none' |
base-uri | 'self' |
object-src | 'none' |
frame-ancestors | 'none' |
upgrade-insecure-requests | (on) |
Privacy
- No cookies.
- No third-party scripts or fonts.
- Your choice of view, reading level and theme is stored only in your own browser.
- The university-referrer suggestion is worked out in your browser; nothing is sent anywhere.
My security record
I report web application vulnerabilities to the organisations that own them. 50+ responsible-disclosure acknowledgements from organisations across Sri Lanka.
- University of York (UK): Acknowledged for responsible vulnerability disclosure; listed on the official Hall of Thanks.
- Dialog Axiata PLC (Sri Lanka): Acknowledged for responsible disclosure of security vulnerabilities.
How I disclose
- I report only to the affected organisation, through its published channel where one exists.
- I test only what is needed to demonstrate a vulnerability and never access, keep or share personal data.
- I allow a reasonable remediation period before discussing any finding publicly, and only in anonymised form.
Only organisations that have publicly acknowledged a report are named. Others appear only in the total.
Report a vulnerability
Email hi@haranbabi.me. Contact details are also in/.well-known/security.txt (RFC 9116). I follow the samedisclosure policy I ask of others: tell me privately, give me time to fix it, and I will credit you here.
Hall of thanks
No reports yet. Be the first.