{"record":{"id":"62f81f9ddeb13069","repo":"owasp-amass/amass","slug":"zero-transformation-matches-in-the-session-config","errorCode":null,"errorMessage":"zero transformation matches in the session config","messagePattern":"zero transformation matches in the session config","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/transform.go","lineNumber":232,"sourceCode":"\t\t\t\t\t}\n\n\t\t\t\t\tresults.to[transform.To] = struct {\n\t\t\t\t\t\tttl        int\n\t\t\t\t\t\tconfidence int\n\t\t\t\t\t}{ttl: ttl, confidence: confidence}\n\n\t\t\t\t} else {\n\t\t\t\t\tresults.to[transform.To] = struct {\n\t\t\t\t\t\tttl        int\n\t\t\t\t\t\tconfidence int\n\t\t\t\t\t}{ttl: transform.checkTTL(transform.To, c), confidence: transform.Confidence}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(results.to) == 0 {\n\t\treturn nil, fmt.Errorf(\"zero transformation matches in the session config\")\n\t}\n\treturn results, nil\n}\n\n// checkTTl checks the TTL value for the given 'To' type in the given Config.\n// if the 'To' is a data source, it will return the TTL value from the data source config.\n// otherwise, it will return the default TTL value from the transformation config.\nfunc (t *Transformation) checkTTL(to string, c *Config) int {\n\tif c != nil {\n\t\tif c.DataSrcConfigs != nil {\n\t\t\tds := c.GetDataSourceConfig(to)\n\t\t\tif ds != nil && ds.TTL > 0 {\n\t\t\t\treturn ds.TTL\n\t\t\t}\n\t\t}\n\t}\n\treturn t.TTL\n}","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/config/transform.go#L214-L250","documentation":"CheckTransformations builds a set of results by matching transformations relevant to the current session/state, and this error means the match set came back empty. The config may pass Validate but contain no transformation applicable to the query, so the library cannot proceed and returns this error instead of an empty result.","triggerScenarios":"Calling CheckTransformations (directly or via TTLStartTime) when no transformation entries in the session config match the requested From/To types.","commonSituations":"Querying a config loaded from an unrelated or minimal config file; forgetting to define transformations before running the workflow; filtering by a type that has no rules.","solutions":["Add transformation entries covering the From/To types being queried","Verify the session config was loaded correctly (check the file path and contents)","Check TTLStartTime/CheckTransformations arguments against the types present in the config"],"exampleFix":"// before\n// config has no transformations for the queried type\n// after\ntransformations:\n  - from: workloadType\n    to: deployment","handlingStrategy":"validation","validationCode":"if len(cfg.Transformations) == 0 { return errors.New(\"config has no transformations; nothing will match\") }","typeGuard":null,"tryCatchPattern":"results, err := cfg.CheckTransformations(...)\nif err != nil {\n  if strings.Contains(err.Error(), \"zero transformation matches\") {\n    // fall back to default config or report a clear user-facing message\n  }\n  return err\n}","preventionTips":["Confirm the intended config file is loaded before running workflows","Ensure transformation entries cover all From/To types your workflow queries","Log the loaded config summary (counts per type) at startup"],"tags":["config","transformations","empty-result"],"backgroundTag":"empty-result-set","analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}