Skip to content

create_finding error : found_by field is required #60

@vishnupriyaavp8

Description

@vishnupriyaavp8

Bug Description

create_finding() method gives error "found_by field is required"

Steps to reproduce

Code :

from defectdojo_api.defectdojo_api import defectdojo_apiv2

host = 'http://localhost:8080/'
api_key = 'xxxx..xxxx'
user = 'User1'

dd = defectdojo_apiv2.DefectDojoAPIv2(host, api_key, user, debug=False)

res = dd.create_finding(title = 'Test8', description = 'Test', severity = 'Critical', cwe = 3, date = '2021-11-09',
                  product_id = 12, engagement_id = 25, test_id = 47, user_id = 8, impact = 'Test',
                  active = True, verified = False, mitigation = 'Test', numerical_severity='S0')
print(res.__dict__)

Output :

{'message': 'Error occured in API.',
 'data': '{"found_by":["This field is required."],"message":"{\'found_by\': [ErrorDetail(string=\'This field is required.\', code=\'required\')]}"}',
 'success': False,
 'response_code': 400,
 'logger': <Logger defectdojo_api (WARNING)>}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions