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 AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ packages/ # Shared workspace packages, polyglot:
web/ # TypeScript web UI (own AGENTS.md)
website/ # Docs / integrations / API sites (own AGENTS.md)
blueprints/ # YAML declarative config (default/ system/ example/) applied at startup
locale/ # Backend translations (.po) + shared cspell dictionaries (en/dictionaries/)
locale/ # Backend translations (.po) + cspell overrides dictionary (en/dictionaries/)
tests/ # Cross-cutting test support: e2e/, integration/, geoip/, openid_conformance/
schemas/ # Third-party XSD/JSON schemas (SAML, WS-*, SCIM) used at runtime
scripts/ # Repo automation (schema build, compose generation, node setup, semver)
Expand Down Expand Up @@ -106,7 +106,7 @@ make web-test # Web UI tests (delegates to web/)
```bash
make lint-fix # Auto-fix: black + ruff (Python) and rustfmt (Rust)
make lint # Check: bandit, mypy --strict, golangci-lint, cargo deny/machete
make lint-spellcheck # cspell across the repo (shared dictionaries in locale/en/dictionaries/)
make lint-spellcheck # cspell across the repo (typo-only mode: reports known misspellings and forbidden British spellings, not unknown words)
make lint-catalogs # pnpm catalog pins in sync across the root/web/website workspaces
```

Expand Down
2 changes: 1 addition & 1 deletion authentik/lib/utils/reflection.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


