Documentation
¶
Overview ¶
Package knowledge provides functions for setting up and updating the knowledge database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Setup ¶
Setup initializes the necessary databases and collections for the knowledge service. It takes a boolean parameter 'confirm' which indicates whether to confirm the creation of databases or not. It returns the initialized Knowledge and Results databases, along with any error that occurred during the setup process.
func SetupForDaemon ¶
SetupForDaemon safely verifies database connections without creating or modifying any databases. This is used when the knowledge service runs as a daemon alongside other services. It assumes all required databases already exist and simply verifies connectivity.
func UpdateWithSetup ¶
func UpdateWithSetup() error
Update updates the knowledge database by performing various operations such as updating licenses, vulnerabilities, and importing packages. It returns an error if any of the operations fail. UpdateWithSetup updates the knowledge database by setting up database connections internally
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
mirrors
|
|
cwe
Package cwe downloads CWEs from MITRE and updates the CWEs in the knowledge database graph.
|
Package cwe downloads CWEs from MITRE and updates the CWEs in the knowledge database graph. |
js
Package js contains the functions to update the JS mirror
|
Package js contains the functions to update the JS mirror |
licenses
Package licenses provides functionality for updating licenses metadata in a graph.
|
Package licenses provides functionality for updating licenses metadata in a graph. |
osv
Package osv provides functionality to update the licenses in the OSV (Open Source Vulnerabilities) database for different ecosystems.
|
Package osv provides functionality to update the licenses in the OSV (Open Source Vulnerabilities) database for different ecosystems. |
php_security
Package php_security provides functionality to update PHP security advisories from FriendsOfPHP Security Advisories Database in the knowledge database.
|
Package php_security provides functionality to update PHP security advisories from FriendsOfPHP Security Advisories Database in the knowledge database. |
utilities
|
|
pgsql
Package psql provides utility functions for working with Postgre in the context of a knowledge database.
|
Package psql provides utility functions for working with Postgre in the context of a knowledge database. |
types
Description: This file contains the NVD struct and all the functions that are used to parse the NVD data
|
Description: This file contains the NVD struct and all the functions that are used to parse the NVD data |