Copyright (c) 2020 to date, Binare Oy () All rights reserved.
FastCVE - fast, rich and API-based search for CVE and more (CPE, CWE, CAPEC)
==================
fastcve is a command-line tool that allows you to search for in the Common and Exposures (C. The tool provides an easy way to search for and retrie information about them, including their descriptions, C, and references to related security ad.
fastcve is designed to be fast, lightweight, and easy to use. It provides a simple interface for querying the C, allowing you to search for based on , products, and other criteria. The tool can be used by security professionals, system administrators, and de to stay informed about known security and to assess the risk of their systems and applications.
O, fastcve is a useful tool for anyone who is interested in keeping up-to-date with the latest information about security and how they can be addressed.
Technical details
-----------------
Some key technical characteristics of fastcve:
1. Docker containerization: Runs as a Docker Compose stack with two services: fastcve (API + CLI) and fastcve-db (PostgreSQL).
2. Automatically creates the DB on first start: PostgreSQL creates the initial database (POSTGRES_DB) when the DB is empty.
3. Automatically creates and upgrades the DB schema if needed: The schema is created/updated automatically on app start and before CLI commands run.
4. Capability to populate the DB using external sources: The load command can populate the DB from NVD (CVE/CPE via NVD 2.0 APIs) and additional sources (MITRE CWE/CAPEC, EPSS, CISA KEV).
5. Incremental updates: Re-running load fetches only changes since the last successful update (N are limited to fetch.max.days.period, default 120 days).
The tool is a comprehensi for managing a local database and querying it via CLI and HTTP API.
It is optimized to handle many queries efficiently, and to keep data up to date updates.
Build
----------
To build the application image:
This builds ${FASTC}:${FASTC} (application / API / CLI). The default are in .env.
The DB container uses an upstream PostgreSQL image (defaults to postgres:16-alpine3.19, configurable via FASTC) and is not built from this repo.
If you need a custom tag, set FASTC=<your_tag> to generate ${FASTC}:<your_tag>.
Migration (single-container -> split DB/app)
--------------------------------------------
Previous (-> v1.2.3) ran the PostgreSQL DB and the FastCVE API/CLI in the same fastcve container. The current docker-compose.yml splits this into two services: fastcve-db (PostgreSQL) and fastcve (API/CLI).
To migrate an existing deployment:
1. Stop the old container/stack without deleting the DB :
2. Update your en / .env for the new compose file:
- Keep FCDB_USER and FCDB_PASS the same as before (so the existing DB user credentials still match).
- FCDB_USER/FCDB_PASS are used for both:
- the app connection (postgresql://${FCDB_USER}:${FCDB_PASS}@...), and
- PostgreSQL initialization (POSTGRES_USER/POSTGRES_PASSWORD) when the DB is empty.
- For Docker Compose deployments, set INP_EN=dev (the default). (setenv_dev.ini points to the in-stack DB hostname fastcve-db.)
- (Optional) Set FASTC if you need a different PostgreSQL image/tag.
3. If you pre bind-mounted /fastc/setenv from the host, ensure the *mounted* seten}.ini matches the new split:
- FCDB_HOST=fastcve-db
- FCDB_PORT=5432
4. Start the new split stack:
Notes:
. Do not use docker compose down -v unless you intentionally want to wipe the DB. was created by an older PostgreSQL *major* , you must do a pg_dump/restore (PostgreSQL data directories are not forward-compatible across major ).fastcve now run in fastcve-db (example: docker compose exec fastcve-db psql -U "$POSTGRES_USER" -d "$POSTGRES_DB").FCDB_PASS for an already-initialized , PostgreSQL will *not* automatically update the user password; you must run ALTER USER ... PASSWORD ... (or recreate the ).First Run
---------
Docker Compose reads .env automatically. The defaults in this repo are enough to start a local stack.
Create a local folder for the /backup bind-mount used by fastcve-db (Linux):
If you want to o them, set in your shell or edit .env:
To start the stack:
Troubleshooting
---------------
password authentication failed for user ...: the DB is stored in , so if the was initialized with different credentials you must reset it with docker compose down -v (or manually ALTER USER inside Postgres).Configuration parameters
------------------------
The application container contains the configuration under /fastc:
/fastc/seten.ini - main config (DB DSN, fetch URLs, sync settings, etc.)/fastc/seten${INP_EN}.ini - en settings loaded by /fastc/setenv.shIn this repo, those files are located under src/config and are copied into the image during build.
For easier local edits, you can bind-mount config into the fastcve container (example):
For Docker Compose deployments, ensure seten}.ini points to FCDB_HOST=fastcve-db and FCDB_PORT=5432 (this is already true for dev and prod in this repo).
How To
------
/backup (bind-mounted from the host via docker-compose.yml)../backup directory exists and is writable (Linux):mkdir -p backup && chmod 1777 backupRestore:
This fetches changes since the last successful update (for CVE/C/CPE), with an upper limit of fetch.max.days.period (default 120 days) enforced by the loader.
If there is a need to repopulate the DB for the CWE/CAPEC info, then --full and --drop options are a for the load command. --full ignores the fact the data is already present and --drop drops existing data before loading. When using --data epss in combination with --epss-now, the loader fetches EPSS data for the current date; otherwise it defaults to the previous day.
Above will search CVE text and return details for CVEs that match the gi(s). Multiple --keyword are treated as an AND condition. Each keyword can be a regular expression.
Above will return the list of C that are related to the linux_kernel product for 2.6.32.
To get the C, request the output in JSON format: --output json.
To get only those CVEs that were modified in the last n days, add the option --days-back n i.e. --days-back 10 - only created/modified in the last 10 days
Additional filters are a for C:
Above will return the matching C change records. c supports filtering by CVE ID, change date range, --change-event, and --change-type.
Above will search for all valid existing CPE 2.3 names that are of hardware type, for any , product starts with dl*, and is any
To see for the other options a for both load and search commands run these with -h option
The same search capabilities are exposed through the API (FastAPI). The API is exposed through port 8000 by default and can be changed in docker-compose.yml.
The following endpoints are exposed through HTTP requests
OpenAPI docs:
Alternative docs view:
Screenshots
============================
Example status API
!Screenshot example1
Example search CVE API
!Screenshot example2
API documentation
!ScreenShot example3
License
============================
This software is released under the BSD 3-Clause License
See the LICENSE file
Authors
============================
See the AUTHORS file
Copyright
============================
Binare Oy (binare.io) © IoT Firmware Cybersecurity, 2020.
See the COPYRIGHT file
开发语言:Python
Star 数:61
该项目属于安全软件方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕FastCVE: A Dockerized CVE search tool with API and CLI support for security vulnerability queries.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | FastCVE - FastCVE: A Dockerized CVE search tool with API and |
| 所属分类 | 安全软件 |
| 发布作者 | admin |
| 发布时间 | 2026-10-05 22:44:46 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 113 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |