Skip to content

Security

Security controls in GoatFlow and how to report a vulnerability.

Security

This page describes the security controls in GoatFlow 0.11 and how to report a vulnerability. The maintained, detailed list is docs/SECURITY.md in the repository.

Sign-in and Identity

  • Identity providers: OpenID Connect (Google built in; other standard OIDC providers are configured at Admin → Identity Providers), SAML 2.0, GitHub OAuth2, LDAP / Active Directory and the local database
  • OIDC sign-in: PKCE (S256) on every sign-in; ID tokens are verified against the provider’s published keys (JWKS)
  • LDAP / Active Directory: agent sign-in against a directory, with optional user creation and name/email sync; customer portal sign-in does not use LDAP
  • Auto-provisioning: users can be created on first sign-in, opt-in per identity provider
  • Provider order: providers are tried in the configured order (AUTH_PROVIDERS)
  • Password hashing: bcrypt by default. For running side by side with OTRS, PASSWORD_HASH_TYPE=sha256 stores OTRS’s unsalted SHA-256 format, and imported OTRS hashes are accepted at sign-in
  • Password policy: length and character-class rules set at Admin → Password Policy
  • Sign-in rate limit: 5 failed attempts in 5 minutes per IP and username start a backoff of 2 seconds, doubling up to 60 seconds

Two-Factor Authentication

Available to agents and customers.

  • Authenticator apps (TOTP) with QR code setup
  • Passkeys and security keys (WebAuthn)
  • Recovery codes: 8 single-use codes, 128 bits each
  • No bypass: once 2FA is on, sign-in requires the second factor; there is no password-only fallback
  • Password re-check before setting up or turning off 2FA, rate limited per account and IP
  • Admin override for locked-out users: needs a reason, is recorded in the audit log, and the user is emailed
  • Pending 2FA session: a 256-bit token bound to the client IP, discarded after 5 wrong codes
  • Logging: 2FA events (setup, success, failure, recovery code use) are recorded in the audit log with user and IP, and also written to the application log

Sessions and API Access

  • Sessions expire after 16 hours, or 2 hours idle (both configurable); expired sessions are purged every 5 minutes, and administrators can end any session
  • Cookies: authentication cookies are HttpOnly, and Secure in production
  • JWT: 15-minute access tokens; refresh tokens rotate on every use; in production GoatFlow will not start without a proper JWT_SECRET
  • Personal access tokens with scopes, expiry and a per-token hourly rate limit
  • Admin API access needs a token with the admin:* scope whose owner is currently in the admin group

Authorization

  • Admin rights come only from membership of the admin group
  • Queue permissions follow the OTRS model (ro, rw, create, move_into, note, owner, priority), granted through groups and roles and checked by route middleware
  • Per-customer separation: each customer’s mail can arrive through its own mailbox (IMAP or POP3) straight into its own queue, and group permissions decide which agents see each queue, so a team of agents can be dedicated to specific customers. In the customer portal, each customer user sees only their own tickets
  • Route authorization test: on every CI run, a test builds the production router and calls each of its 700+ routes as an anonymous user, a customer and a non-admin agent; a route without the right protection fails the build
  • Hard delete needs the entity.hard_delete permission; a plugin needs an explicit grant from an administrator
  • Demo mode (app.demo_mode) blocks password and 2FA changes for non-admins and keeps preference changes to the session

Web

  • Security headers on every response: Content-Security-Policy, X-Frame-Options: DENY, X-Content-Type-Options: nosniff and a Referrer-Policy (plus X-XSS-Protection and Permissions-Policy). The CSP allows inline and eval’d scripts, which Alpine.js and HTMX need, so it is not the XSS defence. One exception: the attachment viewer shows a file in a frame on GoatFlow’s own page, so that response allows framing by GoatFlow itself and runs no script (HTML and other text formats are shown as plain text, unknown types are downloaded)
  • XSS: user HTML and Markdown are sanitised on the server (bluemonday) and templates escape output by default
  • SQL: user values are always passed as bound parameters; the few queries built as strings use fixed table or column names and are flagged by a lint rule
  • TLS: GoatFlow does not terminate TLS. Run it behind a reverse proxy that serves HTTPS, and set HSTS there

