Versions in this module Expand all Collapse all v0 v0.2.1 Jun 6, 2026 v0.2.0 Jun 5, 2026 Changes in this version type AnalysisContext + Migrations []generator.MigrationOps + RoleBirths map[string]string + ScopeAllowedMethods map[string]bool + TablesWithVisibility map[string]bool + Views []*schema.View + func Analyze(projectDir string) (*AnalysisContext, error) type AnalyzedRoute + HandlerPackage string v0.1.0 Mar 26, 2026 Changes in this version + func AllRules() map[string]Rule + func FindAuthTaintedVars(body *ast.BlockStmt) map[string]bool + func FindBuiltinCalls(body *ast.BlockStmt, fset *token.FileSet, name string) []int + func FindCallsTo(body *ast.BlockStmt, fset *token.FileSet, pkg, funcName string) []int + func FindModelVars(body *ast.BlockStmt) map[string]bool + func ParseControllers(controllersDir string) (map[string]*ControllerMethod, error) + func PayloadIsModelWithoutPublic(expr ast.Expr, modelVars map[string]bool) bool + func RouteParams(path string) []string + type ActionInfo struct + File string + GateFile string + HasGate bool + Name string + type AnalysisContext struct + Actions []ActionInfo + Config SqueezeConfig + FuncRegistry FuncRegistry + GraphQLExposed map[string]bool + HasGraphQL bool + Methods map[string]*ControllerMethod + ProjectDir string + RBACDefaults []RBACDefault + RBACRoles *RBACRoleSet + Requests []generator.RequestDef + Routes []AnalyzedRoute + Tables []*schema.Table + type AnalyzedRoute struct + ControllerType string + File string + Line int + Method string + MethodName string + Middleware []string + Path string + func ParseRoutes(routesDir string) ([]AnalyzedRoute, error) + func (r AnalyzedRoute) HasAdminMiddleware(mc MiddlewareConfig) bool + func (r AnalyzedRoute) HasAuthMiddleware(mc MiddlewareConfig) bool + func (r AnalyzedRoute) HasCSRFMiddleware(mc MiddlewareConfig) bool + func (r AnalyzedRoute) HasRateLimitMiddleware(mc MiddlewareConfig) bool + type AppConfig struct + Config string + Migrations []string + Path string + type CallChain struct + AuthVars map[string]bool + Line int + Segments []ChainSegment + func ExtractCallChains(body *ast.BlockStmt, fset *token.FileSet) []CallChain + func ExtractCallChainsRecursive(body *ast.BlockStmt, fset *token.FileSet, registry FuncRegistry, ...) []CallChain + func (cc CallChain) HasSegment(name string) bool + func (cc CallChain) HasSegmentWithAuthArg(prefix string) bool + func (cc CallChain) HasSegmentWithAuthArgTainted(prefix string, authVars map[string]bool) bool + func (cc CallChain) Names() []string + type ChainSegment struct + Args []ast.Expr + Name string + type CompositeLitInfo struct + FieldNames []string + Line int + PackageName string + TypeName string + func FindCompositeLiterals(body *ast.BlockStmt, fset *token.FileSet) []CompositeLitInfo + func FindCompositeLiteralsRecursive(body *ast.BlockStmt, fset *token.FileSet, registry FuncRegistry) []CompositeLitInfo + type Config struct + Apps map[string]AppConfig + Services map[string]ServiceConfig + Squeeze SqueezeConfig + func LoadConfig(projectDir string) (*Config, error) + func (c *Config) IsMonorepo() bool + func (c *Config) IsMultiService() bool + type ControllerMethod struct + Body *ast.BlockStmt + ControllerType string + File string + Fset *token.FileSet + Line int + MethodName string + type CtxJSONCall struct + Line int + PayloadExpr ast.Expr + func FindCtxJSONCalls(body *ast.BlockStmt, fset *token.FileSet) []CtxJSONCall + type Finding struct + File string + Line int + Message string + Rule string + Severity Severity + func Run(projectDir string) ([]Finding, error) + func (f Finding) String() string + type FuncRegistry map[string]*ParsedFunc + func ParseProjectFunctions(projectDir string) FuncRegistry + type MiddlewareConfig struct + Admin []string + Auth []string + CSRF []string + RateLimit []string + func (mc MiddlewareConfig) IsAdminMiddleware(name string) bool + func (mc MiddlewareConfig) IsAuthMiddleware(name string) bool + func (mc MiddlewareConfig) IsCSRFMiddleware(name string) bool + func (mc MiddlewareConfig) IsRateLimitMiddleware(name string) bool + type MustParseCall struct + HasCtxAuth bool + HasCtxParam bool + Line int + func FindMustParseCalls(body *ast.BlockStmt, fset *token.FileSet) []MustParseCall + type ParamCall struct + Line int + Name string + func FindParamNames(body *ast.BlockStmt, fset *token.FileSet) []ParamCall + type ParsedFunc struct + Body *ast.BlockStmt + Fset *token.FileSet + Params []*ast.Field + type RBACDefault struct + File string + Line int + Role string + type RBACRoleSet struct + Defined map[string]bool + Removed map[string]bool + type RoleHit struct + Line int + Role string + type Rule func(ctx *AnalysisContext) []Finding + type ServiceConfig struct + Dir string + type Severity int + const SeverityError + const SeverityWarning + func (s Severity) String() string + type SqueezeConfig struct + Middleware MiddlewareConfig + Rules map[string]bool + func (sc SqueezeConfig) RuleEnabled(name string) bool