Skip to content

Commit 1ec49b3

Browse files
sacca97copernico
authored andcommitted
fixed typos, removed old js code, and updated README files for ProjectKB and Prospector
1 parent 7e75310 commit 1ec49b3

File tree

5 files changed

+44
-84
lines changed

5 files changed

+44
-84
lines changed

NOTICE.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.md

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# project "KB"
1+
# Project KB
22

33
[![Go Report Card](https://goreportcard.com/badge/github.com/sap/project-kb)](https://goreportcard.com/report/github.com/sap/project-kb)
44
[![Go](https://github.com/sap/project-kb/workflows/Go/badge.svg)](https://github.com/SAP/project-kb/actions?query=workflow%3AGo)
@@ -9,16 +9,17 @@
99
[![REUSE status](https://api.reuse.software/badge/github.com/sap/project-kb)](https://api.reuse.software/info/github.com/sap/project-kb)
1010
[![Pytest](https://github.com/SAP/project-kb/actions/workflows/python.yml/badge.svg)](https://github.com/SAP/project-kb/actions/workflows/python.yml)
1111

12-
12+
## Description
13+
***
1314
The goal of `Project KB` is to enable the creation, management and aggregation of a
14-
distributed, collaborative knowledge base of vulnerabilities that affect
15+
distributed, collaborative knowledge base of vulnerabilities affecting
1516
open-source software.
1617

1718
`Project KB` consists of vulnerability data [vulnerability knowledge-base](vulnerability-data)
1819
as well as set of tools to support the mining, curation and management of such data.
1920

2021

21-
## Why this project
22+
### Why this project?
2223

2324
In order to feed [Eclipse Steady](https://github.com/eclipse/steady/) with fresh
2425
data, we have spent a considerable amount of time, in the past few years, mining
@@ -47,32 +48,29 @@ collaborative, comprehensive knowledge base where each party remains in control
4748
of the data they produce and of how they aggregate and consume data from the
4849
other sources.
4950

50-
## Project KB in a nutshell
51-
52-
### Vulnerability data
53-
54-
The vulnerability data of Project KB are stored in textual form as a set of YAML files, in branch `vulnerability-data`.
55-
56-
### Tools
57-
58-
#### Vulnerability Data Management: `kaybee`
5951

60-
With `kaybee` it is possible to fetch the vulnerability statements from this
52+
## Kaybee
53+
***
54+
Kaybee is a vulnerability data management tool, it makes possible to fetch the vulnerability statements from this
6155
repository (or from any other repository) and export them to a number of
6256
formats, including a script to import them to a [Steady
6357
backend](https://github.com/eclipse/steady).
6458

65-
See https://github.com/SAP/project-kb/tree/main/kaybee for details.
59+
For details and usage instructions check out the [kaybee README](https://github.com/SAP/project-kb/tree/main/kaybee).
6660

67-
#### Vulnerability Data Mining Tool: `prospector`
68-
69-
Prospector is a tool to reduce the effort needed to find security fixes for known vulnerabilities in open source software repositories.
61+
## Prospector
62+
***
63+
Prospector is a vulnerability data mining tool that aims at reducing the effort needed to find security fixes for known vulnerabilities in open source software repositories.
7064
The tool takes a vulnerability description (in natural language) as input and produces a ranked list of commits, in decreasing order of relevance.
7165

72-
See https://github.com/SAP/project-kb/tree/main/prospector for details.
66+
For details and usage instructions check out the [prospector README](https://github.com/SAP/project-kb/tree/main/prospector).
7367

74-
## Publications
68+
## Vulnerability data
69+
***
70+
The vulnerability data of Project KB are stored in textual form as a set of YAML files, in the [vulnerability-data branch](https://github.com/SAP/project-kb/tree/vulnerability-data).
7571

72+
## Publications
73+
***
7674
In early 2019, a snapshot of the knowlege base from project "KB" was described in:
7775

7876
- Serena E. Ponta, Henrik Plate, Antonino Sabetta, Michele Bezzi, Cédric
@@ -98,25 +96,20 @@ scripts described in that paper](MSR2019)
9896
> If you wrote a paper that uses the data or the tools from this repository, please let us know (through an issue) and we'll add it to this list.
9997
10098
## Credits
99+
***
101100

102101
### EU-funded research projects
103102

104-
The development of Project KB is partly supported by the following EU-funded projects:
103+
The development of Project KB is partially supported by the following projects:
105104

106105
* [AssureMOSS](https://assuremoss.eu) (Grant No.952647).
107106
* [Sparta](https://www.sparta.eu/) (Grant No.830892).
108107

109108

110-
### 3rd party vulnerability data sources
111-
112-
3rd party information from NVD and MITRE might have been used as input
113-
for compiling parts of this knowledge base. See MITRE's [Terms of
114-
Use](http://cve.mitre.org/about/termsofuse.html) for more information.
115-
See also [this notice](NOTICE.txt).
116-
117-
## Requirements
109+
### Vulnerability data sources
118110

119-
See the README files for `kaybee` and `prospector`.
111+
Vulnerability information from NVD and MITRE might have been used as input
112+
for building parts of this knowledge base. See MITRE's [CVE Usage license](http://cve.mitre.org/about/termsofuse.html) for more information.
120113

121114
## Limitations and Known Issues
122115

prospector/README.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
11
# Prospector
22

3-
## What is it
3+
:warning: **WARNING** Prospector is a research prototype,
4+
currently under development: the instructions below are intended for development, testing and demonstration purposes only!
5+
6+
## Description
7+
***
48
Prospector is a tool to reduce the effort needed to find security fixes for
5-
*known* vulnerabilities in open source software repositories.
9+
*known* vulnerabilities in open source software repositories
610

711
It takes a vulnerability description (in natural language) in input and
812
produces in output a ranked list of commits, in decreasing order of relevance.
913

10-
**WARNING** Please keep in mind that Prospector is a research prototype,
11-
currently under development: feel free to try it out, but do expect some rough
12-
edges.
13-
1414
If you find a bug, please open an issue. If you can also fix the bug, please
1515
create a pull request (make sure it includes a test case that passes with your correction
1616
but fails without it)
1717

1818

19-
## Setup (for development, testing, and demonstration purposes only!)
19+
## Setup
20+
***
21+
22+
:exclamation: Please note that **Windows is not supported** while WSL and WSL2 are fine.
2023

2124
Prerequisites:
2225

2326
* Python 3.8
24-
* pipenv
2527
* postgresql
28+
* gcc g++ libffi-dev python3-dev libpq-dev (to build python dependencies)
2629

27-
The easiest way to set up Prospector is to clone this repository and then run
28-
the following commands:
30+
The easiest way to set up Prospector is to clone the project KB repository and then navigate to the prospector folder:
2931

3032
```
31-
git clone -b prospector-assuremoss https://github.com/sap/project-kb
33+
git clone https://github.com/sap/project-kb
3234
cd project-kb/prospector
3335
cp .env-sample .env
3436
```
@@ -40,11 +42,6 @@ set -a; source .env; set +a
4042
mkdir -p $GIT_CACHE
4143
```
4244

43-
Before proceding, in order to build the python requirements it is necessary to have the following installed:
44-
```
45-
gcc g++ libffi-dev python3-dev libpq-dev
46-
```
47-
4845
Now you can install the dependencies by running:
4946
```
5047
make setup
@@ -63,9 +60,8 @@ If you have issues with these steps, please open a Github issue and
6360
explain in detail what you did and what unexpected behaviour you observed
6461
(also indicate your operating system and Python version).
6562

66-
*Please note that Windows is not supported*, WSL and WSL2 are fine though.
6763

68-
**IMPORTANT**: this project adopts `black` for code formatting. You may want to configure
64+
:exclamation: **IMPORTANT**: this project adopts `black` for code formatting. You may want to configure
6965
your editor so that autoformatting is enforced "on save". The pre-commit hook ensures that
7066
black is run prior to committing anyway, but the auto-formatting might save you some time
7167
and avoid frustration.
@@ -125,11 +121,11 @@ In the example above, the tag interval has been chosen by considering the text o
125121

126122
## Testing
127123

128-
To run the tests, run:
124+
Prospector makes use of `pytest`.
129125

130-
`pytest`
126+
:exclamation: **NOTE:** before using it please make sure to have running instances of the backend and the database.
131127

132-
Note, that `pytest` requires running instances of the backend and database either in containers or by previous commands.
128+
## Extra
133129

134130
The approach implemented in patch-finder is described in detail in this
135131
document: https://arxiv.org/pdf/2103.13375.pdf

prospector/client/cli/templates/filtering_scripts.html

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,6 @@
77
} else {
88
selector.classList.replace("btn-outline-primary", "btn-primary");
99
}
10-
11-
// let commit_cards = document.getElementsByClassName('commit');
12-
// for (let card of commit_cards) {
13-
// card.classList.remove('d-none');
14-
// }
15-
// let selectors = document.getElementsByClassName("selector");
16-
// for (const selector of selectors) {
17-
// if (selector.classList.contains('btn-primary') && !selector.id == "relevancefilter") {
18-
// for (let card of commit_cards) {
19-
// let annotations = JSON.parse(card.dataset.annotations);
20-
// let relevant = annotations.hasOwnProperty(selector.dataset.annotation);
21-
// if (relevant) {
22-
// card.classList.replace('d-none', 'd-flex')
23-
// }
24-
// }
25-
// }
26-
// if (selector.id == "relevancefilter") {
27-
// for (let card of commit_cards) {
28-
// let relevance = JSON.parse(card.dataset.relevance);
29-
// if (relevance > 10) {
30-
// card.classList.add('d-flex')
31-
// } else {
32-
// card.classList.add('d-none')
33-
// }
34-
// }
35-
// }
36-
// }
37-
// console.log("toggle: " + selector.dataset.annotation)
3810
}
3911

4012
function showFromRelevance(relevance) {

prospector/client/cli/templates/report_header.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<h2>Filters</h2>
6262
<p class="text-justify">
6363
By default, only the candidates with relevance score of at least
64-
10 are shown displayed (you can the buttons below to show more
64+
10 are displayed (you can use the buttons below to show more
6565
candidates).
6666
</p>
6767
<div class="row">
@@ -100,7 +100,8 @@ <h2>Results based on this Advisory Record</h2>
100100
</p>
101101
</div>
102102

103-
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample" aria-controls="offcanvasExample">
103+
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample"
104+
aria-controls="offcanvasExample">
104105
Show exec. stats
105106
</button>
106107

@@ -114,4 +115,4 @@ <h5 class="offcanvas-title" id="offcanvasExampleLabel">Execution Statistics</h5>
114115
</div>
115116
</div>
116117

117-
</div>
118+
</div>

0 commit comments

Comments
 (0)