DMT_RESOURCE_INVALID (which deterministically evaluates to DENY).| Kind | Purpose | Example Resource | Example Policy Pattern | |
path | Filesystem paths | /var/log/app/output.log | /var/log/**/*.log | |
url | Remote HTTP/HTTPS endpoints | https://api.github.com/repos/org/repo | https://api.github.com/repos/*/* | |
host | Network hostnames and domains | db.production.internal | *.production.internal | |
identifier | Entity names (tables, queues, users) | users_v2 | users_* | |
exact | Commands and opaque strings | docker ps -a | docker *, `* | sh, or literal git status` |
kind: "path")../). Dmint's path engine enforces strict normalization before matching:// $\to$ /), ./ segments, and trailing slashes.../ segments within bounds./var/../../etc/passwd) are rejected with DMT_RESOURCE_INVALID.\0): Immediately rejected.%2f (/) and %2e%2e (..) are rejected.\): Rejected in POSIX path mode.*: Matches within a single path segment (never crosses /).**: Matches across multiple path segments.os.path.realpath()) is the tool resolver's responsibility before passing the resolved path to Dmint.kind: "url", "host")http or https. Schemes like file://, ftp://, or gopher:// are rejected.xn--...).example.com. to example.com. Repeated trailing dots (e.g. example.com..) are strictly rejected.:80 for HTTP and :443 for HTTPS.https://user:pass@evil.com) are rejected to prevent authority confusion.%2f or %2e%2e are rejected.*.example.com) strictly match subdomains (e.g. api.example.com, auth.example.com).kind: "identifier")*) match strictly alphanumeric and standard identifier characters ([A-Za-z0-9_.-]*).# Fixed resource (via callable resolver): @dmint.protect("database.query", resource=lambda _: "public.users") def query_users(): ... # Dynamic resource extracted from arguments: @dmint.protect( "fs.read_file", resource=lambda args: args["filepath"], # Extracted from arguments ) def read_file(filepath: str) -> str: ...