Data

  • Deletion: soft delete with a recycle bin, irreversible anonymisation of personal data and a deletion log. From 0.11.1, recycle bin entries are permanently deleted after 60 days; agents and queues that other records still refer to, and customer companies, stay in the recycle bin
  • Encrypted secrets: plugin secrets, webhook signing secrets and identity provider secrets are encrypted with AES-256-GCM under GOATFLOW_SECURE_KEY. Set it: without it GoatFlow uses a temporary key and logs a warning, and values encrypted with that key cannot be read after a restart. Other data has no application-level encryption; use database or disk encryption
  • Organisations carry their own settings, plugins and sign-in. Tickets, queues and customers are separated with queue and group permissions rather than by organisation (or run a separate instance); stronger organisation separation is on the roadmap
  • Audit log: sign-ins (success and failure, for every sign-in method), 2FA, password and API token changes, every change made through admin pages and admin APIs (with the fields that changed; secrets show as redacted) and refused admin requests are recorded. Admin → Audit Log filters them and exports them as CSV. Events are kept for 365 days by default (configurable, or forever). Recording ticket views, attachment downloads and exports is a setting, off by default. Ticket changes are also kept in each ticket’s history, and deletions in the deletion log. The log is a database table that someone with database access could change; tamper-evident logging is for the goatkit-audit plugin
  • GDPR: anonymisation, retention and the deletion log help with erasure requests. There is no compliance reporting and no data-subject export; ticket statistics can be exported as CSV or JSON through the API, limited to the queues the agent can read

Plugins

Marketplace

  • Distribution: the plugin index is a GitHub repository; packages are downloaded from GitHub Releases
  • Install and update from Admin → Marketplace (/admin/marketplace) or the gk install / search / update CLI
  • Version compatibility: a plugin’s minimum GoatFlow version is checked, and incompatible versions are refused
  • Dependencies: plugins declare the plugins they need in the marketplace index; installing or updating a plugin from the CLI or Admin -> Marketplace also installs the missing ones, after checking that every one is listed and runs on this GoatFlow, and each one is downloaded and verified like any other install
  • Signing: GoatFlow runs only signed plugin code. Every plugin binary must be signed by a trusted publisher (our ed25519 key is built in; administrators can add others), checked before an install or upload replaces anything and again every time the plugin starts (0.11.0 skipped the check when a plugin was hot-reloaded or restarted automatically; fixed in 0.11.1). Marketplace packages are also signed as a whole. Knowledge Base and Kanban releases, and the plugins bundled with GoatFlow, are signed with our key in their release workflows. Turning the check off is for development systems only. Knowledge Base and Kanban packages also carry a signed SLSA build provenance attestation (gh attestation verify goat-kb.zip --repo goatkit/goat-kb)
  • Package extraction rejects symbolic links and paths outside the plugin directory, and limits size (100 MB per file, 500 MB in total) and file count (1,000)
  • Community plugins: the free, open source plugins, as opposed to the paid enterprise plugins. Today these are Knowledge Base and Kanban, both Apache-2.0 and published by the GoatKit team. The marketplace is open to contributions: authors list their plugin with a pull request to the marketplace index, and a plugin signed by another publisher installs once an administrator adds that publisher’s key

Sandbox

Every call a plugin makes into GoatFlow goes through a per-plugin policy:

  • Database access limited to the tables the policy allows; each SQL statement is parsed to find the tables it touches
  • Outbound HTTP limited to allowed URL patterns. Internal addresses (localhost, private networks) are reachable only when the plugin’s patterns name that host exactly or an administrator allows it for that plugin, checked on every resolved address; cloud metadata addresses never are. At most 5 redirects, each re-checked; responses are capped at 32 MB by default, adjustable per plugin
  • Sensitive settings (passwords, secrets, keys, database and mail settings) are hidden unless explicitly granted
  • Rate limits on database, HTTP and plugin-to-plugin calls; 10 emails per minute per plugin; a time limit on every call and on start-up
  • Call depth: plugin-to-plugin chains stop at 10 hops
  • Policy changes to permissions, rate limits and timeouts take effect on the next call, without a restart; memory, CPU and network changes restart the plugin
  • Reload: a new plugin version is started before the old one is stopped, so requests are not dropped
  • Limits per plugin, shown and changed by administrators in Admin -> Plugins -> Limits:
    • Memory: every plugin. WASM plugins get it as their memory limit; gRPC plugins (separate processes) get a heap limit
    • CPU: gRPC plugins get a number of cores and lower priority. Where the host gives GoatFlow its own writable cgroup, memory and CPU are also hard cgroup limits; in the standard container deployments it doesn’t, so the heap limit and core count are what apply
    • Network: a gRPC plugin process can’t open network connections unless it has the network permission, which the plugin declares or an administrator grants, and an administrator can remove; otherwise everything goes through the checked HTTP requests above. WASM plugins have no other network access
  • Isolation: gRPC plugins run as separate processes with only a minimal environment (no database credentials or secrets), in a Landlock sandbox: they can read only their own directory and system libraries, write only their own temp directory, can’t see other processes, and can’t read GoatFlow’s files, memory or environment; on Linux 6.12 or later they also can’t signal other processes. On a kernel without Landlock the plugins run without this sandbox; the Limits page shows what the server’s kernel enforces. GoatFlow’s own process is marked non-dumpable, so other processes running as the same user can’t read its environment or memory either

