Skip to content
mouaad.sek:~$
SECURITY / BUILT-IN

This site is a
portfolio piece too.

A security portfolio should practice what it preaches. Every choice below is enforced by the build or the hosting config, not by good intentions. Check it yourself in one command.

Controls in place

The actual policy

Read at build time from the same vercel.json that the hosting platform applies, so this page cannot drift from production.

vercel.json → Content-Security-Policytxt
default-src 'self';
script-src 'self';
style-src 'self';
img-src 'self' data:;
font-src 'self';
connect-src 'self';
object-src 'none';
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
upgrade-insecure-requests

Design decisions

01

No inline code, anywhere

All JavaScript is bundled into one external file. Code samples are highlighted at build time with CSS classes instead of inline styles. Dynamic values (the card spotlight) go through the CSSOM, which CSP allows. Result: script-src and style-src can stay at self.

02

Static by design

There is nothing to hack on the server because there is no server logic: every page is pre-rendered HTML. Contact goes through mailto, so no form endpoint to spam or inject.

03

Nothing third-party

Fonts are bundled with the site, there are no analytics, no social widgets and no CDN scripts. Visitors are not tracked, and a compromised third party cannot inject code here.

04

Supply chain hygiene

A small dependency tree, a committed lockfile, and npm audit kept at 0. Astro was upgraded across two major versions to clear a critical advisory before it could matter.

Try to hack me

Paste an XSS payload, or pick one below, and inject it. This page really inserts it into the DOM, using a method that would execute scripts. The only thing standing in the way is the Content-Security-Policy, and the log shows the browser blocking each attempt in real time.

Runs only your own input, in your own browser. Nothing is sent anywhere.
Injected output
Browser security log

    Verify it yourself

    Headers are public. These commands and scanners show exactly what the browser receives.

    terminalbash
    $ curl -sI https://mouaadsek.dev | grep -iE "content-security|strict-transport|x-frame|referrer|permissions"

    Known limits

    ← Back to the portfolio
    Esc

    ↑↓ navigate · Enter open · Esc close