How krishna-shetty29/verified-auth works
Verified Auth is a small authorization-policy compiler and verifier. Its main workflow accepts a policy and request through the CLI, parses and type-checks the policy, then executes it; verification instead searches for violations with Z3, validates and replays any counterexample through the runtime, and reports or exports the confirmed result. The graph preserves the documented compiler stages and both security rules. Relationships are based on the README and sampled source; unsampled internals are not inferred beyond those documented stages.
Main entry points: cli.py CLI commands · verifier.py Rule verifier · models.py Request models · reporting.py Verification reporting
Components 14
Command interface
- CLI commands
src/verified_auth/cli.py - Module entry
src/verified_auth/__main__.py
Policy front end
- Policy parser
src/verified_auth/parser.py - Policy grammar
src/verified_auth/grammar.lark - Policy AST
src/verified_auth/ast_nodes.py - Name and type checking
src/verified_auth/typecheck.py - Typed policy IR
src/verified_auth/ir.py
Authorization runtime
- Request models
src/verified_auth/models.py - Runtime compiler
src/verified_auth/runtime.py
Security verification
- Symbolic compiler
src/verified_auth/symbolic.py - Rule verifier
src/verified_auth/verifier.py - Verification reporting
src/verified_auth/reporting.py - Counterexample JSON
Other components
- CLI user
Connections 24
- CLI user → Module entry: runs module
README.md - Module entry → CLI commands: calls CLI
src/verified_auth/__main__.py - CLI user → CLI commands: submits commands
README.md - CLI commands → Policy parser: parses policy
src/verified_auth/cli.py - Policy parser → Policy grammar: loads grammar
src/verified_auth/parser.py - Policy parser → Policy AST: builds AST
src/verified_auth/parser.py - CLI commands → Name and type checking: lowers policy
src/verified_auth/cli.py - Name and type checking → Policy AST: reads AST
src/verified_auth/typecheck.py - Name and type checking → Typed policy IR: produces typed IR
src/verified_auth/typecheck.py - CLI commands → Request models: loads request
src/verified_auth/cli.py - CLI commands → Runtime compiler: executes policy
src/verified_auth/cli.py - Runtime compiler → Typed policy IR: compiles IR
src/verified_auth/runtime.py - Runtime compiler → Request models: reads request
src/verified_auth/runtime.py - CLI commands → Rule verifier: selects rule
src/verified_auth/cli.py - Rule verifier → Symbolic compiler: builds solver expression
src/verified_auth/verifier.py - Symbolic compiler → Typed policy IR: translates IR
src/verified_auth/symbolic.py - Symbolic compiler → Request models: uses domain values
src/verified_auth/symbolic.py - Rule verifier → Runtime compiler: replays counterexample
src/verified_auth/verifier.py - Rule verifier → Request models: validates candidate
src/verified_auth/verifier.py - CLI commands → Verification reporting: formats result
src/verified_auth/cli.py - Verification reporting → Rule verifier: confirms result
src/verified_auth/reporting.py - Verification reporting → Request models: serializes request
src/verified_auth/reporting.py - Verification reporting → Counterexample JSON: writes JSON
src/verified_auth/reporting.py - CLI commands → Counterexample JSON: exports confirmed result
src/verified_auth/cli.py