owasp-amass/amass · error
invalid 'From' type: %s does not comply with OAM
Error message
invalid 'From' type: %s does not comply with OAM
What it means
This error means a transformation entry in the session config declares a 'From' type that is not a recognized OAM (OpenAPI App Model) type. During Config.Validate, each transformation's From field is checked against the set of valid OAM types; if no match is found, validation fails immediately. It is a static configuration error, not a runtime data error.
Source
Thrown at config/transform.go:148
tfound := false
ffound := false
// Check if "From" and "To" is OAM compliant
for _, a := range oam.AssetList {
a := strings.ToLower(string(a))
if t.From == a {
ffound = true
}
if t.To == a || t.To == "none" || t.To == "all" {
tfound = true
}
// Used to prevent unnecessary iterations
if tfound && ffound {
break
}
}
if !ffound {
return fmt.Errorf("invalid 'From' type: %s does not comply with OAM", t.From)
}
// Check for a 'none' transformation, which indicates that no further processing is required for this 'From' type.
if t.To == "none" {
// Conflict arises if there's already a valid transformation for this 'From'.
if c.fromWithValid[t.From] {
return fmt.Errorf("invalid config: 'none' specified after a valid transformation for 'From' type: %s. 'None' should be the only transformation", t.From)
}
c.fromWithNone[t.From] = true
} else { // For other valid transformations.
// Conflict arises if a 'none' transformation is already registered for this 'From'.
if c.fromWithNone[t.From] {
return fmt.Errorf("invalid config: valid transformation specified after 'none' for 'From' type: %s. 'None' should be the only transformation", t.From)
}
// Mark this 'From' as having a valid transformation.
c.fromWithValid[t.From] = true
}
return nilView on GitHub (pinned to 79299dce87)
Solutions
- Fix the 'From' value in the transformation config to a valid OAM type
- Check the valid type list in config/transform.go and align your config
- Validate the config with a linter/schema before calling Validate
Example fix
// before
transformations:
- from: workloadtyp
to: deployment
// after
transformations:
- from: workloadType
to: deployment Defensive patterns
Strategy: validation
Validate before calling
validFrom := map[string]bool{"workloadType":true,"trait":true,"scope":true}
if !validFrom[t.From] { return fmt.Errorf("unsupported From type %q", t.From) } Try / catch
if err := cfg.Validate(); err != nil {
if strings.HasPrefix(err.Error(), "invalid 'From' type") {
// log offending transformation and skip/fix it
}
return err
} Prevention
- Keep transformation configs aligned with the OAM type list in config/transform.go
- Run Validate early at startup, before any processing
- Schema-validate config files in CI
When it happens
Trigger: Calling Config.Validate when a transformations entry has a From value that is not one of the supported OAM types (e.g. a typo like 'workloadtype' or a custom string).
Common situations: Typos in YAML/JSON workload configs, hand-edited transformation sections, or configs written against an older/newer OAM spec where type names changed.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- brute forcing cannot be performed without DNS resolution
- active enumeration cannot be performed without DNS resolutio
- resolvers section is not a list
- no valid resolvers were found
- alterations wordlist_file item is not a string
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/e01d9d76bc9c375a.
Report an issue: GitHub.