Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snyk/rpm-parser
Produce a list of dependencies from an RPM database file
https://github.com/snyk/rpm-parser
dependencies packages parser rpm security snyk
Last synced: 3 months ago
JSON representation
Produce a list of dependencies from an RPM database file
- Host: GitHub
- URL: https://github.com/snyk/rpm-parser
- Owner: snyk
- License: other
- Created: 2020-03-16T14:01:13.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-06-10T09:11:48.000Z (8 months ago)
- Last Synced: 2024-11-10T19:53:04.735Z (3 months ago)
- Topics: dependencies, packages, parser, rpm, security, snyk
- Language: TypeScript
- Homepage:
- Size: 45.7 MB
- Stars: 7
- Watchers: 96
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
![Snyk logo](https://snyk.io/style/asset/logo/snyk-print.svg)
***
![Known Vulnerabilities](https://snyk.io/test/github/snyk/rpm-parser/badge.svg)
Snyk helps you find, fix and monitor for known vulnerabilities in your dependencies, both on an ad hoc basis and as part of your CI (Build) system.
## Snyk RPM Parser ##
A library that reads the list of packages inside an RPM database file.
### How to use the parser ###
```js
import { getPackages } from '@snyk/rpm-parser';
import { readFileSync } from 'fs';// ...
const rpmDatabase = readFileSync('/var/lib/rpm/Packages');
const result = await getPackages(rpmDatabase);console.log(result.response);
```### Limitations ###
The parser currently reads only BerkeleyDB version 5.x as the supported database backend. There are plans within RPM to use SQLite as the database backend but the parser currently does not work with SQLite.
### Bugs or issues ###
Please file an [Issue](https://github.com/snyk/rpm-parser/issues) under this repository, providing as much information as you can to reproduce the issue.
If possible, provide the RPM database file (`/var/lib/rpm/Packages`) or the Operating System used and the packaged installed using the package manager.
### How the parser works ###
Refer to the [BerkeleyDB module README](https://github.com/snyk/rpm-parser/blob/master/lib/berkeleydb/README.md) for a breakdown of the BerkeleyDB version 5.x database.
Refer to the [RPM module README](https://github.com/snyk/rpm-parser/blob/master/lib/rpm/README.md) for details on the package extraction.