Skip to content

Instantly share code, notes, and snippets.

@squizzi
Created July 21, 2021 17:31
Show Gist options
  • Save squizzi/59a344501914bd55f3b9056c862de66a to your computer and use it in GitHub Desktop.
Save squizzi/59a344501914bd55f3b9056c862de66a to your computer and use it in GitHub Desktop.
Reset a MSR CVE DB for testing.
docker exec -it -u postgres $(docker ps -aq --filter name=dtr-scanningstore) psql -d fuzzomatic -c "UPDATE public.appcheck_nvdfeed set summary=0 where cve='NOT-ACTUAL-CVE'"
REPLICA_ID=$(docker ps -lf name='^/dtr-rethinkdb-.{12}$' --format '{{.Names}}' | cut -d- -f3)
echo "r.db('dtr2').table('properties').get('scan_info').update({value : '{"scannerFingerprint":{"scannerType":0,"version":["0","0"]},"scannerUpdatedAt":"2021-01-01T01:00:00.000000000Z","lastDBUpdateFailed":false,"lastVulnOverridesDBUpdateFailed":false}'})" | docker run -e DTR_REPLICA_ID=$REPLICA_ID -i --rm --net dtr-ol -v dtr-ca-$REPLICA_ID:/ca dockerhubenterprise/rethinkcli:v2.2.0-ni non-interactive; echo
echo -e "CVE DB reset to version 0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment