-
Create a new feeder in
vulnerabilitylookup/feeders/
. A generic feeder needs to inherit fromAbstractFeeder
, but if it is a CSAF provider, useCSAFGeneric
instead.Example:
vulnerabilitylookup/feeders/my_feeder.py
-
Create a config file for the logger in
vulnerabilitylookup/config/
with the name<feedname>_logging.json
Example:
vulnerabilitylookup/config/my_feeder_logging.json
-
Create the script that will run regularly to fetch the data in
bin/
.Example:
bin/my_feeder.py
-
Add a reference to that file in
pyproject.toml
under thetool.poetry.scripts
section.Example:
my_feeder = "bin.my_feeder:main"
-
Add a call in the list of importers of the start script in
bin/start.py
.Example:
my_feeder
-
Run
poetry install
to add the new script, and the commandmy_feeder
is available. You can run it manually for testing, and it will be automatically started next time you restart the application.
-
Add
my_feeder
to the list of sources inconfig/website.py.sample
(and updateconfig/website.py
). -
Update
website/web/templates/about.html
with the new source.
<li class="list-group-item d-flex justify-content-between align-items-center"><a href="<URL>" rel="noreferrer" target="_blank">My Feed</a>
<span class="badge bg-primary rounded-pill">{{ storage_info["db_sizes"]["myfeeder"] }} vulnerabilities</span>
</li>
- Update
website/web/templates/main.html
with the new source.
<link href="{{ url_for('home_bp.feed_recent', format='atom', source='myfeeder') }}" rel="alternate" title="Recent vulnerabilities from myfeeder." type="application/atom+xml">
-
If the source is not a CSAF provider, update
website/web/templates/recent.html
with the new source (see in the file for what is needed). -
Update ``website/web/templates/search.html with the new source (see in the file for what is needed).
-
Update
website/web/templates/vuln.html
with the new source (see in the file for what is needed). -
Update
website/web/templates/vulnerability_templates.html
with the new source. This one is the macro to render the vulnerability on the website. Look at the file for details.