OpenCSPM / opencspm

Open Cloud Security Posture Management Engine
MIT License
331 stars 69 forks source link

OpenCSPM UI Not Reflecting Config.yaml Changes Without Restarting #16

Closed christophetd closed 3 years ago

christophetd commented 3 years ago

Describe the bug

Having followed instructions at https://github.com/OpenCSPM/opencspm/blob/main/site/data_collection.md#aws-cloud-resources, OpenCSPM does not pick up my custom data.

# ls -l assets/custom
total 316
-rw-r--r-- 1 christophetd christophetd     12 nov.  16 12:35 manifest.txt
-rwxr-xr-x 1 christophetd christophetd 316195 nov.  16 12:35 output.json

$ cat assets/custom/manifest.txt
output.json

$ cat config/config.yaml
---
db:
  host: redis
  port: 6379
buckets:
  # - gs://darkbit-collection-us-cspm
  # - s3://my-other-bucket-here
local_dirs:
  - /app/data/custom
  # - /app/data/test

I did run docker-compose down && docker-compose up after making these modifications.

No visible error in logs

Expected behavior

OpenCSPM should pick up the new resources file

Screenshots

UI:

image

Docker information (please complete the following information):

$ docker --version
Docker version 19.03.13, build 4484c46d9d

$ docker-compose --version
docker-compose version 1.27.4, build 40524192

Cloud provider (if applicable):

AWS

christophetd commented 3 years ago

Solved: I had to manually delete Docker volumes (docker volume rm opencspm_core opencspm_postgres opencspm_redis) and restart OpenCSPM. Might be worth mentioning in the docs

joshlarsen commented 3 years ago

This is a UI bug. The new files will be loaded since the config.yaml is re-read every time the background job runs, but it is not reflected correctly in the UI.