Closed basdejong95 closed 1 year ago
JSON of working application:
{
"InfrastructureInfo": {
"ActivationCode": "xxx",
"LastAnalyzedOn": "2023-11-01T11:47:20Z"
},
"Applications": [
{
"GUID": "c8df437c-ab8b-4d24-8214-17567cb2c957",
"Name": "xxx",
"LevelGUID": "dc01c0b8-ae5b-49b3-91f9-793fc04c5215",
"Findings": [
{
"CategoryGUID": "57e63fe8-a299-4f32-b7b6-e8c5f863da06",
"PatternGUID": "5bf0ba1b-4543-4790-87d3-a8e5386371ba",
"Count": 1
}
],
"Modules": [
{
"GUID": "d16f2054-2e9b-4d53-bf11-d36f3524434f",
"Name": "xxx",
"LevelGUID": "dc01c0b8-ae5b-49b3-91f9-793fc04c5215",
"Findings": [
{
"CategoryGUID": "57e63fe8-a299-4f32-b7b6-e8c5f863da06",
"PatternGUID": "5bf0ba1b-4543-4790-87d3-a8e5386371ba",
"Count": 10
},
{
"CategoryGUID": "57e63fe8-a299-4f32-b7b6-e8c5f863da06",
"PatternGUID": "c8e11573-0579-4b00-8c4b-d92ed74cca01",
"Count": 1
},
{
"CategoryGUID": "6c87e98f-2ece-4df2-b791-d0c7eae15914",
"PatternGUID": "062205e2-983c-4717-b8a1-43d9c3f54834",
"Count": 1
},
{
"CategoryGUID": "f7fdbb75-f2f3-4199-9761-ae0fd08f0998",
"PatternGUID": "b2660dcc-8d22-4d5c-a6e5-1942519df07a"
}
]
}
]
}
],
"Page": {
"Limit": 20,
"TotalResults": 1,
"TotalPages": 1
}
}
JSON of application where it crashes:
{
"InfrastructureInfo": {
"ActivationCode": "xxx",
"LastAnalyzedOn": "2023-11-01T11:47:20Z"
},
"Applications": [
{
"GUID": "81064293-f866-4e36-beab-2462348e3588",
"Name": "xxx",
"LevelGUID": "dc01c0b8-ae5b-49b3-91f9-793fc04c5215",
"Findings": [
{}
],
"Modules": [
{
"GUID": "388dbde6-54bb-4dba-80ca-dd922d450f6b",
"Name": "xxx",
"LevelGUID": "dc01c0b8-ae5b-49b3-91f9-793fc04c5215",
"Findings": [
{}
]
}
]
}
],
"Page": {
"Limit": 20,
"TotalResults": 1,
"TotalPages": 1
}
}
facing the same issue. Any updated?
Hi @basdejong95 and @giulianoragusa
The script has been updated, and it no longer fails when the application has no tech debt findings. The updated script can be found here.
Cheers, Duarte Castaño
Thanks for the quick turnover @duarte-castano . It does seem like a different bug is still present:
Hey @giulianoragusa,
I am not able to reproduce the error, can you provide the JSON file so I can troubleshoot? Which python version are you using?
A possible solution might be updating line 72 with finding.get("Count", 0)
instead of finding["Count"]
to fall back to 0 if it doesn't find the "Count" entry. Can you try it?
That did the trick! Muito obrigado!
When doing the tech debt analysis on an application that has no findings, the script crashed:
When doing this on an application that has 1 or more security findings it runs just fine