mage.api_resources.finding module

class mage.api_resources.finding.Finding

Bases: mage.api_resources.abstract.listable_api_resource.ListableAPIResource, mage.api_resources.abstract.mutable_api_resource.MutableAPIResource

id

Unique finding ID

Type

str

created_at

When the finding was created (e.g., ‘2020-01-02T03:04:56.789Z’)

Type

str

updated_at

When the finding was last updated (e.g., ‘2020-01-02T03:04:56.789Z’)

Type

str

assessment_id

ID of the associated assessment run

Type

str

affected_asset_id

ID of the associated asset

Type

str

severity

How severe the finding is

Type

mage.schema.Severity

title

The title of the finding

Type

str

description

A description of the finding

Type

str

evidence

Evidence supporting the finding

Type

mage.schema.AWSJSON

references

List of references for additional information

Type

list of str

recommendations

List of recommendations

Type

list of str

risk

Risk associated with this finding

Type

float

files
Type

list of mage.schema.S3Object

Type

list of str

property affected_asset

The associated asset.

Returns

Asset

property assessment

Not implemented. Call assessment_run instead.

property assessment_run

Associated assessment run.

Returns

AssessmentRun

classmethod create(severity, title, description, assessment_run_id, asset_id, **kwargs)

Creates a finding for an assessment run.

Parameters
  • severity (mage.schema.Severity) –

  • title (str) –

  • description (str) –

  • assessment_run_id (str) –

  • asset_id (str) –

  • **kwargs – Additional arguments to initialize the finding with

Returns

Finding

Example

>>> import mage
>>> mage.connect()
>>> mage.Finding.create('HIGH', 'Default Password', 'Password has not been changed yet.', '11111111-1111-1111-1111-111111111111', '22222222-2222-2222-2222-222222222222')