Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
htmlc
htmx
httpdebug
Huawei

Check warning on line 150 in .github/actions/spelling/expect.txt

View workflow job for this annotation

GitHub Actions / Check Spelling

`Huawei` is ignored by check-spelling because another more general variant is also in expect. (ignored-expect-variant)
huawei
hypertext
iaskspider
Expand Down Expand Up @@ -187,8 +187,8 @@
licend
licstart
lightpanda
limsa
Linting
LIMSA
linting
linuxbrew
LLU
loadbalancer
Expand Down Expand Up @@ -341,7 +341,7 @@
withthothmock
wolfbeast
wordpress
Workaround

Check warning on line 344 in .github/actions/spelling/expect.txt

View workflow job for this annotation

GitHub Actions / Check Spelling

`Workaround` is ignored by check-spelling because another more general variant is also in expect. (ignored-expect-variant)
workaround
workdir
wpbot
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Commit Lint

on: [push, pull_request]

permissions:
contents: read

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false

- name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
cache: npm

- name: Install commitlint
run: npm ci

- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: npx commitlint --last --verbose

- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
27 changes: 27 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test'
]
],
'subject-case': [2, 'never', ['pascal-case', 'upper-case']],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never']
}
};
5 changes: 4 additions & 1 deletion docs/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@

#### Fixes a problem with nonstandard URLs and redirects

Fixes [GHSA-jhjj-2g64-px7c](https://github.com/TecharoHQ/anubis/security/advisories/GHSA-jhjj-2g64-px7c).

Check notice on line 124 in docs/docs/CHANGELOG.md

View workflow job for this annotation

GitHub Actions / Check Spelling

Line matches candidate pattern `GHSA(?:-[0-9a-z]{4}){3}` (candidate-pattern)

This could allow an attacker to craft an Anubis pass-challenge URL that forces a redirect to nonstandard URLs, such as the `javascript:` scheme which executes arbitrary JavaScript code in a browser context when the user clicks the "Try again" button.

Expand All @@ -148,7 +148,7 @@

- [Czech](https://github.com/TecharoHQ/anubis/pull/849)
- [Finnish](https://github.com/TecharoHQ/anubis/pull/863)
- [Norwegian Bokmål](https://github.com/TecharoHQ/anubis/pull/855)

Check notice on line 151 in docs/docs/CHANGELOG.md

View workflow job for this annotation

GitHub Actions / Check Spelling

Line matches candidate pattern `[a-zA-Z]*[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*|[a-zA-Z]{3,}[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]|[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3,}` (candidate-pattern)
- [Norwegian Nynorsk](https://github.com/TecharoHQ/anubis/pull/855)
- [Russian](https://github.com/TecharoHQ/anubis/pull/882)

Expand Down Expand Up @@ -253,7 +253,10 @@

- Add `COOKIE_SECURE` option to set the cookie [Secure flag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cookies#block_access_to_your_cookies)
- Sets cookie defaults to use [SameSite: None](https://web.dev/articles/samesite-cookies-explained)
- Determine the `BIND_NETWORK`/`--bind-network` value from the bind address ([#677](https://github.com/TecharoHQ/anubis/issues/677)).
- Add conventional commit linting to enforce standardized commit message formatting across the project
- Fix OpenGraph passthrough with new policy definitions ([#717](https://github.com/TecharoHQ/anubis/issues/717))
- Determine the `BIND_NETWORK`/`--bind-network` value from the bind address ([#677](https://github.com/TecharoHQ/anubis/issues/677))
- Implement localization system. Find locale files in lib/localization/locales/.
- Implement a [development container](https://containers.dev/) manifest to make contributions easier.
- Fix dynamic cookie domains functionality ([#731](https://github.com/TecharoHQ/anubis/pull/731))
- Add option for custom cookie prefix ([#732](https://github.com/TecharoHQ/anubis/pull/732))
Expand Down
37 changes: 37 additions & 0 deletions docs/docs/developer/local-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Local development
---

If you use an editor with [Development containers](https://containers.dev) support, load this repo's [devcontainer configuration](https://github.com/TecharoHQ/anubis/tree/main/.devcontainer). Skip to [Running Anubis locally](#running-anubis-locally) if you are using the devcontainer.

Check notice on line 5 in docs/docs/developer/local-dev.md

View workflow job for this annotation

GitHub Actions / Check Spelling

Line matches candidate pattern `\(#\S*?[a-zA-Z]\S*?\)` (candidate-pattern)

This enables you to contribute from [GitHub Codespaces](https://github.com/features/codespaces) or other web-based editors.

Expand Down Expand Up @@ -60,6 +60,43 @@
DOCKER_REPO=registry.host/org/repo DOCKER_METADATA_OUTPUT_TAGS=registry.host/org/repo:latest npm run container
```

## Commit linting

Anubis enforces [conventional commits](https://www.conventionalcommits.org/) to maintain consistent commit messages. The commit linting is automatically set up when you run:

```text
npm ci
```

### Commit message format

Commits must follow this format:

```text
type(scope): description
```

**Valid types:**
- `feat`: New features
- `fix`: Bug fixes
- `docs`: Documentation changes
- `style`: Code style changes (formatting, missing semicolons, etc.)
- `refactor`: Code refactoring without changing functionality
- `perf`: Performance improvements
- `test`: Adding or updating tests
- `build`: Build system changes
- `ci`: CI/CD configuration changes
- `chore`: Maintenance tasks
- `revert`: Reverting previous commits

**Examples:**
- `feat: add dark mode support`
- `fix(policy): resolve memory leak in challenge validation`
- `docs: update API documentation`
- `perf(hash): optimize SHA-256 hashing performance`

The commit hook will automatically validate your commit messages and prevent commits that don't follow the conventional format.

## Building packages

For more information, see [Building native packages is complicated](https://xeiaso.net/blog/2025/anubis-packaging/) and [#156: Debian, RPM, and binary tarball packages](https://github.com/TecharoHQ/anubis/issues/156).
Expand Down
Loading
Loading