Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to upload database management? #2385

Open
1 of 6 tasks
taejun-prestolabs opened this issue Dec 5, 2024 · 10 comments
Open
1 of 6 tasks

How to upload database management? #2385

taejun-prestolabs opened this issue Dec 5, 2024 · 10 comments
Assignees
Labels
enhancement New feature or request needs-triage Indicates that issue is not yet triaged and assigned

Comments

@taejun-prestolabs
Copy link

Hello Team!
It seems I accidentally deleted all the rules.

It looks like I can upload rules in Seggins -> Scan history & database management, but where can I download the rules?

image
image

  • UI/Frontend
  • API/Backend
  • Agent
  • Deployment/YAMLs
  • CI/CD Integration
  • Other (specify)

Additional context
Add any other context or screenshots about the feature request here.

@taejun-prestolabs taejun-prestolabs added enhancement New feature or request needs-triage Indicates that issue is not yet triaged and assigned labels Dec 5, 2024
@ramanan-ravi
Copy link
Collaborator

ramanan-ravi commented Dec 5, 2024

Hello @taejun-prestolabs,

Please restart the console containers / pods.
It will download the rules.

@taejun-prestolabs
Copy link
Author

Hello @ramanan-ravi
Thank you for your quick reply!

Which pods should I restart?

image

@taejun-prestolabs
Copy link
Author

Sadly, Although I just restarted all pod(i deployed postgresql, neo4j to onprem), I can't view compliance

image

image

@taejun-prestolabs
Copy link
Author

@ramanan-ravi

I have completely removed PostgreSQL and Neo4j, reinstalled them, and redeployed the Helm chart.
However, I still cannot see any compliance-related items.

Where is this rule triggered from, and how is it downloaded?

@gnmahanth
Copy link
Contributor

gnmahanth commented Dec 5, 2024

@taejun-prestolabs

please check deepfence-console-scheduler and deepfence-console-worker logs for any errors related to database download ?

what version of ThreatMapper are you runing?

can you check if you have registered and have licence in settings section ? licence is required to download the databases
image

@taejun-prestolabs
Copy link
Author

oh... sorry, �I didn't know i had to register the license.
thanks for you help..!

@taejun-prestolabs
Copy link
Author

@gnmahanth

vulnerability db is not actually reflected even though it has been uploaded
threat mapper version is 2.5.1

I also confirmed that the vulnerability table is empty in neo4j db

Screenshot 2024-12-06 at 10 30 12 AM

Screenshot 2024-12-06 at 10 37 49 AM

image

@ramanan-ravi
Copy link
Collaborator

Hello @taejun-prestolabs Vulnerability nodes will be created as and when scans are done.
The vulnerability db is not ingested in neo4j right away. It is kept as sqlite locally.

@taejun-prestolabs
Copy link
Author

Hi @ramanan-ravi

Although I can view vulnerability scan file in s3, I can't start vulnerability scan.
The error occurred even after restarting the scheduler, worker pods.

image

image

@taejun-prestolabs
Copy link
Author

taejun-prestolabs commented Dec 6, 2024

Hello, @ramanan-ravi @gnmahanth

Why doesn't grype db update run immediately when the worker pod runs?
Please let me know if there are any settings that are not needed.

worker pod entrypoint.sh code

#update vulnerability databae
if [ "$DEEPFENCE_MODE" == "worker" ]; then
echo "add cron job to update vulnerability database"
echo "vulnerability database update url $GRYPE_DB_UPDATE_URL"
# /usr/local/bin/grype db update
echo "0 */2 * * * export GRYPE_DB_UPDATE_URL=${GRYPE_DB_UPDATE_URL} && /usr/local/bin/grype db update" >> /etc/cron.d/crontab && chmod 0644 /etc/cron.d/crontab
/usr/sbin/cron
fi

Moreover, my pod dosen't have $XDG_CACHE_HOME env

image

It may be inconvenient, but please check...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-triage Indicates that issue is not yet triaged and assigned
Projects
None yet
Development

No branches or pull requests

3 participants