-
Create a new feeder in
vulnerabilitylookup/feeders/. A generic feeder needs to inherit fromAbstractFeeder, but if it is a CSAF provider, useCSAFGenericinstead.Example:
vulnerabilitylookup/feeders/my_feeder.py -
Create a config file for the logger in
vulnerabilitylookup/config/with the name<feedname>_logging.jsonExample:
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.tomlunder thetool.poetry.scriptssection.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 installto add the new script, and the commandmy_feederis available. You can run it manually for testing, and it will be automatically started next time you restart the application.
-
Add
my_feederto the list of sources inconfig/website.py.sample(and updateconfig/website.py). -
Update
website/web/templates/main.htmlwith 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.htmlwith the new source (see in the file for what is needed). -
Update
website/web/templates/search.htmlwith the new source (see in the file for what is needed). -
Update
website/web/templates/vuln.htmlwith the new source (see in the file for what is needed). -
Update
website/web/templates/vulnerability_templates.htmlwith the new source. This one is the macro to render the vulnerability on the website. Look at the file for details.