-
Notifications
You must be signed in to change notification settings - Fork 21
2.1 Getting started using python wrapper
Before using the vFeed Pro & Enterprise services, you have to set up the API environment. It is a very easy process explained below. The process is divided into 3 steps:
- Downloading and installing the API and its requirements
- Subscribing and deploying the database package
- Setting up the database and export repositories
- Python 3.x
- PyYAML (>4.2)
- Boto3 (1.7.0)
The newest API package is fully developed into Python 3.x as 2.7 EOL date is approaching 1 January 2020. The API can export vulnerability outputs into different formats such as JSON or YAML. Hence, PyYAML package is required
The database is as well deployed according to different licensed plans (Pro or Enterprise) in the Amazon S3. In order to automatically download the updates, the Amazon Boto3 is required.
You can install the requirements one by one or use the requirements.txt
file.
sudo python3 -m pip install pyyaml
sudo python3 -m pip install boto3
sudo python3 -m pip install -r requirements.txt
git clone https://github.com/vfeedio/pyvfeed.git
The vFeed database is a SQLite database that stores the whole mapping metadata. The database is a mandatory masterpiece of the vFeed Pro and Enterprise.
You have to subscribe to the license plan that suits you and receive your keys.
Once you have received the subscription email with the following license information:
- Access key
- Secret key
- Subscription plan
You will need to edit the configuration file common/config.py
and locate subscription
tag to report your information as follow:
subscription = {"access_key": 'YOUR_ACCESS_KEY',
"secret_key": 'YOUR_SECRET_KEY',
"plan": 'YOUR_PLAN'}
Before initiating the database update, you need to set up the location.
You will have the choice to deploy your database package (literally the sqlite vfeed.db) in any repository. The same rule applies regarding the export
directory where the API stores JSON / YAML exported vulnerability metadata.
To proceed, you will need to edit the configuration file common/config.py
and locate database
tag
database = {"file": 'vfeed.db',
"path": 'YOUR_DB_PATH',
}
Modify YOUR_DB_PATH to whatever suits you (example: /home/subscriptions/db/)
As a result, the directory /home/subscriptions/db/
will be then used to store the vfeed.db
.
To proceed, you will need to edit the configuration file common/config.py
and locate export
tag
export = {"path": 'YOUR_EXPORT_PATH'}
Modify YOUR_EXPORT_PATH to whatever suits you (example: /home/subscriptions/db/export/)
As a result, all exported vulnerability JSON or YAML files will be stored into /home/subscriptions/db/export/
.