275 Commits

Author SHA1 Message Date
Xe Iaso
3701b2bc3d
ci(go): fix govulncheck (#464)
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-07 13:42:28 +00:00
Xe Iaso
6200c4c123
docs(known-instances): add gitlab.freedesktop.org
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-07 08:57:26 -04:00
Xe Iaso
16412a8bf9
ci: add govulncheck (#456)
This is intended to catch low-hanging fruit.

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-06 14:07:55 +00:00
hyperdefined
2e9b18a510
chore(sponsors): add canine.tools (#450)
* chore(sponsors): add canine.tools

* chore(sponsors): update canine.tools logo
2025-05-05 20:31:10 -04:00
Xe Iaso
e64987ef90
Pre-release: v1.18.0-pre1
Signed-off-by: Xe Iaso <me@xeiaso.net>
v1.18.0-pre1
2025-05-05 17:07:10 -04:00
Xe Iaso
8ff28fbb33
chore(static/img): add mascot attributions to the repo (#448)
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-05 16:29:16 +00:00
Xe Iaso
e953b514fa
feat(js): stop execution if the client disabled cookies (#438)
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-05 11:10:26 -04:00
Josh Soref
52a6a65cc4
Spelling (#445)
* link: stackoverflow explanation of cookies

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: bazaar

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: enabling

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: expressions

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: implicitly

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: intermediate

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: nonexistent

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: open graph

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: really, really,

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: receive

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-05-05 10:52:02 -04:00
Xe Iaso
99f645a590
fix(anubis): disable opengraph passthru by default (#447)
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-05 14:37:38 +00:00
Patrick Linnane
3b50b4c6c0
zizmor: add config file to silence unpinned-uses of Homebrew/actions (#441) 2025-05-05 01:22:36 +00:00
dependabot[bot]
8ee0529321
build(deps): bump the github-actions group with 3 updates (#439)
Bumps the github-actions group with 3 updates: [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance), [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/attest-build-provenance` from 2.2.3 to 2.3.0
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](c074443f1a...db473fddc0)

Updates `astral-sh/setup-uv` from 6.0.0 to 6.0.1
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](c7f87aa956...6b9c6063ab)

Updates `github/codeql-action` from 3.28.16 to 3.28.17
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](28deaeda66...60168efe1c)

---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
  dependency-version: 2.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: astral-sh/setup-uv
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: 3.28.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-04 20:46:48 -04:00
Xe Iaso
799f47efbf
chore(sponsors): add Terminal Trove
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-04 09:59:54 -04:00
Xe Iaso
865d513e35
feat(checker): add CEL for matching complicated expressions (#421)
* feat(lib/policy): add support for CEL checkers

This adds the ability for administrators to use Common Expression
Language[0] (CEL) for more advanced check logic than Anubis previously
offered.

These can be as simple as:

```yaml
- name: allow-api-routes
  action: ALLOW
  expression:
    and:
    - '!(method == "HEAD" || method == "GET")'
    - path.startsWith("/api/")
```

or get as complicated as:

```yaml
- name: allow-git-clients
  action: ALLOW
  expression:
    and:
    - userAgent.startsWith("git/") || userAgent.contains("libgit") || userAgent.startsWith("go-git") || userAgent.startsWith("JGit/") || userAgent.startsWith("JGit-")
    - >
      "Git-Protocol" in headers && headers["Git-Protocol"] == "version=2"
```

Internally these are compiled and evaluated with cel-go[1]. This also
leaves room for extensibility should that be desired in the future. This
will intersect with #338 and eventually intersect with TLS fingerprints
as in #337.

[0]: https://cel.dev/
[1]: https://github.com/google/cel-go

Signed-off-by: Xe Iaso <me@xeiaso.net>

* feat(data/apps): add API route allow rule for non-HEAD/GET

Signed-off-by: Xe Iaso <me@xeiaso.net>

* docs: document expression syntax

Signed-off-by: Xe Iaso <me@xeiaso.net>

* fix: fixes in review

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-03 14:26:54 -04:00
mans17
af07691139
Update apache.mdx (#430)
I guess the whole purpose is to avoid having 3001 opened to the world. This is the easyest way to do it (iptables might be an option too)

Signed-off-by: mans17 <github@spontex.org>
2025-05-03 13:29:30 +00:00
Xe Iaso
74dcebf20b
docs: add caddy docs (#423)
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-02 19:15:05 +00:00
Xe Iaso
92d3dd361b
docs(user): add frequently asked questions page (#422)
Closes #400
2025-05-02 18:53:53 +00:00
Benjamin Armintor
9e760b1c16
deduplicate css rules by using media query to set variables (#420)
* deduplicate css rules by using media query to set variables

* Update xess/xess.css

Co-authored-by: Xe Iaso <me@xeiaso.net>
Signed-off-by: Benjamin Armintor <armintor@gmail.com>

---------

Signed-off-by: Benjamin Armintor <armintor@gmail.com>
Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-05-02 14:17:27 -04:00
Kurt Kremitzki
fc54e95208
Update nginx.mdx upstream syntax (#397)
Remove http:// prefix from commented-out TCP socket nginx upstream example

Signed-off-by: Kurt Kremitzki <kkremitzki@users.noreply.github.com>
2025-05-02 18:15:13 +00:00
Henri Vasserman
f879e0d307
fix(cmd/anubis): print "Rule error IDs" in JSON (#408)
* fix(cmd/anubis): print "Rule error IDs" in JSON

amend: add new gpg key

* chore: changelog
2025-05-02 18:05:41 +00:00
Xe Iaso
6e82373718
feat(config): allow multi-level imports (#402)
* feat(config): allow multi-level imports

Signed-off-by: Xe Iaso <me@xeiaso.net>

* chore(data): fix spelling of Marginalia

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-02 13:57:20 -04:00
Xe Iaso
f8e1000ab0
fix(yeetfile): copy all docs, data files, and botPolicies.yaml (#419)
* fix(yeetfile): copy all docs, data files, and botPolicies.yaml

Closes #415

Signed-off-by: Xe Iaso <me@xeiaso.net>

* ci: bump yeet

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-02 08:43:19 -04:00
Thomas Schuster
fa362c8ec9
docs(known-instances): Add FreeCAD Wiki to known instances (#414)
Update to #407 in accordance with https://blog.freecad.org/2025/04/30/forum-and-wiki-performance-anubis-deployed/

Signed-off-by: Thomas Schuster <twihno@gmail.com>
2025-05-02 08:39:01 -04:00
Jan Alexander Steffens
76f2029fb5
fix(web): Avoid timestamping main.mjs.gz (#412)
Improves reproducibility.
2025-05-01 19:52:50 +00:00
Lothar Serra Mari
5d9cc40e34
docs(known-instances): add ScummVM (#411)
Signed-off-by: Lothar Serra Mari <mail@serra.me>
2025-05-01 18:12:45 +00:00
Xe Iaso
63b8411220
Version 1.17.1: Asahi sas Brutus: Echo 1
- Added customization of authorization cookie expiration time with `--cookie-expiration-time` flag or envvar
- Updated the `OG_PASSTHROUGH` to be true by default, thereby allowing OpenGraph tags to be passed through by default
- Added the ability to [customize Anubis' HTTP status codes](./admin/configuration/custom-status-codes.mdx) ([#355](https://github.com/TecharoHQ/anubis/issues/355))

Signed-off-by: Xe Iaso <me@xeiaso.net>
v1.17.1
2025-05-01 13:24:37 -04:00
Thomas Schuster
803aa35d66
Update known-instances.md (#407)
The FreeCAD forum is also using anubis

Signed-off-by: Thomas Schuster <twihno@gmail.com>
2025-05-01 14:27:27 +00:00
polcak
cb523333a1
Update information on workarounds for JShelter (#399)
* Update information on workarounds for JShelter

The previous version unnecessarily lowered the protection that JShelter brings to their users. This commits provides three alternatives that users can apply and the recommended one is easier than the original one and less invasive.

Signed-off-by: polcak <ipolcak@fit.vutbr.cz>

* docs(broken-extensions): amend wording, use an admonition, formatting

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: polcak <ipolcak@fit.vutbr.cz>
Signed-off-by: Xe Iaso <me@xeiaso.net>
Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-05-01 13:20:39 +00:00
Jareth Gomes
91275c489f
feat: make authorization cookie default expiration time customizable (#389) 2025-05-01 10:05:33 +00:00
Xe Iaso
feb3dd2bcb
docs(known-instances): Comic Fanfiction Authors Archive
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-29 16:16:11 -04:00
Jason Cameron
06a762959f
feat: enable Open Graph tag passthrough by default (#348)
* feat: enable Open Graph tag passthrough by default

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* docs(changelog): move opengraph passthrough on by default to unreleased

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Jason Cameron <git@jasoncameron.dev>
Signed-off-by: Xe Iaso <me@xeiaso.net>
Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-04-29 19:19:46 +00:00
Xe Iaso
74d330cec5
feat(config): add ability to customize HTTP status codes Anubis returns (#393)
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-29 15:13:44 -04:00
Xe Iaso
2935bd4aa7
docs(known-instances): add more Sourceware endpoints
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-29 15:08:37 -04:00
Xe Iaso
7d52e9ff5e
docs(known-instances): add Sourceware
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-29 15:06:13 -04:00
Jason Cameron
4184b42282
feat(og): Foward host header (#370)
* feat(ogtags): enhance target URL handling for OGTagCache, support Unix sockets

Closes: #323 #319
Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* docs: update CHANGELOG.md to include Opengraph passthrough support for Unix sockets

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* docs: update CHANGELOG.md to include Opengraph passthrough support for Unix sockets

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* feat(ogtags): add option to consider host in Open Graph tag cache key

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* feat(ogtags): add option to consider host in OG tag cache key

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* test(ogtags): enhance tests for OGTagCache with host consideration scenarios

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* refactor(ogtags): extract constants for HTTP timeout and max content length

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* refactor(ogtags): restore fetchHTMLDocument method for cache key generation

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* refactor(ogtags): replace maxContentLength field with constant and ensure HTTP scheme is set correctly

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* fix(fetch): add proxy headers

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

---------

Signed-off-by: Jason Cameron <git@jasoncameron.dev>
2025-04-29 08:20:04 -04:00
Xe Iaso
7a20a46b0d
docs(traefik): change title to Traefik
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-28 23:51:09 -04:00
dependabot[bot]
6daf08216e
build(deps-dev): bump esbuild from 0.25.2 to 0.25.3 in the npm group (#388)
Bumps the npm group with 1 update: [esbuild](https://github.com/evanw/esbuild).


Updates `esbuild` from 0.25.2 to 0.25.3
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.2...v0.25.3)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-27 22:01:37 -04:00
dependabot[bot]
bd0e46dac3
build(deps): bump the github-actions group with 4 updates (#387)
Bumps the github-actions group with 4 updates: [docker/build-push-action](https://github.com/docker/build-push-action), [actions-hub/kubectl](https://github.com/actions-hub/kubectl), [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `docker/build-push-action` from 6.15.0 to 6.16.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](471d1dc4e0...14487ce63c)

Updates `actions-hub/kubectl` from 1.32.3 to 1.33.0
- [Release notes](https://github.com/actions-hub/kubectl/releases)
- [Commits](9270913c29...e81783053d)

Updates `astral-sh/setup-uv` from 5.4.2 to 6.0.0
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](d4b2f3b6ec...c7f87aa956)

Updates `github/codeql-action` from 3.28.15 to 3.28.16
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](45775bd823...28deaeda66)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: 6.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions-hub/kubectl
  dependency-version: 1.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: astral-sh/setup-uv
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: 3.28.16
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-28 01:40:38 +00:00
Dryusdan
76514f9f32
Bump AI-robots.txt rules to version 1.29 (#383) 2025-04-27 20:52:08 -04:00
Xe Iaso
b0f0913ea2
v1.17.0: Asahi sas Brutus
Signed-off-by: Xe Iaso <me@xeiaso.net>
v1.17.0
2025-04-27 15:16:25 -04:00
Xe Iaso
5423ab013a
ci(packages): final pre-release yeet bump (#384)
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-27 16:54:03 +00:00
Jason Cameron
301c7a42bd
refactor(lib): Split up anubis.go into some smaller files. (#379)
* refactor(logging): centralize logger creation in GetLogger function

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* refactor(logging): rename GetLogger to GetRequestLogger for clarity

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* refactor: streamline error handling and response methods

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* refactor(lib): Split anubis.go up into some smaller specialized methods

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* refactor(http): simplify error response handling by using respondWithStatus

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* chore(lib): run goimports

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Jason Cameron <git@jasoncameron.dev>
Signed-off-by: Xe Iaso <me@xeiaso.net>
Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-04-27 13:36:39 +00:00
Kistaro Windrider
755c18a9a7
README: Fix broken link to policy definition docs. (#380) 2025-04-27 13:33:41 +00:00
Xe Iaso
0fa9906e3a
test(config): add Xesite's old policy file to known good test cases (#382)
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-27 13:32:50 +00:00
p0008874
b08580ca33
docs(known-instances): add Codeberg. (#381)
Signed-off-by: p0008874 <75534590+p0008874@users.noreply.github.com>
2025-04-27 12:17:27 +00:00
Xe Iaso
d8f923974e
chore: blank commit to unbreak git
Signed-off-by: Xe Iaso <me@xeiaso.net>
v1.17.0-beta4
2025-04-26 13:52:13 -04:00
Xe Iaso
ef52550e70
fix(config): remove trailing newlines in regexes (#373)
Closes #372

Fun YAML fact of the day:

What is the difference between how these two expressions are parsed?

```yaml
foo: >
  bar
```

```yaml
foo: >-
  bar
```

They are invisible in yaml, but when you evaluate them to JSON the
difference is obvious:

```json
{
  "foo": "bar\n"
}
```

```json
{
  "foo": "bar"
}
```

User-Agent strings, URL path values, and HTTP headers _do_ end in
newlines in HTTP/1.1 wire form, but that newline is usually stripped
before the server actually handles it. Also HTTP/2 is a thing and does
not terminate header values with newlines.

This change makes Anubis more aggressively detect mistaken uses of the
yaml `>` operator and nudges the user into using the yaml `>-` operator
which does not append the trailing newline.

I had honestly forgotten about this YAML behavior because it wasn't
relevant for so long. Oops! Glad I released a beta.

Whenever you get into this state, Anubis will throw a config parsing
error and then give you a message hinting at the folly of your ways.

```
config.Bot: regular expression ends with newline (try >- instead of > in yaml)
```

Big thanks to https://yaml-multiline.info, this helped me realize my
folly instantly.

@aiverson, this is official permission to say "told you so".

Signed-off-by: Xe Iaso <me@xeiaso.net>
1.17.0-beta2 v1.17.0-beta3
2025-04-26 14:01:15 +00:00
Xe Iaso
c669b47b57
fix(lib): make Anubis less paranoid (#365)
Previously Anubis would aggressively make sure that the client cookie
matched exactly what it should. This has turned out to be too paranoid
in practice and has caused problems with Happy Eyeballs et. al.

This is a potential fix to #303 and #289.
v1.17.0-beta1
2025-04-25 15:02:55 -04:00
Jason Cameron
24f8ba729b
feat: add support for a base prefix (#294)
* fix: rename variable for preventing collision in ED25519 private key handling

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* fix: remove unused import and debug print in xess.go

Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* feat: introduce base path configuration for Anubis endpoints

Closes: #231
Signed-off-by: Jason Cameron <git@jasoncameron.dev>

* hack(internal/test): skip these tests for now

Signed-off-by: Xe Iaso <me@xeiaso.net>

* fix(yeet): unbreak package builds

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Jason Cameron <git@jasoncameron.dev>
Signed-off-by: Xe Iaso <me@xeiaso.net>
Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-04-25 14:39:38 -04:00
Sandro
6858f66a62
Add check endpoint which can be used with nginx' auth_request function (#266)
* Add check endpoint which can be used with nginx' auth_request function

* feat(cmd): allow configuring redirect domains

* test: add test environment for the nginx_auth PR

This is a full local setup of the nginx_auth PR including HTTPS so that
it's easier to validate in isolation.

This requires an install of k3s (https://k3s.io) with traefik set to
listen on localhost. This will be amended in the future but for now this
works enough to ship it.

Signed-off-by: Xe Iaso <me@xeiaso.net>

* fix(cmd|lib): allow empty redirect domains variable

Signed-off-by: Xe Iaso <me@xeiaso.net>

* fix(test): add space to target variable in anubis container

Signed-off-by: Xe Iaso <me@xeiaso.net>

* docs(admin): rewrite subrequest auth docs, make generic

* docs(install): document REDIRECT_DOMAINS flag

Signed-off-by: Xe Iaso <me@xeiaso.net>

* feat(lib): clamp redirects to the same HTTP host

Only if REDIRECT_DOMAINS is not set.

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-04-25 17:38:02 +00:00
Xe Iaso
a5d796c679
docs(install): note that Anubis needs certain paths proxied (#363)
Closes #310

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-25 17:32:29 +00:00