Skip to main content

Module source

Module source 

Source
Expand description

External rule sources: git repositories cloned into a local cache, plus extra local directories. Each configured [[rules.sources]] is resolved to a directory of rule YAML and the provenance stamped on the rules loaded from it.

Git auth is delegated to the machine’s own git (ssh-agent, credential helper, ~/.gitconfig). SLOPGUARD_GIT_TOKEN overrides that for https URLs by injecting the token into the transient git fetch <url> argument only, never into the persisted remote, so no token is written to disk.

Structs§

ResolvedSource
A source resolved to a directory on disk plus the provenance of its rules.
SourceOptions
How git sources are cached and whether the network may be used.

Enums§

RuleOrigin
Where a rule came from, tracked so slopguard list can show provenance.
SourceError

Functions§

default_cache_root
Default cache location for git sources: $SLOPGUARD_SOURCES_CACHE when set, otherwise <user cache>/slopguard/sources.
resolve_sources
Resolve every configured source to a directory and its provenance.