Skip to content

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.

ThreatAdminVora's roleYour role
XSSWrites person-entered text with textContent; ships no HTML sanitiserEscape in your templates; sanitise any rich HTML you accept
CSRFMakes no state-changing requests of its ownSend and verify the token in your own requests
ClickjackingDocuments the headersSet X-Frame-Options / frame-ancestors
Supply chainPinned, checksummed, vendored dependenciesAudit your own dependencies
Data exposureNo telemetry, no external requestsScope every query by tenant
Auth bypassProvides UI onlyEnforce every check server-side
InjectionNever builds queriesParameterise; 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:

SituationUse
Plain textelement.textContent = value
Rich text from usersA sanitiser you add yourself (DOMPurify is the usual choice), then innerHTML
Building markupcreateElement + textContent, never a template string with user data
Attribute valueselement.setAttribute(), never string concatenation into HTML
URLsValidate 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 default

Content 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:

RequirementHow AdminVora complies
No unsafe-inline scriptsOnly the boot script is inline, and it takes a nonce
No unsafe-evalNo eval, no new Function, no string setTimeout
No external originsEverything is self-hosted
No inline event handlersAll listeners attached in JS
No inline styles in componentsStyle hooks use custom properties on the element, which is permitted

Important — style-src with a nonce blocks the style="…" 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 under style-src-attr. If your policy forbids them entirely, set the properties from JavaScript instead.

Reporting ​

Content-Security-Policy-Report-Only: …; report-uri /api/csp-report

Deploy 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 } : {};
}
FrameworkHeaderSource
LaravelX-CSRF-TOKEN<meta name="csrf-token">
DjangoX-CSRFTokencsrftoken cookie
RailsX-CSRF-Token<meta name="csrf-token">
ASP.NETRequestVerificationTokenAntiforgery token
Express (csurf)X-CSRF-TokenSession

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.

ControlImplementation
Exact version pinningpackage-lock.json committed; npm ci in CI
Checksum verificationvendor.manifest.json with SHA-256 per file
No CDNNothing loads from an origin we do not control
Minimal dependencies4 eager, ~20 lazy, all audited
No postinstall scriptsnpm ci --ignore-scripts in CI
Automated auditnpm audit + Dependabot on every PR
Signed releasesnpm provenance attestations
bash
npm run vendor:audit     # fails on any checksum drift
yaml
# .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@master

The 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 ​

RuleReason
Permissive licence only (MIT/BSD/ISC/Apache-2.0/OFL)Redistribution
Released within 12 monthsAbandoned packages accumulate CVEs
No open critical or high CVEs
Reviewed before additionSomeone reads the source
Pinned exactly, never ^ or ~ in the manifestReproducibility
Removed when unusedReduces 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.

DataWhere
Theme preferenceslocalStorage — fine
Draft form contentsessionStorage — acceptable, cleared on tab close
Session tokenHttpOnly cookie — mandatory
API keysServer only
PIIServer only

File uploads ​

The full treatment is in File Upload. The six mandatory controls:

  1. Validate MIME by content (finfo), never by extension or client-supplied type
  2. Regenerate filenames server-side — never trust user input
  3. Store outside the web root, serve through an authorised controller
  4. Content-Disposition: attachment + X-Content-Type-Options: nosniff
  5. Sanitise SVG uploads, or force download (an SVG is an executable HTML document)
  6. 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;
HeaderProtects against
HSTSProtocol downgrade, SSL stripping
nosniffMIME confusion attacks
X-Frame-Options / frame-ancestorsClickjacking
Referrer-PolicyURL leakage to third parties
Permissions-PolicyUnwanted device access
COOPCross-origin window attacks (Spectre)
CORPCross-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.

PropertyStatus
TelemetryNone
AnalyticsNone
External requestsNone
Cookies set by AdminVoraNone
localStorage writtenOne key: adminvora.prefs
Personal data processedNone

This is what makes AdminVora deployable without a DPIA, a cookie banner, or a third-party processor agreement.

GDPR notes for your application ​

ConsiderationGuidance
Theme preferences in localStorageStrictly necessary — no consent required
A "remember me" cookieRequires consent in most jurisdictions
Map tiles from a third partyTransmits IPs — disclose or self-host
Any analytics you addYour responsibility
Right to erasureClear 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
StageTarget
Acknowledgement48 hours
Initial assessment5 business days
Fix for critical severity7 days
Fix for high severity30 days
Public disclosureCoordinated, 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 / DEBUG false 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 audit clean; npm run vendor:audit passing
  • [ ] 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.

Documentation for @creativeigniter/adminvora