-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/nistnvd: implement nist_nvd_cves data source (#137)
- Loading branch information
Showing
23 changed files
with
1,178 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: blackstork/nist_nvd | ||
weight: 20 | ||
plugin: | ||
name: blackstork/nist_nvd | ||
description: "" | ||
tags: [] | ||
version: "v0.4.0" | ||
source_github: "https://github.com/blackstork-io/fabric/tree/main/internal/nistnvd/" | ||
type: docs | ||
--- | ||
|
||
{{< plugin-header "blackstork/nist_nvd" "nist_nvd" "v0.4.0" >}} | ||
|
||
## Installation | ||
|
||
To install the plugin, add it to `plugin_versions` map in the Fabric global configuration block (see [Global configuration]({{< ref "configs.md#global-configuration" >}}) for more details), with a version constraint restricting which available versions of the plugin the codebase is compatible with: | ||
|
||
```hcl | ||
fabric { | ||
plugin_versions = { | ||
"blackstork/nist_nvd" = ">= v0.4.0" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Data sources | ||
|
||
{{< plugin-resources "nist_nvd" "data-source" >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
title: nist_nvd_cves | ||
plugin: | ||
name: blackstork/nist_nvd | ||
description: "" | ||
tags: [] | ||
version: "v0.4.0" | ||
source_github: "https://github.com/blackstork-io/fabric/tree/main/internal/nistnvd/" | ||
resource: | ||
type: data-source | ||
type: docs | ||
--- | ||
|
||
{{< breadcrumbs 2 >}} | ||
|
||
{{< plugin-resource-header "blackstork/nist_nvd" "nist_nvd" "v0.4.0" "nist_nvd_cves" "data source" >}} | ||
|
||
## Installation | ||
|
||
To use `nist_nvd_cves` data source, you must install the plugin `blackstork/nist_nvd`. | ||
|
||
To install the plugin, add the full plugin name to the `plugin_versions` map in the Fabric global configuration block (see [Global configuration]({{< ref "configs.md#global-configuration" >}}) for more details), as shown below: | ||
|
||
```hcl | ||
fabric { | ||
plugin_versions = { | ||
"blackstork/nist_nvd" = ">= v0.4.0" | ||
} | ||
} | ||
``` | ||
|
||
Note the version constraint set for the plugin. | ||
|
||
## Configuration | ||
|
||
The data source supports the following configuration parameters: | ||
|
||
```hcl | ||
config data nist_nvd_cves { | ||
api_key = <string> # optional | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
The data source supports the following parameters in the data blocks: | ||
|
||
```hcl | ||
data nist_nvd_cves { | ||
cpe_name = <string> # optional | ||
cve_id = <string> # optional | ||
cvss_v3_metrics = <string> # optional | ||
cvss_v3_severity = <string> # optional | ||
cwe_id = <string> # optional | ||
has_cert_alerts = <bool> # optional | ||
has_cert_notes = <bool> # optional | ||
has_kev = <bool> # optional | ||
is_vulnerable = <bool> # optional | ||
keyword_exact_match = <bool> # optional | ||
keyword_search = <string> # optional | ||
last_mod_end_date = <string> # optional | ||
last_mod_start_date = <string> # optional | ||
limit = <number> # optional | ||
no_rejected = <bool> # optional | ||
pub_end_date = <string> # optional | ||
pub_start_date = <string> # optional | ||
source_identifier = <string> # optional | ||
virtual_match_string = <string> # optional | ||
} | ||
``` |
Oops, something went wrong.