yeti-platform / yeti

Your Everyday Threat Intelligence
https://yeti-platform.io/
Apache License 2.0
1.73k stars 287 forks source link

Unable to enable the DFIQ feed. #1040

Closed shannaniggans closed 7 months ago

shannaniggans commented 7 months ago

Before opening an issue, please make do a quick search through the current issues.

Description

[Please provide a description of the issue encountered]

Environment

Question Answer
Yeti release dev
Yeti-frontend release dev
OS version Ubuntu 22.04
Browser Chrome 119.0.6045.123

Steps to Reproduce

  1. Running the dev instance (all except redis)
  2. Go to automation > feeds > select DFIQ feed.

Expected behavior

Feed to be enabled

Actual behavior

Feed not enabled. image

yeti-tasks     | [2024-03-17 01:29:12,245: INFO/MainProcess] Task core.taskscheduler.run_task[41fa16f6-39c5-4686-9525-aac396434df9] succeeded in 0.7382644699973753s: None
yeti-api       | INFO:     172.20.0.5:59788 - "POST /api/v2/tasks/search HTTP/1.0" 200 OK
yeti-api       | 2024-03-17 01:29:12,905 - yeti.audit.log - INFO - Authorized request - yeti - /api/v2/tasks/search - POST - b'{"type":"feed","page":0,"count":200}' - 172.20.0.5 - 200
yeti-frontend  | 192.168.50.116 - - [17/Mar/2024:01:29:12 +0000] "POST /api/v2/tasks/search HTTP/1.1" 200 16442 "http://mispbehaving:8081/feeds" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" "-"
yeti-api       | INFO:     172.20.0.5:33170 - "POST /api/v2/tasks/search HTTP/1.0" 200 OK
yeti-api       | 2024-03-17 01:29:17,914 - yeti.audit.log - INFO - Authorized request - yeti - /api/v2/tasks/search - POST - b'{"type":"feed","page":0,"count":200}' - 172.20.0.5 - 200
yeti-frontend  | 192.168.50.116 - - [17/Mar/2024:01:29:17 +0000] "POST /api/v2/tasks/search HTTP/1.1" 200 16442 "http://mispbehaving:8081/feeds" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" "-"
yeti-api       | INFO:     172.20.0.5:33180 - "POST /api/v2/tasks/search HTTP/1.0" 200 OK
yeti-api       | 2024-03-17 01:29:22,913 - yeti.audit.log - INFO - Authorized request - yeti - /api/v2/tasks/search - POST - b'{"type":"feed","page":0,"count":200}' - 172.20.0.5 - 200
yeti-frontend  | 192.168.50.116 - - [17/Mar/2024:01:29:22 +0000] "POST /api/v2/tasks/search HTTP/1.1" 200 16442 "http://mispbehaving:8081/feeds" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" "-"
yeti-api       | INFO:     172.20.0.5:42540 - "POST /api/v2/tasks/search HTTP/1.0" 200 OK
yeti-frontend  | 192.168.50.116 - - [17/Mar/2024:01:29:27 +0000] "POST /api/v2/tasks/search HTTP/1.1" 200 16442 "http://mispbehaving:8081/feeds" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" "-"
yeti-api       | 2024-03-17 01:29:27,908 - yeti.audit.log - INFO - Authorized request - yeti - /api/v2/tasks/search - POST - b'{"type":"feed","page":0,"count":200}' - 172.20.0.5 - 200
yeti-api       | INFO:     172.20.0.5:42546 - "POST /api/v2/tasks/DFIQFeed/run HTTP/1.0" 200 OK
yeti-tasks     | [2024-03-17 01:29:28,505: INFO/MainProcess] Task core.taskscheduler.run_task[fc3231ad-d84c-47e7-aef8-f7adeb7c4adc] received
yeti-api       | 2024-03-17 01:29:28,504 - yeti.audit.log - INFO - Authorized request - yeti - /api/v2/tasks/DFIQFeed/run - POST - b'{"params":{}}' - 172.20.0.5 - 200
yeti-frontend  | 192.168.50.116 - - [17/Mar/2024:01:29:28 +0000] "POST /api/v2/tasks/DFIQFeed/run HTTP/1.1" 200 15 "http://mispbehaving:8081/feeds" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" "-"
yeti-tasks     | [2024-03-17 01:29:28,509: INFO/MainProcess] Running task DFIQFeed (TaskType.feed)
yeti-tasks     | [2024-03-17 01:29:28,983: ERROR/MainProcess] Traceback (most recent call last):
yeti-tasks     |   File "/app/core/taskmanager.py", line 79, in run_task
yeti-tasks     |     task.run()
yeti-tasks     |   File "/app/plugins/feeds/public/dfiq.py", line 88, in run
yeti-tasks     |     self.read_from_data_directory(tempdir.name)
yeti-tasks     |   File "/app/plugins/feeds/public/dfiq.py", line 66, in read_from_data_directory
yeti-tasks     |     dfiq_object = dfiq.DFIQBase.from_yaml(f.read()).save()
yeti-tasks     |   File "/root/.cache/pypoetry/virtualenvs/yeti-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/_internal/_model_construction.py", line 221, in __getattr__
yeti-tasks     |     raise AttributeError(item)
yeti-tasks     | AttributeError: from_yaml
yeti-tasks     |
yeti-tasks     | [2024-03-17 01:29:28,991: INFO/MainProcess] Task core.taskscheduler.run_task[fc3231ad-d84c-47e7-aef8-f7adeb7c4adc] succeeded in 0.48517569699470187s: None
shannaniggans commented 7 months ago

Nevermind, when reverting back to frontend latest this was solved.