def all_subclasses[T: type](cls: T, sort=True) -> list[T] | set[T]:
"""Recursively return all subclassess of cls"""
"""Recursively return all subclasses of cls"""
classes = set(cls.__subclasses__()).union(
[s for c in cls.__subclasses__() for s in all_subclasses(c, sort=sort)]
)
Expand Down
2 changes: 1 addition & 1 deletion authentik/outposts/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def outpost_related_post_save(sender, instance: OutpostServiceConnection | Outpo

def outpost_reverse_related_post_save(sender, instance: CertificateKeyPair | Brand, **_):
for field in instance._meta.get_fields():
# Each field is checked if it has a `related_model` attribute (when ForeginKeys or M2Ms)
# Each field is checked if it has a `related_model` attribute (when ForeignKeys or M2Ms)
# are used, and if it has a value
if not hasattr(field, "related_model"):
continue
Expand Down
165 changes: 22 additions & 143 deletions cspell.config.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
"version": "0.2",
"readonly": true,
"language": "en-US",
// Only report words that are known misspellings (with a suggested fix) or
// explicitly forbidden via `flagWords`. Unknown-but-plausible words — project
// jargon, identifiers, integration names — pass silently, so new terms do not
// require dictionary entries. This mirrors CodeSpell's behavior, which checks
// against a curated list of common misspellings rather than flagging every
// word absent from a dictionary.
"unknownWords": "report-common-typos",
"cache": {
"useCache": true,
"cacheLocation": "./.cspellcache",
Expand All @@ -19,68 +26,18 @@
}
]
],
// In typo-only mode, a dictionary entry is needed only when a legitimate term
// collides with the common-misspellings list. Record such collisions here
// rather than reviving per-topic dictionary files.
"dictionaryDefinitions": [
{
"name": "en-x-authentik-software-terms",
"path": "./locale/en/dictionaries/software-terms.txt",
"description": "English software-related terms",
"name": "en-x-authentik-overrides",
"path": "./locale/en/dictionaries/overrides.txt",
"description": "Legitimate terms that collide with the common-misspellings list",
"addWords": true
},
{
"name": "en-x-authentik-idp",
"path": "./locale/en/dictionaries/idp.txt",
"description": "English IdP words",
"addWords": true
},
{
"name": "en-x-authentik-python",
"path": "./locale/en/dictionaries/python.txt",
"addWords": true
},
{
"name": "en-x-authentik-rust",
"path": "./locale/en/dictionaries/rust.txt",
"addWords": true
},
{
"name": "en-x-authentik-golang",
"path": "./locale/en/dictionaries/golang.txt",
"addWords": true
},
{
"name": "en-x-authentik-people",
"path": "./locale/en/dictionaries/people.txt",
"description": "People names relevant to authentik",
"addWords": true
},
{
"name": "en-x-authentik-integrations",
"path": "./locale/en/dictionaries/integrations.txt",
"description": "English integration names",
"addWords": true
},
{
"name": "en-x-authentik-ignore",
"path": "./locale/en/dictionaries/ignore.txt",
"description": "English ignore list for authentik",
"addWords": true,
"noSuggest": true
}
],
"dictionaries": [
"en-x-authentik-software-terms",
"en-x-authentik-idp",
"en-x-authentik-ignore",
"en-x-authentik-people",
"en-x-authentik-integrations",
"node",
"softwareTerms",
"software-tools",
"computing-acronyms",
"companies",
"cpp-compound-words"
],
"allowCompoundWords": true,
"dictionaries": ["en-x-authentik-overrides"],
// British spellings to reject in favor of American variants. The `->` form
// forbids the left word and offers the right word as the suggested fix.
"flagWords": [
Expand Down Expand Up @@ -162,75 +119,25 @@
"name": "EncodedURI",
"description": "Encoded URIs, which are common in authentik's codebase and often contain many false positives.",
"pattern": "[a-zA-Z]+%3A%2F%2F.+"
},
{
"name": "ConfSuffix",
"description": "Variables with `conf` or `config` suffix",
"pattern": ["\\w+(conf|config)\\b", "\\b(conf|config)\\w+"]
}
],
// Only content-scoping patterns belong here (encoded blobs, upstream
// identifiers spelled the British way) — not word allowlists. Unknown words
// are no longer reported, so shape-of-word escapes are unnecessary.
"ignoreRegExpList": [
// DB Migrations
"authentik_c_\\w+_[0-9a-fA-F]+_idx",
// Google Analytics
"/G-[0-9A-Z]+/",
// Github Usernames
"@[a-zA-Z0-9_-]+",
// GitHub repositories
"github\\.com/[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+",
// Docker images
"docker\\.io/[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+",
// Suffix "change", which is common in migration files
"\\w+change\\b",
// Prefix "on", which is common in event handlers
"\\bon\\w+\\b",
// Prefix "pg", which is common in PostgreSQL-related code
"\\bpg\\w+\\b",
// Prefix "pf", which is common in PatternFly-related code
"\\bpf\\w+\\b",
// Prefix "ws", which is common in WebSocket-related code
"\\bws\\w+\\b",
// Suffix "propertymapping"
"\\w+propertymapping\\b",
// Words that end with "source", "provider", "user", "group", or "connection",
// which are common in authentik's codebase and often contain many false positives.
"\\w+(source|provider)(user|group|connection)\\b",
"\\w+(source|provider)(user|group|connection)",
// Encoded URIs
"EncodedURI",
// Basic auth header
"Basic [a-zA-Z0-9+/=]+",
// "ify" suffix, e.g. "stringify", "classify".
"\\w+l?ify\\b",
// "ified" suffix, e.g. "stringified", "classified".
"\\w+l?ified\\b",
// "ifying" suffix, e.g. "stringifying", "classifying".
"\\w+l?ifying\\b",
// PatternFly's grey label modifier is spelled the British way upstream.
"pf-m-grey",
// Other terms we needed
"AKQL",
"Base64",
"Email",
"EncodedURI",
"FOUC", // Flash Of Unstyled Content
"HashStrings",
"PublicKey",
"RsaCert",
"SpellCheckerIgnoreInDocSetting",
"SshRsa",
"UnicodeRef",
"Urls",
"analyse-phase", // UK Spelling
"href",
"lit-analyse" // UK Spelling
// lit-analyzer's CLI and its build phase are spelled the British way upstream.
"analyse-phase",
"lit-analyse"
],
"languageSettings": [
{
"languageId": "markdown,mdx",
"dictionaries": [
"en-x-authentik-python",
"en-x-authentik-rust",
"en-x-authentik-golang"
],
"ignoreRegExpList": [
// Fenced code blocks
"/^\\s*```[\\s\\S]*?^\\s*```/gm",
Expand All @@ -242,16 +149,6 @@
{
"languageId": "typescript,javascript,typescriptreact,javascriptreact,mdx,astro",
"ignoreRegExpList": [
// Event handlers e.g. onClick, onmouseover
"\\bon\\w+\\b",
// Custom web component tags e.g. <ak-button>, <ak-toggle-group>
"</?ak-[a-z0-9-]+",
// Scoped import paths, e.g. @webcomponents/webcomponentsjs
"@[a-z0-9-]+/[a-z0-9-]+",
// Import paths that end with "js", which are often false positives
// and not worth the effort of creating a custom dictionary for.
"[a-z0-9-]+js",
"ConfSuffix",
"js-hex-escape",
"js-unicode-escape",
"js-regexp-flags",
Expand All @@ -260,25 +157,8 @@
},
{
"languageId": "python",
"dictionaries": ["en-x-authentik-python"],
"includeRegExpList": ["comments"]
},
{
"languageId": "rust",
"dictionaries": ["en-x-authentik-rust"]
},
{
"languageId": "go",
"dictionaries": ["en-x-authentik-golang"]
},
{
"languageId": "makefile,toml,yaml",
"dictionaries": [
"en-x-authentik-python",
"en-x-authentik-rust",
"en-x-authentik-golang"
]
},
{
"languageId": "css,scss",
"ignoreRegExpList": [
Expand All @@ -292,7 +172,6 @@
"{cspell.*,cSpell.*,.cspell.*,cspell.config.*}", // CSpell configuration files
"cspell-report.{json,html,txt}", // CSpell report files
"dictionaries", // Custom dictionary files
"ignore.txt", // Custom ignore list files
"./locale", // Locale files (Django, CSpell)
"web/xliff", // XLIFF translation files
"web/src/locales", // Generated TypeScript locale
Expand Down
20 changes: 0 additions & 20 deletions locale/en/dictionaries/golang.txt

This file was deleted.

9 changes: 0 additions & 9 deletions locale/en/dictionaries/idp.txt

This file was deleted.

27 changes: 0 additions & 27 deletions locale/en/dictionaries/ignore.txt

This file was deleted.

Loading
Loading