Knowledge Base Plugin

  • Per-organisation data: every query is scoped to the organisation
  • Visibility: each article is for customers and agents, or for agents only; articles are created and edited by administrators
  • Editor: rich text editing with HTML sanitised on save and on display (bluemonday); images can be pasted or dropped in, with type and size limits on uploads
  • Search: full-text search with the optional Zinc backend; without it, search matches titles and summaries
  • Import of OTRS / Znuny FAQ XML exports, admin only
  • Languages: every Knowledge Base screen and message is translated into all 15 GoatFlow languages

Containers and Supply Chain

  • SLSA Level 2 Compliance: GoatFlow release artifacts and first-party plugins meet SLSA v1.0 Build Level 2: they are built on GitHub-hosted runners and published with signed build provenance, which anyone can check with gh attestation verify
  • Non-root containers: every container runs as a non-root user: the GoatFlow backend and runner images (UID 1000, Alpine Linux 3.19), MariaDB, PostgreSQL, Valkey, Caddy and the development services in the Compose files, every pod in the Helm chart, and the tooling containers our Makefile and CI start. GoatFlow refuses to start as root. On TrueNAS, the platform’s own permissions helper runs as root to set dataset ownership
  • Helm chart: every pod runs as non-root with a read-only root filesystem, no privilege escalation and all capabilities dropped. The chart generates random database credentials, signing and encryption keys and an admin password at install
  • Health checks: the backend serves /health, used by the image health check and the chart’s liveness and readiness probes. /metrics needs an admin login; the separate Prometheus port is off by default
  • Release builds: images for linux/amd64 and linux/arm64, with an SBOM and a signed SLSA v1.0 build provenance attestation generated on GitHub-hosted runners (GitHub attest-build-provenance), which meets SLSA v1.0 Build Level 2; check it with gh attestation verify oci://ghcr.io/goatkit/goatflow:<version> --repo goatkit/goatflow. The Helm chart (the OCI package and the .tgz release asset) and the air-gapped bundle carry the same attestation. Since 0.11.0 the images are also signed with Sigstore cosign (keyless, by the release workflow): cosign verify ghcr.io/goatkit/goatflow:<version> --certificate-identity-regexp '^https://github.com/goatkit/goatflow/.github/workflows/build.yml@refs/tags/v' --certificate-oidc-issuer https://token.actions.githubusercontent.com

Security Checks

  • In CI on every push to main or dev, every pull request to them, and weekly: Gitleaks secret scanning, gosec (any finding fails the build), govulncheck on GoatFlow and the plugin SDK (fails the build when the code calls a known vulnerability), go vet and the route authorization test
  • Semgrep managed scans of the repository: Semgrep Code (static analysis with Semgrep Pro and community rules) and Semgrep Supply Chain (known-vulnerable and malicious dependencies in the Go and npm lockfiles, with reachability analysis)
  • Run by hand with Makefile targets: Trivy and staticcheck
  • Dependencies: GitHub Dependabot alerts are on, and Dependabot opens weekly update pull requests for Go modules, frontend packages, GitHub Actions, container base images, the Compose files and the Helm chart. Each one runs CI and is reviewed before it is merged; nothing merges automatically

Reporting a Vulnerability

Please do not report security issues in public GitHub issues, discussions or pull requests.

Report privately through GitHub private vulnerability reporting. The report stays private between you and the maintainers and becomes the draft advisory for the fix. If you cannot use GitHub, email [email protected].

The full policy, including scope and testing rules, is in SECURITY.md.

Response Times

SeverityFirst response
Critical24 hours
High48 hours
Medium1 week
Low1 week

Severity is rated with CVSS v3.1 when we confirm the report.

Disclosure Process

  1. Triage: we reproduce the issue and confirm affected versions and severity
  2. Private fix: developed in the advisory’s private fork, with the reporter invited to review
  3. CVE: requested through GitHub for accepted vulnerabilities in released versions
  4. Release: critical fixes ship as soon as they are ready
  5. Disclosure: a GitHub Security Advisory is published and the fix is listed under “Security” in the changelog
  6. Credit: reporters are credited in the advisory and changelog unless they ask not to be

We ask reporters to keep the issue private until the advisory is published, or 90 days after the report, whichever comes first. We do not run a paid bug bounty.

Supported Versions

Until 1.0.0, security fixes go into the latest minor release only (currently 0.11.x). Upgrade to receive a fix.

Security Updates

Published advisories are listed at github.com/goatkit/goatflow/security/advisories. To be notified, watch the repository on GitHub with Custom → Releases enabled.