In pytm, threats are automatically identified based on specific conditions met by your model's components (targets, controls, and data). When defining your threat model, you can trigger specific threats from the database by ensuring your Control objects have the appropriate attributes set.
Common attributes used to satisfy threat conditions include:
validatesInput: Boolean indicating if input is validated.sanitizesInput: Boolean indicating if input is sanitized.checksInputBounds: Boolean indicating if input length/bounds are checked.authorizesSource: Boolean indicating if the source of data is authorized.
For example, to avoid a Relative Path Traversal threat, you must ensure that your target's controls have both validatesInput and sanitizesInput set to True.