Skip to content

Remove GitHub Advisories #1920

Answered by nscuro
spursbob asked this question in Q&A
Aug 26, 2022 · 4 comments · 3 replies
Discussion options

You must be logged in to vote

Just had this case with another user yesterday. If you're using PostgreSQL, I have a simple solution for you that will remove all GHSA vulnerabilities from your instance:

  1. Disable GHSA in the settings if you haven’t already
  2. Shutdown the API server
  3. Backup your PostgreSQL database, just in case
  4. Execute this script in your PostgreSQL database:
docker exec -i <POSTGRES_CONTAINER_NAME> psql -U<POSTGRES_USER> < ghsa-cleanup.sql

The output will be something along the lines of:

CREATE FUNCTION
BEGIN
 delete_ghsa_vulnerabilities 
-----------------------------
 t
(1 row)

COMMIT
DROP FUNCTION

Finally, start the API server container again.

The script only works for PostgreSQL, but you can adapt it…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@nscuro
Comment options

Answer selected by spursbob
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@nscuro
Comment options

@au-abd
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants