Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

wip: add vulners plugin #47

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 31 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -505,18 +505,6 @@ const plugin = ({
}) => entry.name === options.name ? 'deny' : 'allow'
```

### `npm-registry-firewall/audit`
Some registries do not provide audit API, that's why the plugin is disabled by default.
To activate, add a rule:
```js
{
plugin: [['npm-registry-firewall/audit', {
critical: 'deny',
moderate: 'warn'
}]]
}
```

### `npm-registry-firewall/std`
Default plugin to filter packages by their fields. May be used directly or via shortcut as shown in examples above.
```js
Expand Down Expand Up @@ -548,6 +536,37 @@ Default plugin to filter packages by their fields. May be used directly or via s
}
```

### `npm-registry-firewall/audit`
Some registries do not provide audit API, that's why the plugin is disabled by default.
To activate, add a rule:
```js
{
plugin: [['npm-registry-firewall/audit', {
critical: 'deny',
moderate: 'warn'
}]]
}
```

### `npm-registry-firewall/vulners`
Alternative audit API based on [vulners.com](https://vulners.com/) advisories.
```js
{
plugin: [['npm-registry-firewall/vulners', [{
relevance: 95, // Optional. Lower bound on the search result (lucene score 0...100) for associating the found CVEs with the target package. Defautls to 90
cond: 'or', // Optional. Defaults to `and`
policy: 'warn',
'cvss.score': 60,
'cvss3.cvssV3.availabilityImpact': 'MEDIUM'
}, {
policy: 'deny',
'cvss.score': 95,
'cvss3.cvssV3.availabilityImpact': 'CRITICAL'
}],
]]
}
```

### Monitoring
#### /healthcheck
```json
Expand Down