[{"data":1,"prerenderedAt":1505},["ShallowReactive",2],{"navigation_docs":3,"-security-testing":613,"-security-testing-surround":1502},[4,39,101,378,540,562,584,606],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":38},"Start","i-lucide-rocket","\u002Fstart","1.start",[10,14,18,22,26,30,34],{"title":11,"path":12,"stem":13},"Our approach","\u002Fstart\u002Four-approach","1.start\u002F0.our-approach",{"title":15,"path":16,"stem":17},"Introduction","\u002Fstart\u002Fintroduction","1.start\u002F1.introduction",{"title":19,"path":20,"stem":21},"Concepts","\u002Fstart\u002Fconcepts","1.start\u002F2.concepts",{"title":23,"path":24,"stem":25},"Glossary","\u002Fstart\u002Fglossary","1.start\u002F3.glossary",{"title":27,"path":28,"stem":29},"Try it locally","\u002Fstart\u002Ftry-it-locally","1.start\u002F4.try-it-locally",{"title":31,"path":32,"stem":33},"Features","\u002Fstart\u002Ffeatures","1.start\u002F5.features",{"title":35,"path":36,"stem":37},"Questions","\u002Fstart\u002Ffaq","1.start\u002F6.faq",false,{"title":40,"icon":41,"path":42,"stem":43,"children":44,"page":38},"Run SHADE","i-lucide-server","\u002Frun","2.run",[45,49,53,57,61,65,69,73,77,81,85,89,93,97],{"title":46,"path":47,"stem":48},"Setting up an instance (Coolify)","\u002Frun\u002Fcoolify","2.run\u002F1.coolify",{"title":50,"path":51,"stem":52},"Console commands","\u002Frun\u002Fconsole","2.run\u002F10.console",{"title":54,"path":55,"stem":56},"Rotating APP_SECRET","\u002Frun\u002Frotating-app-secret","2.run\u002F11.rotating-app-secret",{"title":58,"path":59,"stem":60},"Checking an instance","\u002Frun\u002Fdoctor","2.run\u002F12.doctor",{"title":62,"path":63,"stem":64},"Self-hosting by hand","\u002Frun\u002Fown-server-by-hand","2.run\u002F13.own-server-by-hand",{"title":66,"path":67,"stem":68},"NixOS (experimental)","\u002Frun\u002Fnixos","2.run\u002F14.nixos",{"title":70,"path":71,"stem":72},"Self-hosting without Coolify","\u002Frun\u002Fown-server","2.run\u002F2.own-server",{"title":74,"path":75,"stem":76},"Hosting the site on a static host","\u002Frun\u002Fstatic-hosts","2.run\u002F3.static-hosts",{"title":78,"path":79,"stem":80},"Licence","\u002Frun\u002Flicence","2.run\u002F4.licence",{"title":82,"path":83,"stem":84},"Updating and backups","\u002Frun\u002Fupdating-and-backups","2.run\u002F5.updating-and-backups",{"title":86,"path":87,"stem":88},"Troubleshooting","\u002Frun\u002Ftroubleshooting","2.run\u002F6.troubleshooting",{"title":90,"path":91,"stem":92},"Logs, request ids, traces and metrics","\u002Frun\u002Flogs","2.run\u002F7.logs",{"title":94,"path":95,"stem":96},"Maintenance mode","\u002Frun\u002Fmaintenance-mode","2.run\u002F8.maintenance-mode",{"title":98,"path":99,"stem":100},"Usage limits","\u002Frun\u002Fusage-limits","2.run\u002F9.usage-limits",{"title":102,"icon":103,"path":104,"stem":105,"children":106},"Guide","i-lucide-book-open","\u002Fguide","3.guide",[107,109,147,192,210,280,310,364],{"title":102,"path":104,"stem":108},"3.guide\u002Findex",{"title":110,"icon":111,"path":112,"stem":113,"children":114,"page":38},"Content","i-lucide-file-text","\u002Fguide\u002Fcontent","3.guide\u002F1.content",[115,119,123,127,131,135,139,143],{"title":116,"path":117,"stem":118},"Collections and entries","\u002Fguide\u002Fcontent\u002Fcollections","3.guide\u002F1.content\u002F1.collections",{"title":120,"path":121,"stem":122},"Field types","\u002Fguide\u002Fcontent\u002Ffields","3.guide\u002F1.content\u002F2.fields",{"title":124,"path":125,"stem":126},"Drafts, publishing and version history","\u002Fguide\u002Fcontent\u002Fversions","3.guide\u002F1.content\u002F3.versions",{"title":128,"path":129,"stem":130},"Languages","\u002Fguide\u002Fcontent\u002Flanguages","3.guide\u002F1.content\u002F4.languages",{"title":132,"path":133,"stem":134},"Data sources","\u002Fguide\u002Fcontent\u002Fdata-sources","3.guide\u002F1.content\u002F5.data-sources",{"title":136,"path":137,"stem":138},"Media","\u002Fguide\u002Fcontent\u002Fmedia","3.guide\u002F1.content\u002F6.media",{"title":140,"path":141,"stem":142},"Search","\u002Fguide\u002Fcontent\u002Fsearch","3.guide\u002F1.content\u002F7.search",{"title":144,"path":145,"stem":146},"Trash","\u002Fguide\u002Fcontent\u002Ftrash","3.guide\u002F1.content\u002F8.trash",{"title":148,"icon":149,"path":150,"stem":151,"children":152,"page":38},"Website","i-lucide-globe","\u002Fguide\u002Fwebsite","3.guide\u002F2.website",[153,156,160,164,168,172,176,180,184,188],{"title":148,"path":154,"stem":155},"\u002Fguide\u002Fwebsite\u002Fwebsite","3.guide\u002F2.website\u002F1.website",{"title":157,"path":158,"stem":159},"Scroll scenes","\u002Fguide\u002Fwebsite\u002Fscroll-scenes","3.guide\u002F2.website\u002F10.scroll-scenes",{"title":161,"path":162,"stem":163},"Pages and posts","\u002Fguide\u002Fwebsite\u002Fpages","3.guide\u002F2.website\u002F2.pages",{"title":165,"path":166,"stem":167},"The visual editor","\u002Fguide\u002Fwebsite\u002Fvisual-editor","3.guide\u002F2.website\u002F3.visual-editor",{"title":169,"path":170,"stem":171},"Roles and locks","\u002Fguide\u002Fwebsite\u002Froles-and-locks","3.guide\u002F2.website\u002F4.roles-and-locks",{"title":173,"path":174,"stem":175},"Header and footer","\u002Fguide\u002Fwebsite\u002Fheader-and-footer","3.guide\u002F2.website\u002F5.header-and-footer",{"title":177,"path":178,"stem":179},"Theme","\u002Fguide\u002Fwebsite\u002Ftheme","3.guide\u002F2.website\u002F6.theme",{"title":181,"path":182,"stem":183},"Redirects","\u002Fguide\u002Fwebsite\u002Fredirects","3.guide\u002F2.website\u002F7.redirects",{"title":185,"path":186,"stem":187},"Site settings","\u002Fguide\u002Fwebsite\u002Fsite-settings","3.guide\u002F2.website\u002F8.site-settings",{"title":189,"path":190,"stem":191},"The site","\u002Fguide\u002Fwebsite\u002Fthe-site","3.guide\u002F2.website\u002F9.the-site",{"title":193,"icon":194,"path":195,"stem":196,"children":197,"page":38},"Publishing","i-lucide-send","\u002Fguide\u002Fpublishing","3.guide\u002F3.publishing",[198,202,206],{"title":199,"path":200,"stem":201},"Publishing and preview","\u002Fguide\u002Fpublishing\u002Fpublishing","3.guide\u002F3.publishing\u002F1.publishing",{"title":203,"path":204,"stem":205},"Builds","\u002Fguide\u002Fpublishing\u002Fbuilds","3.guide\u002F3.publishing\u002F2.builds",{"title":207,"path":208,"stem":209},"CDN caches","\u002Fguide\u002Fpublishing\u002Fcaches","3.guide\u002F3.publishing\u002F3.caches",{"title":211,"icon":212,"path":213,"stem":214,"children":215,"page":38},"People, security and privacy","i-lucide-shield","\u002Fguide\u002Fpeople-and-security","3.guide\u002F4.people-and-security",[216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276],{"title":217,"path":218,"stem":219},"People in SHADE","\u002Fguide\u002Fpeople-and-security\u002Fpeople-in-shade","3.guide\u002F4.people-and-security\u002F0.people-in-shade",{"title":221,"path":222,"stem":223},"Team and roles","\u002Fguide\u002Fpeople-and-security\u002Fteam","3.guide\u002F4.people-and-security\u002F1.team",{"title":225,"path":226,"stem":227},"Errors and security alerts","\u002Fguide\u002Fpeople-and-security\u002Ferrors","3.guide\u002F4.people-and-security\u002F10.errors",{"title":229,"path":230,"stem":231},"Exporting an instance","\u002Fguide\u002Fpeople-and-security\u002Fexporting","3.guide\u002F4.people-and-security\u002F11.exporting",{"title":233,"path":234,"stem":235},"Organisations","\u002Fguide\u002Fpeople-and-security\u002Forganisations","3.guide\u002F4.people-and-security\u002F12.organisations",{"title":237,"path":238,"stem":239},"Signing in through an identity provider (team)","\u002Fguide\u002Fpeople-and-security\u002Fidentity-providers","3.guide\u002F4.people-and-security\u002F13.identity-providers",{"title":241,"path":242,"stem":243},"System status","\u002Fguide\u002Fpeople-and-security\u002Fsystem-status","3.guide\u002F4.people-and-security\u002F14.system-status",{"title":245,"path":246,"stem":247},"Appearance","\u002Fguide\u002Fpeople-and-security\u002Fappearance","3.guide\u002F4.people-and-security\u002F15.appearance",{"title":249,"path":250,"stem":251},"Accounts and personal pages","\u002Fguide\u002Fpeople-and-security\u002Faccounts","3.guide\u002F4.people-and-security\u002F2.accounts",{"title":253,"path":254,"stem":255},"Signing in (team)","\u002Fguide\u002Fpeople-and-security\u002Fsign-in","3.guide\u002F4.people-and-security\u002F3.sign-in",{"title":257,"path":258,"stem":259},"API tokens","\u002Fguide\u002Fpeople-and-security\u002Fapi-tokens","3.guide\u002F4.people-and-security\u002F4.api-tokens",{"title":261,"path":262,"stem":263},"Audit log","\u002Fguide\u002Fpeople-and-security\u002Faudit","3.guide\u002F4.people-and-security\u002F5.audit",{"title":265,"path":266,"stem":267},"Request protection","\u002Fguide\u002Fpeople-and-security\u002Fprotection","3.guide\u002F4.people-and-security\u002F6.protection",{"title":269,"path":270,"stem":271},"Personal data per person","\u002Fguide\u002Fpeople-and-security\u002Fprivacy","3.guide\u002F4.people-and-security\u002F7.privacy",{"title":273,"path":274,"stem":275},"Data retention","\u002Fguide\u002Fpeople-and-security\u002Fretention","3.guide\u002F4.people-and-security\u002F8.retention",{"title":277,"path":278,"stem":279},"Consent banner","\u002Fguide\u002Fpeople-and-security\u002Fconsent","3.guide\u002F4.people-and-security\u002F9.consent",{"title":281,"icon":282,"path":283,"stem":284,"children":285,"page":38},"Services","i-lucide-plug","\u002Fguide\u002Fservices","3.guide\u002F5.services",[286,290,294,298,302,306],{"title":287,"path":288,"stem":289},"Email","\u002Fguide\u002Fservices\u002Femail","3.guide\u002F5.services\u002F1.email",{"title":291,"path":292,"stem":293},"Opening hours","\u002Fguide\u002Fservices\u002Fopening-hours","3.guide\u002F5.services\u002F4.opening-hours",{"title":295,"path":296,"stem":297},"Webhooks","\u002Fguide\u002Fservices\u002Fwebhooks","3.guide\u002F5.services\u002F5.webhooks",{"title":299,"path":300,"stem":301},"Locations","\u002Fguide\u002Fservices\u002Flocations","3.guide\u002F5.services\u002F6.locations",{"title":303,"path":304,"stem":305},"VAT rates","\u002Fguide\u002Fservices\u002Fvat-rates","3.guide\u002F5.services\u002F7.vat-rates",{"title":307,"path":308,"stem":309},"Channels","\u002Fguide\u002Fservices\u002Fchannels","3.guide\u002F5.services\u002F8.channels",{"title":311,"icon":312,"path":313,"stem":314,"children":315,"page":38},"InstalledModules","i-lucide-puzzle","\u002Fguide\u002Fmodules","3.guide\u002F6.modules",[316,320,324,328,332,336,340,344,348,352,356,360],{"title":317,"path":318,"stem":319},"Modules","\u002Fguide\u002Fmodules\u002Fmanaging","3.guide\u002F6.modules\u002F1.managing",{"title":321,"path":322,"stem":323},"Dutch services (module)","\u002Fguide\u002Fmodules\u002Fnl","3.guide\u002F6.modules\u002F10.nl",{"title":325,"path":326,"stem":327},"Editorial (module)","\u002Fguide\u002Fmodules\u002Feditorial","3.guide\u002F6.modules\u002F11.editorial",{"title":329,"path":330,"stem":331},"Appointments (module)","\u002Fguide\u002Fmodules\u002Fappointments","3.guide\u002F6.modules\u002F2.appointments",{"title":333,"path":334,"stem":335},"Shop (the commerce module)","\u002Fguide\u002Fmodules\u002Fshop","3.guide\u002F6.modules\u002F3.shop",{"title":337,"path":338,"stem":339},"Untrusted modules","\u002Fguide\u002Fmodules\u002Funtrusted","3.guide\u002F6.modules\u002F4.untrusted",{"title":341,"path":342,"stem":343},"Analytics (module)","\u002Fguide\u002Fmodules\u002Fanalytics","3.guide\u002F6.modules\u002F5.analytics",{"title":345,"path":346,"stem":347},"Error forwarding (module)","\u002Fguide\u002Fmodules\u002Ferror-forwarding","3.guide\u002F6.modules\u002F6.error-forwarding",{"title":349,"path":350,"stem":351},"Client programs","\u002Fguide\u002Fmodules\u002Fprograms","3.guide\u002F6.modules\u002F7.programs",{"title":353,"path":354,"stem":355},"Import and export (module)","\u002Fguide\u002Fmodules\u002Fimport","3.guide\u002F6.modules\u002F8.import",{"title":357,"path":358,"stem":359},"Payments (module)","\u002Fguide\u002Fmodules\u002Fpayments","3.guide\u002F6.modules\u002F8.payments",{"title":361,"path":362,"stem":363},"Forms (module)","\u002Fguide\u002Fmodules\u002Fforms","3.guide\u002F6.modules\u002F9.forms",{"title":365,"icon":366,"path":367,"stem":368,"children":369,"page":38},"AI assistants","i-lucide-bot","\u002Fguide\u002Fai","3.guide\u002F7.ai",[370,374],{"title":371,"path":372,"stem":373},"AI assistants (MCP)","\u002Fguide\u002Fai\u002Fassistants","3.guide\u002F7.ai\u002F1.assistants",{"title":375,"path":376,"stem":377},"Connecting an AI assistant","\u002Fguide\u002Fai\u002Fconnecting","3.guide\u002F7.ai\u002F2.connecting",{"title":379,"icon":380,"path":381,"stem":382,"children":383,"page":38},"Developers","i-lucide-code","\u002Fdevelopers","4.developers",[384,388,392,396,400,404,408,412,416,420,424,428,432,435,489,493,497,501,536],{"title":385,"path":386,"stem":387},"Architecture","\u002Fdevelopers\u002Farchitecture","4.developers\u002F1.architecture",{"title":389,"path":390,"stem":391},"Capabilities","\u002Fdevelopers\u002Fcapabilities","4.developers\u002F10.capabilities",{"title":393,"path":394,"stem":395},"Trust","\u002Fdevelopers\u002Ftrust","4.developers\u002F11.trust",{"title":397,"path":398,"stem":399},"Redis and the ports","\u002Fdevelopers\u002Fredis","4.developers\u002F12.redis",{"title":401,"path":402,"stem":403},"The worker container role","\u002Fdevelopers\u002Fworker","4.developers\u002F13.worker",{"title":405,"path":406,"stem":407},"kv: a module's own key-value storage","\u002Fdevelopers\u002Fkv","4.developers\u002F14.kv",{"title":409,"path":410,"stem":411},"Processes: long-running work on the worker","\u002Fdevelopers\u002Fprocesses","4.developers\u002F15.processes",{"title":413,"path":414,"stem":415},"Network: a module's outgoing calls","\u002Fdevelopers\u002Fnetwork","4.developers\u002F16.network",{"title":417,"path":418,"stem":419},"Realtime","\u002Fdevelopers\u002Frealtime","4.developers\u002F17.realtime",{"title":421,"path":422,"stem":423},"Private files","\u002Fdevelopers\u002Ffiles","4.developers\u002F18.files",{"title":425,"path":426,"stem":427},"Notify","\u002Fdevelopers\u002Fnotify","4.developers\u002F19.notify",{"title":429,"path":430,"stem":431},"Collections","\u002Fdevelopers\u002Fcollections","4.developers\u002F2.collections",{"title":337,"path":433,"stem":434},"\u002Fdevelopers\u002Funtrusted","4.developers\u002F20.untrusted",{"title":436,"icon":312,"path":437,"stem":438,"children":439},"Writing a plugin","\u002Fdevelopers\u002Fmodules","4.developers\u002F3.modules\u002Findex",[440,442,446,450,454,458,462,466,470,473,477,481,485],{"title":441,"path":437,"stem":438},"Writing a module",{"title":443,"path":444,"stem":445},"Module SDK and tooling","\u002Fdevelopers\u002Fmodules\u002Fsdk-and-tooling","4.developers\u002F3.modules\u002F1.sdk-and-tooling",{"title":447,"path":448,"stem":449},"Connecting accounts with OAuth2","\u002Fdevelopers\u002Fmodules\u002Foauth","4.developers\u002F3.modules\u002F10.oauth",{"title":451,"path":452,"stem":453},"Calls between modules","\u002Fdevelopers\u002Fmodules\u002Fcalls-between-modules","4.developers\u002F3.modules\u002F11.calls-between-modules",{"title":455,"path":456,"stem":457},"Experimental parts","\u002Fdevelopers\u002Fmodules\u002Fexperimental-parts","4.developers\u002F3.modules\u002F12.experimental-parts",{"title":459,"path":460,"stem":461},"The manifest","\u002Fdevelopers\u002Fmodules\u002Fmanifest","4.developers\u002F3.modules\u002F2.manifest",{"title":463,"path":464,"stem":465},"Routes","\u002Fdevelopers\u002Fmodules\u002Froutes","4.developers\u002F3.modules\u002F3.routes",{"title":467,"path":468,"stem":469},"Admin screens and the site part","\u002Fdevelopers\u002Fmodules\u002Fadmin-and-site","4.developers\u002F3.modules\u002F4.admin-and-site",{"title":110,"path":471,"stem":472},"\u002Fdevelopers\u002Fmodules\u002Fcontent","4.developers\u002F3.modules\u002F5.content",{"title":474,"path":475,"stem":476},"Background work and services","\u002Fdevelopers\u002Fmodules\u002Fbackground-and-services","4.developers\u002F3.modules\u002F6.background-and-services",{"title":478,"path":479,"stem":480},"SDK reference","\u002Fdevelopers\u002Fmodules\u002Fsdk-reference","4.developers\u002F3.modules\u002F7.sdk-reference",{"title":482,"path":483,"stem":484},"The website module's SDK","\u002Fdevelopers\u002Fmodules\u002Fwebsite-sdk","4.developers\u002F3.modules\u002F8.website-sdk",{"title":486,"path":487,"stem":488},"Incoming webhooks","\u002Fdevelopers\u002Fmodules\u002Fincoming-webhooks","4.developers\u002F3.modules\u002F9.incoming-webhooks",{"title":490,"path":491,"stem":492},"Core and the website module","\u002Fdevelopers\u002Fcore-and-website-module","4.developers\u002F4.core-and-website-module",{"title":494,"path":495,"stem":496},"The API","\u002Fdevelopers\u002Fapi","4.developers\u002F6.api",{"title":498,"path":499,"stem":500},"API reference","\u002Fdevelopers\u002Fapi-reference","4.developers\u002F6.api-reference",{"title":502,"icon":503,"path":504,"stem":505,"children":506},"Sites in other frameworks","i-lucide-layout-template","\u002Fdevelopers\u002Fframeworks","4.developers\u002F7.frameworks\u002Findex",[507,508,512,516,520,524,528,532],{"title":502,"path":504,"stem":505},{"title":509,"path":510,"stem":511},"Accounts: sign-in and modules' routes","\u002Fdevelopers\u002Fframeworks\u002Faccounts","4.developers\u002F7.frameworks\u002F1.accounts",{"title":513,"path":514,"stem":515},"`@shadestack\u002Ftree`","\u002Fdevelopers\u002Fframeworks\u002Ftree","4.developers\u002F7.frameworks\u002F2.tree",{"title":517,"path":518,"stem":519},"Expressions and styles","\u002Fdevelopers\u002Fframeworks\u002Fexpressions-and-styles","4.developers\u002F7.frameworks\u002F3.expressions-and-styles",{"title":521,"path":522,"stem":523},"`@shadestack\u002Frender`","\u002Fdevelopers\u002Fframeworks\u002Frender","4.developers\u002F7.frameworks\u002F4.render",{"title":525,"path":526,"stem":527},"`@shadestack\u002Finteractions`","\u002Fdevelopers\u002Fframeworks\u002Finteractions","4.developers\u002F7.frameworks\u002F5.interactions",{"title":529,"path":530,"stem":531},"`@shadestack\u002Fa11y`","\u002Fdevelopers\u002Fframeworks\u002Fa11y","4.developers\u002F7.frameworks\u002F6.a11y",{"title":533,"path":534,"stem":535},"Your own page for SHADE's links","\u002Fdevelopers\u002Fframeworks\u002Flinks","4.developers\u002F7.frameworks\u002F7.links",{"title":537,"path":538,"stem":539},"Build a client module","\u002Fdevelopers\u002Fclient-module","4.developers\u002F9.client-module",{"title":541,"icon":542,"path":543,"stem":544,"children":545,"page":38},"Security","i-lucide-shield-check","\u002Fsecurity","5.security",[546,550,554,558],{"title":547,"path":548,"stem":549},"Reporting a vulnerability","\u002Fsecurity\u002Freporting","5.security\u002F0.reporting",{"title":551,"path":552,"stem":553},"Security testing","\u002Fsecurity\u002Ftesting","5.security\u002F1.testing",{"title":555,"path":556,"stem":557},"Hardening a production instance","\u002Fsecurity\u002Fhardening","5.security\u002F2.hardening",{"title":559,"path":560,"stem":561},"Manual testing with Kali Linux","\u002Fsecurity\u002Fmanual-testing","5.security\u002F3.manual-testing",{"title":563,"icon":564,"path":565,"stem":566,"children":567,"page":38},"Contributing","i-lucide-git-pull-request","\u002Fcontributing","6.contributing",[568,572,576,580],{"title":569,"path":570,"stem":571},"Reading the code","\u002Fcontributing\u002Freading-the-code","6.contributing\u002F1.reading-the-code",{"title":573,"path":574,"stem":575},"Docs site","\u002Fcontributing\u002Fdocs-site","6.contributing\u002F2.docs-site",{"title":577,"path":578,"stem":579},"Releases","\u002Fcontributing\u002Freleases","6.contributing\u002F3.releases",{"title":581,"path":582,"stem":583},"Load tests","\u002Fcontributing\u002Fload-tests","6.contributing\u002F4.load-tests",{"title":585,"icon":586,"path":587,"stem":588,"children":589,"page":38},"Project","i-lucide-map","\u002Fproject","7.project",[590,594,598,602],{"title":591,"path":592,"stem":593},"Roadmap","\u002Fproject\u002Froadmap","7.project\u002F1.roadmap",{"title":595,"path":596,"stem":597},"Known issues","\u002Fproject\u002Fknown-issues","7.project\u002F2.known-issues",{"title":599,"path":600,"stem":601},"Changelog","\u002Fproject\u002Fchangelog","7.project\u002F3.changelog",{"title":603,"path":604,"stem":605},"Decisions","\u002Fproject\u002Fdecisions","7.project\u002F4.decisions",{"title":607,"path":608,"stem":609,"children":610,"icon":612},"Community","\u002Fcommunity","8.community\u002Findex",[611],{"title":607,"path":608,"stem":609},"i-lucide-users",{"id":614,"title":551,"body":615,"description":1103,"extension":1496,"links":1497,"meta":1498,"navigation":1499,"path":552,"seo":1500,"stem":553,"__hash__":1501},"docs\u002F5.security\u002F1.testing.md",{"type":616,"value":617,"toc":1486},"minimark",[618,622,637,642,801,804,808,932,936,939,1087,1091,1094,1104,1119,1337,1351,1386,1397,1422,1426,1446,1450,1453,1457],[619,620,621],"p",{},"How SHADE is tested for security, what runs where, and when. Below is what SHADE builds into\nits own code and pipeline, and the practice around it.",[623,624,625,632],"ul",{},[626,627,628,631],"li",{},[629,630,555],"a",{"href":556},": what a client's server and deployment must have.",[626,633,634,636],{},[629,635,559],{"href":560},": hands-on sessions against a staging instance.",[638,639,641],"h2",{"id":640},"what-shade-already-does-in-its-code","What SHADE already does in its code",[623,643,644,668,674,708,714,723,729,758,775,789],{},[626,645,646,650,651,655,656,659,660,663,664,667],{},[647,648,649],"strong",{},"A threat model per decision."," Every decision record has one: what an attacker tries, what stops it, and the\ntest that proves it. Every change runs the ones it can affect (",[652,653,654],"code",{},"pnpm test:affected"," and ",[652,657,658],{},"pnpm test:e2e:affected",",\nwhich runs every browser test when signing in, permissions, routes or the kernel change); the full ",[652,661,662],{},"pnpm test"," and\n",[652,665,666],{},"pnpm test:e2e"," run at milestones and before every release.",[626,669,670,673],{},[647,671,672],{},"Rules held by tests:"," the layers and front doors, which Better Auth plugins and options are used,\nmodule stylesheets scoped to the module, what the module SDK gives a module.",[626,675,676,679,680,683,684,687,688,691,692,695,696,699,700,703,704,707],{},[647,677,678],{},"Request protection in the API:"," rate limits counted per IP (IPv6 per \u002F64), per token and per account, in Redis for\nevery container (the account steps that check the password, signing in again among them, five tries per team member\nin 15 minutes), refused with 503 while Redis is down rather than let through; idempotency\nkeys; webhook signatures (",[652,681,682],{},"apps\u002Fapi\u002Fsrc\u002Fhttp\u002Fmiddleware\u002Fprotection.ts","); origin checks for cookie routes\n(",[652,685,686],{},"origin.ts","); a strict Content Security Policy for the admin (",[652,689,690],{},"csp.ts","); and on every module route's answer,\nSHADE's own cache and security headers: ",[652,693,694],{},"no-store"," unless a public ",[652,697,698],{},"GET"," route declares a cache, ",[652,701,702],{},"nosniff",", and a\npolicy that runs no script on an SVG (",[652,705,706],{},"plugin-answers.ts",").",[626,709,710,713],{},[647,711,712],{},"Detection:"," the error log and security alerts emailed to admins, and the audit log.",[626,715,716,719,720,707],{},[647,717,718],{},"Better Auth's advisories"," checked against the pinned version before each release (",[652,721,722],{},"pnpm advisories:better-auth",[626,724,725,728],{},[647,726,727],{},"Signed modules",", and untrusted modules in workerd's sandbox.",[626,730,731,734,735,738,739,742,743,746,747,749,750,754,755,707],{},[647,732,733],{},"Modules' outgoing calls",": a trusted module's ",[652,736,737],{},"moduleFetch"," and an untrusted module's ",[652,740,741],{},"fetch"," reach\nonly their declared hosts, over https, never an address inside the server's network (private, loopback, link-local\nand cloud metadata, carrier-grade NAT, unique-local, multicast, reserved and the documentation ranges, in IPv4 and\nIPv6, mapped forms included), with the connection pinned to the address checked and every redirect checked (",[652,744,745],{},"shade\u002Fkernel\u002Foutbound.ts","). Tests\nrun against a local https server with names resolved by a stub: refused hosts, internal addresses in every notation,\nDNS answers pointing inside, rebinding, redirects inside, oversized answers and timeouts. What a trusted module's\ncode does past ",[652,748,737],{}," is not stopped: see ",[629,751,753],{"href":752},"\u002Fdevelopers\u002Fnetwork#what-is-enforced-and-what-is-a-convention","Network",".\nThe email settings' SMTP server is held to the same address check, unless the operator allows an internal relay\n(",[652,756,757],{},"SHADE_SMTP_ALLOW_INTERNAL",[626,759,760,763,764,767,768,771,772,774],{},[647,761,762],{},"Access control as a whole",": every route called as every kind of actor against a table of expected answers\n(",[652,765,766],{},"apps\u002Fapi\u002Ftest\u002Fsweep\u002Faccess-table.ts","), and every exported service whose first parameter is a context or a\ndatabase checked to refuse before it reads anything (",[652,769,770],{},"shade\u002Ftest\u002Fcontract\u002Fservice-access.ts","). Both run with ",[652,773,662],{},"; a new route or service without its line fails.",[626,776,777,780,781,784,785,788],{},[647,778,779],{},"A deployment template"," (",[652,782,783],{},"deploy\u002Fcompose.yml",") with the container settings of ",[629,786,787],{"href":556},"Hardening a production\ninstance",", held by a test, and a smoke test that starts the image with exactly those settings.",[626,790,791,796,797,800],{},[647,792,793],{},[652,794,795],{},"\u002F.well-known\u002Fsecurity.txt"," on every instance, and a ",[652,798,799],{},"SECURITY.md"," in each repository: where to report a hole.",[619,802,803],{},"What these don't cover is a running instance seen from outside: the server, the network, the deployment's settings,\nand attacks across many requests. That is what the rest of this page is for.",[638,805,807],{"id":806},"the-layers","The layers",[809,810,811,827],"table",{},[812,813,814],"thead",{},[815,816,817,821,824],"tr",{},[818,819,820],"th",{},"Layer",[818,822,823],{},"Tool",[818,825,826],{},"What it catches",[828,829,830,842,856,867,878,889,899,910,921],"tbody",{},[815,831,832,836,839],{},[833,834,835],"td",{},"Access control",[833,837,838],{},"SHADE's own route test",[833,840,841],{},"Every route called as every kind of actor (anonymous, visitor, editor, custom role, each token type, the module actor, admin) against its expected answer; a new route without one fails",[815,843,844,847,853],{},[833,845,846],{},"Dependencies",[833,848,849,852],{},[652,850,851],{},"pnpm audit",", OSV-Scanner, Dependabot alerts",[833,854,855],{},"Known vulnerabilities in the npm tree and any other lockfile",[815,857,858,861,864],{},[833,859,860],{},"Code",[833,862,863],{},"Semgrep (JavaScript, TypeScript, Node, XSS and JWT rules)",[833,865,866],{},"Unsafe patterns: queries or redirects built from input, missing checks",[815,868,869,872,875],{},[833,870,871],{},"Secrets",[833,873,874],{},"gitleaks",[833,876,877],{},"Keys or tokens committed to any of SHADE's repositories",[815,879,880,883,886],{},[833,881,882],{},"The image",[833,884,885],{},"Trivy, hadolint",[833,887,888],{},"Outdated OS and Node packages and misconfiguration in the one image every client runs",[815,890,891,893,896],{},[833,892,494],{},[833,894,895],{},"Schemathesis, driven by the OpenAPI document",[833,897,898],{},"Malformed input to every endpoint: crashes, 500s, validation gaps",[815,900,901,904,907],{},[833,902,903],{},"The running app",[833,905,906],{},"OWASP ZAP (baseline, and the API scan from the OpenAPI document, signed in as a test admin and a test visitor)",[833,908,909],{},"XSS, header and CSP gaps, cookie flags, CORS, open redirects",[815,911,912,915,918],{},[833,913,914],{},"The server",[833,916,917],{},"nmap, testssl.sh, nuclei, Mozilla Observatory, a DMARC check",[833,919,920],{},"Open ports, weak TLS, exposed panels, missing headers, spoofable email",[815,922,923,926,929],{},[833,924,925],{},"People",[833,927,928],{},"An external penetration test",[833,930,931],{},"The logic holes tools miss",[638,933,935],{"id":934},"running-the-checks","Running the checks",[619,937,938],{},"Until CI runs again on GitHub Actions, run these locally before a pull request; CI runs the same once it is back.\nDocker is the only tool they need: gitleaks, Trivy, OSV-Scanner, Semgrep and hadolint run as their official images,\npinned by digest, never installed.",[809,940,941,954],{},[812,942,943],{},[815,944,945,948,951],{},[818,946,947],{},"Check",[818,949,950],{},"Command (in the SHADE repository)",[818,952,953],{},"Fails on",[828,955,956,975,991,1008,1025,1037,1056,1070],{},[815,957,958,960,972],{},[833,959,835],{},[833,961,962,780,964,967,968,971],{},[652,963,662],{},[652,965,966],{},"access.test.ts",", ",[652,969,970],{},"service-access.test.ts",")",[833,973,974],{},"An answer other than the table's; a route or service without a line",[815,976,977,979,985],{},[833,978,846],{},[833,980,981,984],{},[652,982,983],{},"pnpm security:audit"," (also in the SHADE workspace, for the site and the modules)",[833,986,987,988],{},"A high or critical advisory without a reason in ",[652,989,990],{},"dependency-audit.json",[815,992,993,996,1002],{},[833,994,995],{},"Dependencies, every lockfile",[833,997,998,1001],{},[652,999,1000],{},"pnpm security:scan deps"," (OSV-Scanner, which asks OSV's database about each package)",[833,1003,1004,1005],{},"Any known vulnerability without a reason in ",[652,1006,1007],{},"osv-scanner.toml",[815,1009,1010,1012,1018],{},[833,1011,860],{},[833,1013,1014,1017],{},[652,1015,1016],{},"pnpm security:scan code"," (Semgrep, metrics off; it fetches its rules from Semgrep's registry)",[833,1019,1020,1021,1024],{},"A finding of an ERROR rule; one that doesn't apply gets a ",[652,1022,1023],{},"nosemgrep"," comment with the reason",[815,1026,1027,1029,1034],{},[833,1028,871],{},[833,1030,1031],{},[652,1032,1033],{},"pnpm security:scan secrets [\u003Crepository>]",[833,1035,1036],{},"Anything gitleaks finds in the history",[815,1038,1039,1041,1053],{},[833,1040,882],{},[833,1042,1043,1046,1047,655,1050],{},[652,1044,1045],{},"docker build -f apps\u002Fapi\u002FDockerfile -t shade .",", then ",[652,1048,1049],{},"pnpm security:scan image shade",[652,1051,1052],{},"pnpm security:scan config",[833,1054,1055],{},"A high or critical vulnerability with a fix; misconfiguration in the Dockerfile",[815,1057,1058,1061,1067],{},[833,1059,1060],{},"The Dockerfiles",[833,1062,1063,1066],{},[652,1064,1065],{},"pnpm security:scan dockerfile"," (hadolint)",[833,1068,1069],{},"Any finding; a rule is switched off only on its line, with the reason beside it",[815,1071,1072,1075,1080],{},[833,1073,1074],{},"The deployment",[833,1076,1077],{},[652,1078,1079],{},"pnpm deploy:smoke --image shade",[833,1081,1082,1083,1086],{},"SHADE not working with the template's settings (it writes outside its volumes, a role fails to start), the worker serving more than ",[652,1084,1085],{},"\u002Fhealth",", or the admin not saying that background work is not running while no worker runs",[638,1088,1090],{"id":1089},"the-release-gates","The release gates",[619,1092,1093],{},"Before a release is cut, every check above and a few that only matter for a release run as one command, in the SHADE\nrepository:",[1095,1096,1101],"pre",{"className":1097,"code":1099,"language":1100},[1098],"language-text","pnpm release:gates                                   # every gate; the image's need --image\npnpm release:gates --tag v0.1.0 --docs ..\u002Fdocs       # as the release workflow runs it: the tag, a shade-docs checkout\npnpm release:gates --only image,sbom,smoke --image shade   # the image's gates, on a built image\npnpm release:gates --list                            # the gates, with what each needs\n","text",[652,1102,1099],{"__ignoreMap":1103},"",[619,1105,1106,1107,1110,1111,1114,1115,1118],{},"Every gate runs, also after one has failed, and the report at the end gives each one's result: passed, failed, could\nnot run (Docker or the network missing, no image, no docs checkout), or skipped by ",[652,1108,1109],{},"--only"," or ",[652,1112,1113],{},"--skip",". A gate that\ncould not run holds the release just as a failing one does. The release workflow (",[652,1116,1117],{},".github\u002Fworkflows\u002Frelease.yml",")\nruns the gates before it publishes a package or pushes the image, and the image's own gates on the image it is about to\npush. Run by hand, the workflow is a dry run that publishes and pushes nothing.",[809,1120,1121,1134],{},[812,1122,1123],{},[815,1124,1125,1128,1131],{},[818,1126,1127],{},"Gate",[818,1129,1130],{},"What it checks",[818,1132,1133],{},"Reuses",[828,1135,1136,1151,1166,1182,1194,1216,1235,1262,1284,1310],{},[815,1137,1138,1143,1149],{},[833,1139,1140],{},[652,1141,1142],{},"version",[833,1144,1145,1148],{},[652,1146,1147],{},"SHADE_VERSION"," is a version, the tag matches it, and the SDK contract gives the release its date",[833,1150],{},[815,1152,1153,1158,1164],{},[833,1154,1155],{},[652,1156,1157],{},"changelog",[833,1159,1160,1161,1163],{},"The ",[629,1162,599],{"href":600}," has the version's dated section, which records the check of Better Auth's advisories",[833,1165],{},[815,1167,1168,1173,1180],{},[833,1169,1170],{},[652,1171,1172],{},"experimental",[833,1174,1175,1176,1179],{},"Every experimental manifest part and admin component is on the ",[629,1177,1178],{"href":456},"list of experimental parts",", and no stable one is in its manifest table",[833,1181],{},[815,1183,1184,1189,1192],{},[833,1185,1186],{},[652,1187,1188],{},"advisory-list",[833,1190,1191],{},"The advisory list the module approval reads, shipped with the release, is at most 14 days old",[833,1193],{},[815,1195,1196,1201,1211],{},[833,1197,1198],{},[652,1199,1200],{},"licences",[833,1202,1203,1204,1207,1208],{},"Every production dependency of core, the SDK, svg, the API and the admin has a permissive licence, or one a person reviewed in ",[652,1205,1206],{},"licence-review.json","; writes the list as ",[652,1209,1210],{},"licences.json",[833,1212,1213],{},[652,1214,1215],{},"pnpm licenses list",[815,1217,1218,1226,1229],{},[833,1219,1220,967,1223],{},[652,1221,1222],{},"audit",[652,1224,1225],{},"better-auth",[833,1227,1228],{},"npm's advisories; Better Auth's against the pinned version",[833,1230,1231,967,1233],{},[652,1232,983],{},[652,1234,722],{},[815,1236,1237,1254,1257],{},[833,1238,1239,967,1242,967,1245,967,1248,967,1251],{},[652,1240,1241],{},"secrets",[652,1243,1244],{},"osv",[652,1246,1247],{},"semgrep",[652,1249,1250],{},"hadolint",[652,1252,1253],{},"trivy-config",[833,1255,1256],{},"The scans in the table above",[833,1258,1259],{},[652,1260,1261],{},"pnpm security:scan",[815,1263,1264,1269,1279],{},[833,1265,1266],{},[652,1267,1268],{},"packages",[833,1270,1271,1272,967,1275,1278],{},"Every package packed and checked, and no ",[652,1273,1274],{},".env",[652,1276,1277],{},".npmrc",", key file or text shaped like a private key or token in what goes to npm",[833,1280,1281],{},[652,1282,1283],{},"pnpm release:packages",[815,1285,1286,1297,1300],{},[833,1287,1288,967,1291,967,1294],{},[652,1289,1290],{},"lint",[652,1292,1293],{},"typecheck",[652,1295,1296],{},"tests",[833,1298,1299],{},"Lint, the typecheck and every test, the access-control table and the threat models' tests among them",[833,1301,1302,967,1305,967,1308],{},[652,1303,1304],{},"pnpm lint",[652,1306,1307],{},"pnpm typecheck",[652,1309,662],{},[815,1311,1312,1323,1330],{},[833,1313,1314,967,1317,967,1320],{},[652,1315,1316],{},"image",[652,1318,1319],{},"sbom",[652,1321,1322],{},"smoke",[833,1324,1325,1326,1329],{},"Trivy on the release image, its bill of materials as ",[652,1327,1328],{},"sbom.cdx.json"," (CycloneDX), and the smoke test",[833,1331,1332,967,1334],{},[652,1333,1261],{},[652,1335,1336],{},"pnpm deploy:smoke",[619,1338,1339,1340,1343,1344,1347,1348,1350],{},"The licences allowed without a review are the permissive ones (MIT, ISC, the BSD licences, Apache-2.0, 0BSD,\nBlueOak-1.0.0, Zlib), the public domain dedications (CC0-1.0, Unlicense), Python-2.0, CC-BY-4.0 (for data such as\ncaniuse's) and MPL-2.0, whose copyleft covers only the package's own files, which SHADE ships unchanged. An expression\npasses when one of its choices (",[652,1341,1342],{},"OR",") or all of its parts (",[652,1345,1346],{},"AND",") do. Anything else, a package with no licence field\namong them, needs a line in ",[652,1349,1206],{}," naming the licence as listed and why it is fine; the line holds only\nfor that licence, so a package that changes its licence is checked again. The usual reviewed cases are a prebuilt\nlibrary that a package loads dynamically and that stays unmodified (the LGPL-licensed libvips in sharp's platform\npackages), and a package whose repository is permissive but whose published files carry no licence field.",[619,1352,1353,1354,1357,1358,1361,1362,1364,1365,1368,1369,1371,1372,1374,1375,1377,1378,967,1380,663,1382,1385],{},"The frontend kit has its own ",[652,1355,1356],{},"pnpm release:gates"," in ",[652,1359,1360],{},"shade-frontend",", with the gates that apply to it: ",[652,1363,1157],{},"\n(",[652,1366,1367],{},"CHANGELOG.md"," has the version's section, no longer marked as not released), ",[652,1370,1200],{}," (the packages the kit\npublishes, by the same rules and with its own ",[652,1373,1206],{},") and ",[652,1376,1241],{},". It takes ",[652,1379,1109],{},[652,1381,1113],{},[652,1383,1384],{},"--list"," as SHADE's does.",[619,1387,1388,1389,1392,1393,1396],{},"Publishing is held to the same rule: ",[652,1390,1391],{},"pnpm release:packages --publish"," refuses to publish to npm outside GitHub Actions,\nwithout npm provenance (",[652,1394,1395],{},"NPM_CONFIG_PROVENANCE",") or without the run's identity token, so nothing is published by hand.",[619,1398,1399,1400,1402,1403,1406,1407,1410,1411,1414,1415,1417,1418,1421],{},"A reason in ",[652,1401,990],{}," names the advisory, why it doesn't reach SHADE, the projects it holds for and the\nday it was reviewed; it goes once the advisory is gone. A reason holds for 3 months: after that the audit fails\nagain until someone checks it and updates ",[652,1404,1405],{},"reviewed",". New versions wait a week: ",[652,1408,1409],{},"minimumReleaseAge"," in\n",[652,1412,1413],{},"pnpm-workspace.yaml"," (10080 minutes) keeps pnpm from installing a version published less than a week ago, since a\nhijacked release is usually found and pulled within days. A reason in ",[652,1416,1007],{}," works the same way: it names\nthe advisory and why, and its ",[652,1419,1420],{},"ignoreUntil"," date, 3 months on, makes the scan fail again until someone reviews it.\nThe weekly scans of a staging instance (ZAP, Schemathesis, nuclei) are not in SHADE's pipeline yet.",[638,1423,1425],{"id":1424},"where-to-test","Where to test",[623,1427,1428,1434,1440],{},[626,1429,1430,1433],{},[647,1431,1432],{},"A staging instance, never a client's production."," It runs the same image and the same Coolify and Traefik\nsetup as production, on its own subdomain, with made-up data. All active testing happens there: scans,\nfuzzing, brute force, uploads.",[626,1435,1436,1439],{},[647,1437,1438],{},"Production gets passive checks only",": TLS, headers, which ports answer, and nuclei's safe templates at a low\nrate. Anything more needs the client's written permission in their contract. Testing a system without permission\nis a criminal offence in the Netherlands (Article 138ab of the Criminal Code), even one you built, and hosting\nproviders have their own terms for scanning.",[626,1441,1442,1445],{},[647,1443,1444],{},"Check detection as well."," During a session on staging, confirm that SHADE's rate limits answer, that the audit\nlog records the attempts, and that the security alert emails reach an admin's inbox. Tell whoever receives them\nbefore you start.",[638,1447,1449],{"id":1448},"when-each-runs","When each runs",[619,1451,1452],{},"Run the fast checks (tests, the access-control test, dependency and secret scans) on every change, scan the image on\nevery build, and run the slower scans of a staging instance regularly and before each release. How often is up to\nwhoever runs the instance.",[638,1454,1456],{"id":1455},"when-something-is-found","When something is found",[623,1458,1459,1465,1471,1480],{},[626,1460,1461,1464],{},[647,1462,1463],{},"In SHADE's code:"," fix it with a test that fails without the fix, as every security fix in SHADE has; add the\nattack to the decision's threat model when a decision covers that part.",[626,1466,1467,1470],{},[647,1468,1469],{},"In a dependency:"," upgrade it (a dependency change, reviewed on its own), or record why it doesn't reach SHADE.",[626,1472,1473,1476,1477,1479],{},[647,1474,1475],{},"In a client's deployment:"," fix it in the deployment and in ",[629,1478,787],{"href":556},", so the next instance starts right.",[626,1481,1482,1485],{},[647,1483,1484],{},"A finding that affects running instances"," holds the release that fixes it until every client is updated; the\nrelease notes say what it fixes without giving a recipe for the attack before clients are updated.",{"title":1103,"searchDepth":1487,"depth":1487,"links":1488},2,[1489,1490,1491,1492,1493,1494,1495],{"id":640,"depth":1487,"text":641},{"id":806,"depth":1487,"text":807},{"id":934,"depth":1487,"text":935},{"id":1089,"depth":1487,"text":1090},{"id":1424,"depth":1487,"text":1425},{"id":1448,"depth":1487,"text":1449},{"id":1455,"depth":1487,"text":1456},"md",null,{},true,{"title":551,"description":1103},"-c1Mh3xda6a74ZmER8UrKntQpYtOC6rgJsYDP1Vkrfs",[1503,1504],{"title":547,"path":548,"stem":549,"description":1103,"children":-1},{"title":555,"path":556,"stem":557,"description":1103,"children":-1},1796500153657]