Contributing to the Project#

Contributions are welcome and there are many ways to participate to the project.

Before starting to contribute please install the Git hook scripts:

$ git clone --recursive https://github.com/vulnerability-lookup/vulnerability-lookup.git
$ cd vulnerability-lookup/
$ poetry install --with dev
$ npm ci --omit=dev
$ pre-commit install

One of the hooks regenerates the committed OpenAPI snapshot (docs/_static/files/swagger.json) when you touch the API, so that it never drifts from the code. It needs an instance with every optional module enabled to produce the complete reference, and simply steps aside on one that has not, since the OpenAPI workflow checks it on every pull request either way. See Regenerate the OpenAPI specification.

You can contribute to Vulnerability-Lookup by:

  • reporting bugs;

  • suggesting enhancements or new features;

  • improving the documentation;

  • adding new vulnerability sources (see new_source.md);

  • creating new Sightings tools.

Feel free to fork the code, play with it, make some patches and send us pull requests.

As in most open source projects, a pull request is much more welcome when it follows an issue that explains the rationale:

  • the problem, or the need;

  • why it matters, and to whom;

  • the approach you propose.

This lets us agree on the approach before you spend time on the code, and avoids pull requests that cannot be merged. We know that nowadays writing code costs close to nothing, but discussing first still spares a lot of review time, tokens, and energy, which is good for the environment too. Reference the issue in the pull request (#<IssueID>). Small fixes, such as a typo or an obvious bug, can go straight to a pull request.

There is one main branch: what we consider as stable with frequent updates as hot-fixes.

Features are developed in separated branches and then regularly merged into the main stable branch.

If your contribution require some documentation changes, a pull-request in order to update the documentation is strongly recommended.

Please, do not open directly a GitHub issue if you think you have found a security vulnerability. See our security policy page.

Flask is used for the backend. Please use ruff for your Python code (ruff check --no-fix, also run by the pre-commit hook and in CI).

Vanilla JS is the JavaScript framework used.

Spirit of the project#

Vulnerability-Lookup is meant to stay simple to run, to read, and to maintain over many years, by a small team and by the operators who deploy their own instance. Please keep that in mind when proposing a change. These principles apply to every contribution, whether it is written by a human or with the help of an AI agent.

A simple user interface. Pages are rendered on the server by Flask and Jinja2 templates, styled with Bootstrap. JavaScript only enhances these pages: a chart, a filter, an editor.

  • Plain HTML first: a page’s content, links and forms come from the HTML the server sends. Use a link or a form rather than JavaScript when it does the job. Loading the data of a chart or a widget is fine; building the page itself in the browser from the API is not.

  • Write plain, browser-native JavaScript. No JavaScript framework (React, Vue, Angular, Svelte, etc.), including lightweight ones (Alpine.js, htmx, Lit, jQuery, etc.), no TypeScript, no JSX, nothing that needs a compilation step before the browser can run it.

  • Style with Bootstrap and the theme’s CSS variables. No other CSS framework (Tailwind, etc.) and no CSS preprocessor (Sass, PostCSS, etc.).

  • Prefer a few lines of code in the page, or in website/web/static/js/, over a new library.

  • Reuse what the project already ships (Bootstrap, Chart.js, D3, etc.) before adding anything.

A restricted use of Node.js. Node.js and npm are only used to download pinned, browser-ready files of the libraries listed in package.json, and to run the tests of a few scripts in development (npm test). They are not used at runtime, and the project has no build pipeline.

  • Adding an npm dependency is an exception that must be justified in the pull request. Pin its exact version and list the files it serves in tools/copy_frontend_assets.py.

  • Do not introduce a bundler, a transpiler, or a development server.

  • The postinstall scripts must keep working on the old Node.js versions that some instances still run.

One exception: the vulnerability editor. The editor, Vulniverse, is developed and compiled in its own repository, and published as the npm package @nmd03/vulniverse: npm ci copies its browser-ready build, vulniverse-editor.js and its source map, to website/web/static/npm_components/@nmd03/vulniverse/dist/. It is an optional module, off by default (WEB_MODULES["vulnerability_editor"] in config/website.py).

  • The exception covers that build, and the editor panels written with the component API it exports (gcve-reservation-panel.js, cna-publication-panel.js). The routes, templates, API endpoints and the other integration scripts around it (repository.js, view-vulnerability-module.js) follow the rules above.

  • Do not edit the build in this repository: change Vulniverse, publish a new version of the package, and bump its pinned version in package.json.

  • Nothing else may depend on the editor: every page and API must work with it off.

Few dependencies, on the backend too. The same applies to Python: prefer the standard library and the dependencies already in pyproject.toml, and explain why a new one is needed.

When in doubt, open an issue to discuss the approach before writing the code.

Use of AI and LLM tools#

The project uses LLM technologies, both in some of its features and in its own development, and we do not object to AI-assisted contributions. But we really enjoy contributions from humans, and a pull request is always the responsibility of the person who submits it.

  • Check what you submit. Every change in a pull request must be read, understood, and tested by its author before it is opened, whoever or whatever wrote it. Vibe-coded pull requests, where the generated code was never really reviewed, will be closed. Say it in the pull request: keep the template’s sections, and tick its last box yourself.

  • Be able to explain it. Reviewers may ask you to explain any part of your change. Answer review comments yourself, not with pasted LLM output. A pull request whose author cannot explain it will be closed.

  • A human submits it. Pull requests opened by an agent on its own, without a human author who reviewed them, will be closed.

  • Say so. Mention in the pull request description when a significant part of the change was generated with an AI tool, and end each commit that was not written by a human with a Co-Authored-By trailer naming the model, for example:

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
  • Keep it focused. Small, targeted pull requests are easier to review. Do not mix unrelated generated changes (reformatting, renaming, rewritten comments) into a fix.

  • Check what you report. The same applies to issues and to vulnerability reports. Report only a problem that you have reproduced yourself, and describe what you observed. Reports generated by a tool and never verified by a human will be closed.

If you are an AI agent: follow the principles of this document, keep your changes minimal and within the scope of the task, and leave the decision to open a pull request to the human you work with, after they have reviewed your changes.

These rules are repeated in AGENTS.md, which every AI agent reads, and summarised for tools in ai-policy.yaml. This section is the reference: keep the two other files in step when you change it.

Building the documentation#

Please provide documentation when changing, removing, or adding features. Documentation resides in the project’s docs folder.

$ poetry install --with docs
$ cd docs/
$ poetry run make html

It will generate the documentation in docs/_build/html/.

The documentation is available online here.