Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Correctly validate 'apps.misp.api.*' config settings #161

Merged
merged 3 commits into from
Aug 24, 2021

Conversation

lava
Copy link
Member

@lava lava commented Aug 23, 2021

📔 Description

The 'apps.misp.api' key is optional, but the code used to assume
that if it is present, then all three of the subkeys 'api.host',
'api.ssl' and 'api.key' are also present.

We now validate that this is indeed the case.

📝 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/threatbus, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

🎯 Review Instructions

Try providing an invalid MISP config and verify that threatbus doesn't start and doesn't crash with an unhandled exception.

Benno Evers added 2 commits August 23, 2021 14:07
The 'apps.misp.api' key is optional, but the code used to assume
that if it is present, then all three of the subkeys 'api.host',
'api.ssl' and 'api.key' are also present.

We now validate that this is indeed the case.
@lava lava force-pushed the story/ch27771/misp-api-config branch from 0c58e1a to 53b7867 Compare August 23, 2021 12:07
@lgtm-com
Copy link

lgtm-com bot commented Aug 23, 2021

This pull request introduces 1 alert when merging 53b7867 into aa34f53 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@lava lava force-pushed the story/ch27771/misp-api-config branch from 490cea2 to 53b7867 Compare August 23, 2021 13:14
Copy link

@rolandpeelen rolandpeelen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran this locally and it looks like this is working as expected. I've left two comments more as questions than anything else.

Screen Shot 2021-08-23 at 3 44 10 PM

plugins/apps/threatbus_misp/threatbus_misp/plugin.py Outdated Show resolved Hide resolved
plugins/apps/threatbus_misp/threatbus_misp/plugin.py Outdated Show resolved Hide resolved
@lava lava merged commit 498a84b into master Aug 24, 2021
@lava lava deleted the story/ch27771/misp-api-config branch August 24, 2021 11:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants