Parse yml file and update alerts
Project description
Ignore Alerts
Set Ignore status for alert based on whaiver Yaml
- Supported Operating Systems
- Prerequisites
- Installation
- Configuration Parameters
- Usage
- Execution Examples
- Other Section
Supported Operating Systems
- Linux (Bash): CentOS, Debian, Ubuntu
- Windows (PowerShell): 10, 2012, 2016
Prerequisites
- Python 3.9+
- Mend user with admin permissions
Installation
$ pip install mend-ignore-alerts
Note: Depending on whether the package was installed as a root user or not, you need to make sure the package installation location was added to the
$PATH
environment variable.
Configuration Parameters
Note: Parameters can be specified as either command-line arguments, environment variables, or a combination of both.
Command-line arguments take precedence over environment variables.
CLI argument | Env. Variable | Type | Required | Description |
---|---|---|---|---|
‑‑help | switch |
No | Show help and exit | |
‑‑user-key | WS_USERKEY |
string |
Yes | Mend User Key |
‑‑api-key | WS_APIKEY |
string |
Yes | Mend API Key |
‑‑url | WS_WSS_URL |
string |
Yes | Mend Server URL |
‑‑waiver | WS_WAIVER |
string |
Yes | Filename of Yaml file for parsing |
Usage
Using command-line arguments only:
import_sbom --user-key WS_USERKEY --api-key WS_APIKEY --url $WS_WSS_URL --waiver $WS_WAIVER
Using environment variables:
export WS_USERKEY=xxxxxxxxxxx
export WS_APIKEY=xxxxxxxxxxx
export WS_WSS_URL=https://saas.mend.io
export WS_WAYVER=waiverexample.yml
ignore_alerts
Note: Either form is accepted. For the rest of the examples, the latter form would be used
Execution Examples
Note: In the following examples, $WS_USERKEY, $WS_APIKEY and $WS_WSS_URL are assumed to have been exported as environment variables.
Import SPDX SBOM into a new Mend project
$ import_sbom --scope "$WS_PRODUCTNAME//$WS_PROJECTNAME" --dir $HOME/reports --input $HOME/reports/$WS_PROJECTNAME-sbom.json
Convert SPDX SBOM to an offline update request file for creating a new Mend project under a specific product
$ import_sbom --scope "$WS_PRODUCTNAME//$WS_PROJECTNAME" --dir $HOME/reports --input $HOME/reports/my-project-sbom.json --offline True
Convert SPDX SBOM to an offline update request file for overriding an existing Mend project
$ import_sbom --scope "$WS_PRODUCTNAME//$WS_PROJECTNAME" --dir $HOME/reports --input $HOME/reports/my-project-sbom.json --offline True
$ import_sbom --scope $WS_PROJECTTOKEN --dir $HOME/reports --input $HOME/reports/my-project-sbom.json --offline True
Convert SPDX SBOM to an offline update request file for appending to an existing Mend project
$ import_sbom --scope "$WS_PRODUCTNAME//$WS_PROJECTNAME" --dir $HOME/reports --input $HOME/reports/my-project-sbom.json --offline True --updateType APPEND
$ import_sbom --scope $WS_PROJECTTOKEN --dir $HOME/reports --input $HOME/reports/my-project-sbom.json --offline True --updateType APPEND
Other Section
Other Subsection
Details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for mend_ignore_alerts-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72d425c6f46b7d3476be44a200fbf19838c928dfa5ca02f2be0db3397e487340 |
|
MD5 | 0d5c09ea1fae83c9f0a37eb2cf2e9643 |
|
BLAKE2b-256 | 48db26fd719056892274321d624affc757af95bed25e30b36e914bb6900510db |