Hosted issue tracker for the fediverse: fediverse login, configurable fields and workflows, private security reports. Go + htmx.
README.md

Lacewing #

Issue tracking for the fediverse: a hosted issue tracker where people log in with their fediverse account, each project configures its own fields and workflow, and security reports stay private until they are fixed.

Website and documentation: https://willwu.tngl.sh/lacewing/ (built from docs/ with make site).

Status: early development. The first goal is to replace the littleFedi issue tracker (issues.littlefedi.org). So far: login with a fediverse account, organizations, projects (public or private), members and roles, invites, custom domains, configurable fields and workflow, and issues with comments, history and attachments, confidential security reports and embargoes, lists with full-text search, saved searches, CSV export and Atom feeds, and the Roundup import with redirects for old links. Deployment and notifications are next.

Build and run #

Only Go is required (see go.mod for the version):

make build                 # → ./lacewing
./lacewing serve           # http://127.0.0.1:8080, database in ~/.lacewing/
make run                   # debug logging, throwaway database in .tools/dev/

Configuration #

Settings come from, lowest priority first: built-in defaults, a YAML config file (--config or LACEWING_CONFIG), LACEWING_* environment variables, and command-line flags. See lacewing.example.yaml for every setting.

Setting Env Flag Default
listen LACEWING_LISTEN --listen 127.0.0.1:8080
base_url LACEWING_BASE_URL --base-url http://127.0.0.1:8080
shutdown_timeout LACEWING_SHUTDOWN_TIMEOUT 10s
database.path LACEWING_DATABASE_PATH --database ~/.lacewing/lacewing.db
log.level LACEWING_LOG_LEVEL info
log.format LACEWING_LOG_FORMAT text
trusted_proxies LACEWING_TRUSTED_PROXIES none
fediverse.insecure_dev_mode LACEWING_FEDIVERSE_INSECURE_DEV_MODE false
attachments.path LACEWING_ATTACHMENTS_PATH next to the database
attachments.max_size_mb LACEWING_ATTACHMENTS_MAX_SIZE_MB 10

Set base_url to the public https:// address in production: it turns on Secure __Host- cookies and HSTS. Run Lacewing behind a TLS-terminating reverse proxy and list that proxy in trusted_proxies (for example the proxy's container network, 10.89.4.0/24), so login rate limits see the real client address.

Logging in #

  • Fediverse account: enter your address (@you@example.social) on the login page. Lacewing finds your server (WebFinger, NodeInfo), registers itself there once, and runs OAuth2 with PKCE asking only to read your account (read:accounts, or read where the server knows no finer scope). It identifies you by your ActivityPub actor URI, which your server must host, and revokes the access token right after reading it: Lacewing never stores fediverse tokens and never posts for you. Works with the Mastodon API (Mastodon, GoToSocial, Pleroma, Akkoma, Pixelfed, littleFedi); Misskey and its offshoots are not supported yet. Your username here is your handle (you@example.social).
  • Password: for the instance admin and emergencies, set on the server: lacewing admin user set-password <username> (at least 15 characters).
  • Login link: lacewing admin login-link <username> prints a one-time link (15 minutes).
  • Sessions end after 30 days without use; /-/account lists yours and ends them. Login attempts are rate-limited per client IP, per fediverse server and per username.

To start an instance:

./lacewing admin user create willi --name "Willi" --admin
./lacewing admin user set-password willi    # or: admin login-link willi

Then log in and create an organization and its projects in the web UI. Other admin commands:

lacewing admin user create|disable|enable <username>
lacewing admin user set-password <username> [--clear]
lacewing admin instance block <domain> [--reason "…"]  # also unblock, list
lacewing admin org create <slug> --name "…" --owner <username>
lacewing admin org set-domain <slug> <domain>   # "" removes it
lacewing admin org archive <slug> [--undo]
lacewing admin org add-owner <slug> <username>  # recovery
lacewing admin settings signup open|invite      # who may create organizations
lacewing admin invite create-org                # single-use link, 7 days

Fields and workflow #

