Skip to content

Finding Data Classes

reptor.models.Finding.FindingRaw

Attributes:

  • id (str) –

    Finding ID (uuid).

  • created (datetime) –

    Finding creation time.

  • updated (datetime) –

    Finding last update time.

  • project (str) –

    Project ID (uuid).

  • project_type (str) –

    Project design ID.

  • language (str) –

    Language code (e.g., "en-US").

  • template (str) –

    Finding template ID (if any).

  • assignee (str) –

    User ID of the assignee.

  • status (str) –

    Status of the finding (e.g., "in-progress", etc.).

  • order (int) –

    Order of the finding in the project (if finding order is overridden).

  • data (FindingDataRaw) –

    Finding field data.

Methods:

  • to_dict

    Convert to a dictionary representation.

reptor.models.Finding.FindingDataRaw dataclass

This data class holds the finding field raw values (usually, strings or lists).
The objects of this class may hold other attributes, depending on your SysReptor project design and custom finding fields.

Attributes:

  • title (str) –

    Finding title.

  • cvss (str) –

    CVSS score.

  • summary (str) –

    Finding summary.

  • description (str) –

    Detailed description of the finding.

  • precondition (str) –

    Finding precondition.

  • impact (str) –

    Finding impact.

  • recommendation (str) –

    Finding recommendation.

  • short_recommendation (str) –

    Finding short recommendation.

  • references (List[str]) –

    List of references (e.g., external URLs) related to the finding.

  • affected_components (List[str]) –

    List of affected components.

  • owasp_top10_2021 (str) –

    OWASP Top 10 2021 category (e.g., A01_2021, A02_2021, etc.).

  • wstg_category (str) –

    WSTG category (e.g., INFO, CONF, IDNT, ATHN, etc.).

  • retest_notes (str) –

    Retest notes.

  • retest_status (str) –

    Retest status (one of open, resolved, partial, changed, accepted).

  • severity (str) –

    Finding severity (one of info, low, medium, high, critical).

Methods:

  • to_dict

    Convert to a dictionary representation.

reptor.models.Finding.Finding

Finding has the same attributes as FindingRaw, but the data attribute is an instance of FindingData class, which performs type checks and holds allowed values and other field metadata.

Attributes:

  • data (FindingData) –

    Finding field data with type checks and metadata.

Methods:

  • to_dict

    Convert to a dictionary representation.

reptor.models.Finding.FindingData

Finding data holds finding field values and field metadata.

Attributes:

Methods:

  • to_dict

    Convert to a dictionary representation.

reptor.models.Finding.FindingDataField dataclass

FindingDataField holds the finding field definition, metadata and its value.

Attributes:

  • id (str) –

    Finding field ID (e.g., summary).

  • type (ProjectFieldTypes) –

    Finding field type (e.g., cvss, string, markdown, etc.).

  • label (str) –

    Human-readable label of the field (displayed in SysReptor UI).

  • origin (str) –

    Field origin (one of core, predefined, custom)

  • default (str) –

    Default value of the field (if any).

  • required (bool) –

    Whether the field is required.

  • spellcheck (bool) –

    Whether the field value should be spellchecked.

  • properties (List[ProjectDesignField]) –

    Nested fields. Used for object fields.

  • choices (List[dict]) –

    List of choices for enum fields.

  • items (dict) –

    Items for list fields.

  • suggestions (List[str]) –

    Suggestions for combobox fields.

  • value (str | List | bool | float | FindingDataField]) –

    The value of the field. Type depends on the field type:

    • str: For cvss, string, markdown, enum, user, combobox, date fields
    • List: For list fields
    • bool: For boolean fields
    • float: For number fields
    • FindingDataField: For object fields (holds nested FindingDataField)

Methods:

  • to_dict

    Convert to a dictionary representation.

reptor.models.Base.ProjectFieldTypes

Enum for project field types.

Source code in reptor/models/Base.py
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
class ProjectFieldTypes(enum.Enum):
    """
    Enum for project field types.
    """
    cvss = "cvss"
    string = "string"
    markdown = "markdown"
    list = "list"
    object = "object"
    enum = "enum"
    user = "user"
    combobox = "combobox"
    date = "date"
    number = "number"
    boolean = "boolean"