Appearance
Security
What AdminVora does, what it cannot do, and what you must do.
Threat model
AdminVora is a client-side UI layer. It cannot enforce authorisation, validate data, or protect a database. It can — and does — avoid introducing vulnerabilities and make the secure path the easy one.
| Threat | AdminVora's role | Your role |
|---|---|---|
| XSS | Writes person-entered text with textContent; ships no HTML sanitiser | Escape in your templates; sanitise any rich HTML you accept |
| CSRF | Makes no state-changing requests of its own | Send and verify the token in your own requests |
| Clickjacking | Documents the headers | Set X-Frame-Options / frame-ancestors |
| Supply chain | Pinned, checksummed, vendored dependencies | Audit your own dependencies |
| Data exposure | No telemetry, no external requests | Scope every query by tenant |
| Auth bypass | Provides UI only | Enforce every check server-side |
| Injection | Never builds queries | Parameterise; allow-list identifiers |
Warning — hiding a button is not authorisation. Every action a hidden button would have performed must be independently authorised on the server. UI-level permission checks are a convenience, never a control.
XSS
Escape by default
The runtime never parses text it did not write as HTML: everything person-entered reaches the page through textContent or a cloned node. It ships no HTML sanitiser, so the same rules apply to your own code:
| Situation | Use |
|---|---|
| Plain text | element.textContent = value |
| Rich text from users | A sanitiser you add yourself (DOMPurify is the usual choice), then innerHTML |
| Building markup | createElement + textContent, never a template string with user data |
| Attribute values | element.setAttribute(), never string concatenation into HTML |
| URLs | Validate the scheme before assigning |
js
// ❌ Stored XSS
row.innerHTML = `<td>${order.customerName}</td>`;
// ✅
const td = document.createElement('td');
td.textContent = order.customerName;
row.append(td);URL validation
js
export function safeUrl(url) {
try {
const parsed = new URL(url, location.origin);
if (!['http:', 'https:', 'mailto:', 'tel:'].includes(parsed.protocol)) return '#';
return parsed.href;
} catch { return '#'; }
}javascript:alert(1) in a user-supplied link is one of the oldest XSS vectors and still works in code that concatenates URLs without checking the scheme.
Trusted Types
Where supported, Trusted Types make an unsanitised innerHTML assignment throw instead of executing. Enforcing them requires a policy backed by a sanitiser you provide:
Content-Security-Policy: require-trusted-types-for 'script'; trusted-types defaultContent Security Policy
The recommended policy:
Content-Security-Policy:
default-src 'self';
script-src 'self' 'nonce-{RANDOM}' 'strict-dynamic';
style-src 'self' 'nonce-{RANDOM}';
img-src 'self' data: blob:;
font-src 'self';
connect-src 'self';
frame-ancestors 'none';
form-action 'self';
base-uri 'self';
object-src 'none';
upgrade-insecure-requests;
require-trusted-types-for 'script';AdminVora is designed to work under this policy without exceptions:
| Requirement | How AdminVora complies |
|---|---|
No unsafe-inline scripts | Only the boot script is inline, and it takes a nonce |
No unsafe-eval | No eval, no new Function, no string setTimeout |
| No external origins | Everything is self-hosted |
| No inline event handlers | All listeners attached in JS |
| No inline styles in components | Style hooks use custom properties on the element, which is permitted |
Important —
style-srcwith a nonce blocks thestyle="…"attribute unless you add'unsafe-hashes'. AdminVora uses inline styles only for custom-property overrides (style="--av-chart-height: 320px"), which most CSP configurations permit understyle-src-attr. If your policy forbids them entirely, set the properties from JavaScript instead.
Reporting
Content-Security-Policy-Report-Only: …; report-uri /api/csp-reportDeploy in report-only mode first, watch for a week, then enforce.
CSRF
The runtime makes no state-changing requests of its own — its only network traffic is import() of a vendor file from vendor/ — so it has no CSRF handling and nothing to attach a token to. CSRF is your application's concern; send the token from your own fetch wrapper:
js
function csrfHeader() {
const token = document.querySelector('meta[name="csrf-token"]')?.content;
return token ? { 'X-CSRF-TOKEN': token } : {};
}| Framework | Header | Source |
|---|---|---|
| Laravel | X-CSRF-TOKEN | <meta name="csrf-token"> |
| Django | X-CSRFToken | csrftoken cookie |
| Rails | X-CSRF-Token | <meta name="csrf-token"> |
| ASP.NET | RequestVerificationToken | Antiforgery token |
| Express (csurf) | X-CSRF-Token | Session |
Cookies
Set-Cookie: session=…; Secure; HttpOnly; SameSite=Lax; Path=/SameSite=Lax blocks CSRF for all cross-site POSTs while preserving normal navigation. Strict breaks OAuth returns and email links.
Important — sign-out must be a POST form. A GET logout URL can be triggered by a prefetch, an
<img>tag on a hostile page, or a link scanner.
Supply chain
The most likely way a frontend gets compromised in 2026.
| Control | Implementation |
|---|---|
| Exact version pinning | package-lock.json committed; npm ci in CI |
| Checksum verification | vendor.manifest.json with SHA-256 per file |
| No CDN | Nothing loads from an origin we do not control |
| Minimal dependencies | 4 eager, ~20 lazy, all audited |
| No postinstall scripts | npm ci --ignore-scripts in CI |
| Automated audit | npm audit + Dependabot on every PR |
| Signed releases | npm provenance attestations |
bash
npm run vendor:audit # fails on any checksum driftyaml
# .github/workflows/security.yml
- run: npm audit --audit-level=moderate
- run: npm run vendor:audit
- uses: github/codeql-action/analyze@v3
- uses: aquasecurity/trivy-action@masterThe Polyfill.io incident (2024) — where a domain sale turned a widely-used CDN script into a malware distributor overnight — is why AdminVora vendors everything. That attack was invisible to every site that used it until users started reporting redirects.
Dependency policy
| Rule | Reason |
|---|---|
| Permissive licence only (MIT/BSD/ISC/Apache-2.0/OFL) | Redistribution |
| Released within 12 months | Abandoned packages accumulate CVEs |
| No open critical or high CVEs | |
| Reviewed before addition | Someone reads the source |
Pinned exactly, never ^ or ~ in the manifest | Reproducibility |
| Removed when unused | Reduces attack surface |
Storage
js
// ✅ Non-sensitive UI preferences
localStorage.setItem('adminvora.prefs', JSON.stringify({ mode: 'dark', preset: 'urbanite' }));
// ❌ Never
localStorage.setItem('token', jwt);
localStorage.setItem('apiKey', key);
sessionStorage.setItem('user', JSON.stringify(user));localStorage is readable by any JavaScript on the origin, including injected script. Tokens belong in HttpOnly cookies, which JavaScript cannot read at all.
| Data | Where |
|---|---|
| Theme preferences | localStorage — fine |
| Draft form content | sessionStorage — acceptable, cleared on tab close |
| Session token | HttpOnly cookie — mandatory |
| API keys | Server only |
| PII | Server only |
File uploads
The full treatment is in File Upload. The six mandatory controls:
- Validate MIME by content (
finfo), never by extension or client-supplied type - Regenerate filenames server-side — never trust user input
- Store outside the web root, serve through an authorised controller
Content-Disposition: attachment+X-Content-Type-Options: nosniff- Sanitise SVG uploads, or force download (an SVG is an executable HTML document)
- Size limits at the web server, the runtime, and the application
Security headers
nginx
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), interest-cohort=()" always;
add_header Cross-Origin-Opener-Policy "same-origin" always;
add_header Cross-Origin-Resource-Policy "same-origin" always;| Header | Protects against |
|---|---|
| HSTS | Protocol downgrade, SSL stripping |
nosniff | MIME confusion attacks |
X-Frame-Options / frame-ancestors | Clickjacking |
Referrer-Policy | URL leakage to third parties |
Permissions-Policy | Unwanted device access |
| COOP | Cross-origin window attacks (Spectre) |
| CORP | Cross-origin resource inclusion |
Verify with securityheaders.com and Mozilla Observatory. Target: A+ on both.
Authentication UI
Covered in Authentication. The non-negotiables:
- CSRF token on every form, including OAuth initiation buttons
- Rate limiting by IP and by account
- Generic error messages — no account enumeration
- Session regeneration on login
- Single-use, time-limited reset tokens
- NIST-compliant password policy (length, breach check, no composition rules)
- Paste allowed in password fields
- POST for sign-out
Privacy
AdminVora collects nothing.
| Property | Status |
|---|---|
| Telemetry | None |
| Analytics | None |
| External requests | None |
| Cookies set by AdminVora | None |
localStorage written | One key: adminvora.prefs |
| Personal data processed | None |
This is what makes AdminVora deployable without a DPIA, a cookie banner, or a third-party processor agreement.
GDPR notes for your application
| Consideration | Guidance |
|---|---|
Theme preferences in localStorage | Strictly necessary — no consent required |
| A "remember me" cookie | Requires consent in most jurisdictions |
| Map tiles from a third party | Transmits IPs — disclose or self-host |
| Any analytics you add | Your responsibility |
| Right to erasure | Clear the preferences: AdminVora.theme.reset() |
Reporting a vulnerability
Do not open a public issue.
Email security@creativeigniter.com with:
- A description and impact assessment
- Reproduction steps or a proof of concept
- The affected version
- Your disclosure timeline preference
| Stage | Target |
|---|---|
| Acknowledgement | 48 hours |
| Initial assessment | 5 business days |
| Fix for critical severity | 7 days |
| Fix for high severity | 30 days |
| Public disclosure | Coordinated, after a patch ships |
A PGP key is published at https://creativeigniter.com/.well-known/security.txt.
Security checklist
Before launch
- [ ] CSP deployed and enforced (not report-only)
- [ ] All security headers set; A+ on Mozilla Observatory
- [ ] HTTPS everywhere with HSTS preload
- [ ]
APP_DEBUG/DEBUGfalse in production - [ ] No stack traces, SQL, or file paths in error responses
- [ ] Session cookies
Secure,HttpOnly,SameSite=Lax - [ ] CSRF verified on every state-changing request
- [ ] Rate limiting on auth, search, and export endpoints
- [ ] All queries scoped by tenant
- [ ] Sort and filter columns allow-listed
- [ ] File uploads validated by content, stored outside the web root
- [ ] User-generated HTML sanitised server-side
- [ ]
npm auditclean;npm run vendor:auditpassing - [ ] No secrets in the frontend bundle
- [ ] No tokens in
localStorage - [ ] Authorisation enforced server-side for every action
Ongoing
- [ ] Dependabot enabled with weekly review
- [ ] CSP violation reports monitored
- [ ] Auth events logged with IP and user agent
- [ ] Penetration test annually
- [ ] Incident response plan documented and rehearsed
Read next: Testing.