Each project has its own schema, edited by its maintainers under Settings → Fields and workflow: statuses (which count as closed, which is the default, optionally which changes between them are allowed), custom fields (text, number, date, single and multiple choice, user; required, default, filterable) and issue types with a help text and a prefilled description. New projects start from the "Simple" template (Open, Closed) or the "littleFedi" one (New, In progress, Testing, Deferred, Resolved; priority, category; Bug, Feature Request, Change Request). Removing anything only hides it from forms: existing issues keep their values.

Issues #

  • Issues have per-project numbers (#20) that never change, a type, a status, the project's fields, an assignee, watchers and an optional "duplicate of" link. Descriptions and comments are Markdown; #123 links to issue 123.
  • Anyone logged in who can see a project files issues, comments, watches and edits their own issue text and comments. Project members and maintainers (and org owners/admins) triage: status (following the workflow), assignee, fields, type and duplicates, and may edit any issue text.
  • History: every change is logged and shown between the comments; edited descriptions and comments keep their earlier versions.
  • Attachments: images, PDF, text, ZIP and gzip, up to 10 MB each (attachments.max_size_mb), checked by content, not by name. Images are shown inline, everything else is downloaded; files are served with a sandbox Content-Security-Policy.

Organizations, roles and privacy #

  • Organizations (public) contain projects, each public or private.
  • Roles: organization owner, admin, member; project maintainer and member, plus a security-team flag that only owners grant. Owners and admins maintain every project; private projects are visible only to their explicit members and to owners/admins.
  • Instance admins run the instance (sign-up mode, org-creation invites, custom domains, recovering owners) but don't automatically see private projects.
  • Invites are single-use links (7 days) that grant admin or member.
  • Renaming keeps old links working (redirects). Archived organizations and projects are read-only.
  • Profiles show only a display name and the organizations you share; no email address is stored at all.

Custom domains #

An instance admin can serve an organization on its own domain (lacewing admin org set-domain littlefedi issues.littlefedi.org): that domain then shows the organization at / and its projects at /{project}. Lacewing answers 421 for hosts it doesn't know, so put it behind a reverse proxy that passes the original Host header and terminates TLS for each domain (for example Caddy with on-demand TLS). Logging in on a custom domain goes through the main address, which hands a session for that domain over (single-use, 60 seconds); logging out on the main address ends it too.

Security #

  • Strict Content Security Policy: same-origin only, no inline scripts or styles, no eval, no framing.
  • Cross-origin form posts are rejected (Go's http.CrossOriginProtection, based on Sec-Fetch-Site and Origin).
  • Cookies are HttpOnly and SameSite=Lax; on https also Secure with the __Host- prefix.
  • Logs never contain query strings, cookies or headers, and attributes named like secrets (password, token, cookie, ...) are redacted.
  • The data directory is created with mode 0700.
  • One authorization layer: every request goes through the service layer, which checks permissions before touching organization data. Tests drive every operation and every route against a second organization and check that nothing changes or leaks.
  • Session, login and invite tokens are stored only as hashes. Admin and membership changes are written to the log as audit lines.
  • Requests to fediverse servers go through one client that refuses private, loopback and link-local addresses (checked on the dialed IP), caps response sizes and times out quickly. Fediverse access tokens are revoked right after the login and never stored. Passwords are hashed with argon2id.
  • User Markdown is rendered without raw HTML; only http(s), mailto and relative links survive, and external images become links (no third-party requests from readers' browsers).
  • Instance admins can block fediverse servers (and their subdomains): their accounts can't log in, and their sessions end.

Development #

make test       # go test ./...
make lint       # golangci-lint (pinned, downloaded to .tools/)
make check      # tidy, vet, race tests, lint, govulncheck
make hooks      # once per clone: run make check before pushing a release tag

CI runs on the Tangled spindle (.tangled/workflows/).

License #

Lacewing is free software under the GNU Affero General Public License v3.0. If you run a modified version as a service, you must offer its source code to its users (AGPL-3.0 section 13): point the "Source" link in the page footer (internal/ui/templates/layout.html) at your version.

Bundled third-party code: htmx (internal/ui/static/, Zero-Clause BSD, see LICENSE-htmx.txt).