> For the complete documentation index, see [llms.txt](https://hollow-peak.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hollow-peak.gitbook.io/docs/security/security-overview.md).

# Security Overview

What the platform protects, and what remains yours.

## What the platform does

### Authentication

* **Staff and customers are separate systems** — different guards, sessions and login pages. A customer account cannot become a staff account
* Passwords hashed with bcrypt; never stored or displayed
* Password reset by expiring token
* Suspended accounts refused at sign-in, not merely hidden
* Optional forced password change

### Authorisation

* 107 permissions, checked **server-side** on every protected action
* A hidden button is presentation, never the control
* Ownership checked per request — a customer cannot reach another's order, download or address by changing an id
* The database screen is gated on **role membership**, which no permission grants

### Payments

* **No card data ever reaches the application.** Card entry happens on the provider's page or in their iframe
* Prices recalculated server-side at checkout; a modified price in a form changes nothing
* Webhooks verified by signature, with no setting to relax it
* Return URLs never treated as proof of payment
* Provider credentials encrypted at rest, masked in the interface, never logged

### Files

* Paid downloads on a **private disk**, under randomised names, never addressable by URL
* Every download authorised individually — a valid link is not enough
* Uploads validated by content, not extension
* Executable uploads refused
* Filenames cannot escape their directory

### Content

* Page-builder content sanitised to an allowlist on save
* Raw HTML behind its own permission
* Output escaped by default
* All database access parameterised
* CSRF protection on every state-changing form

### Email

* Marketing requires opt-in; suppression honoured
* Transactional and marketing kept separate
* Recipients never disclosed to each other

### Auditing

* Activity log of administrative actions
* Settings versioned with rollback, secrets redacted in history

## What is yours

Hollow Peak runs on your server.

### Before going live

* [ ] `APP_DEBUG=false`
* [ ] `APP_ENV=production`
* [ ] HTTPS, with HTTP redirected
* [ ] `SESSION_SECURE_COOKIE=true`
* [ ] `https://your-site/.env` returns 404 or 403
* [ ] `LOG_LEVEL=error`
* [ ] A strong, unique administrator password
* [ ] Backups configured **and a restore tested**

### File permissions

Directories `755`, files `644`, with `storage/` and `bootstrap/cache/` writable.

{% hint style="danger" %}
**Never `777`.** If something is not writable, the problem is ownership, not permissions.
{% endhint %}

### The APP\_KEY

It encrypts your stored payment credentials.

* **Back it up**, separately from the database
* **Never change it** on a live installation — every encrypted setting becomes unreadable

### Accounts

* One account per person; never a shared login
* Suspend leavers rather than deleting, to keep the audit trail
* Grant the narrowest role that does the job
* Keep the Owner role to as few people as possible

### Ongoing

* Apply Hollow Peak updates
* Keep PHP and the database patched
* Review the activity log occasionally
* Rotate credentials if anyone with access leaves

## Reporting a vulnerability

Privately, not in a public forum or review. See `legal/SECURITY.md` in your package for the contact address and what to include.

Please do not test against installations you do not own.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hollow-peak.gitbook.io/docs/security/security-overview.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
