Skip to content

Commit 11423bf

Browse files
authored
Merge branch 'main' into gh_action
2 parents 52fb7a5 + e9d9f8a commit 11423bf

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

README.rst

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,31 @@ Tests
143143
Data import
144144
-----------
145145

146+
Many data importers use GitHub APIs. For this, first set up value of the ``GH_TOKEN`` environment variable by running :
147+
148+
::
149+
150+
export GH_TOKEN=yourgithubtoken
151+
152+
153+
See `GitHub docs <https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token>`_ for instructions on how to obtain your GitHub token.
154+
155+
156+
To run all data importers use :
146157
::
147158

148159
DJANGO_DEV=1 python manage.py import --all
149160

150-
It is not required to run all the importers . To quickly get started with some data run :
151-
::
161+
To list available importers use :
162+
::
163+
164+
DJANGO_DEV=1 python manage.py import --list
165+
166+
To run specific importers :
167+
::
168+
169+
DJANGO_DEV=1 python manage.py import rust npm
152170

153-
DJANGO_DEV=1 python manage.py import rust ruby
154171

155172
If you want to run the import periodically, you can use a systemd timer:
156173

@@ -210,4 +227,4 @@ For full documentation about API endpoints.
210227
.. |Gitter chat| image:: https://badges.gitter.im/gitterHQ/gitter.png
211228
:target: https://gitter.im/aboutcode-org/vulnerablecode
212229
.. |PRs Welcome| image:: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
213-
:target: http://makeapullrequest.com
230+
:target: http://makeapullrequest.com

docs/how-to-guides/add_new_importer.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@ The Building Blocks A.K.A Prerequisites
3636
summary: str
3737
impacted_package_urls: Iterable[PackageURL]
3838
resolved_package_urls: Iterable[PackageURL] = dataclasses.field(default_factory=list)
39-
reference_urls: Sequence[str] = dataclasses.field(default_factory=list)
40-
reference_ids: Sequence[str] = dataclasses.field(default_factory=list)
39+
vuln_references: List[Reference] = dataclasses.field(default_factory=list)
4140
cve_id: Optional[str] = None
4241
42+
class Reference:
43+
44+
url: str = ''
45+
reference_id: str = ''
4346
4447
Steps to build an Importer
4548
--------------------------

0 commit comments

Comments
 (0)