Skip to main content

Parse yml file and update alerts

Project description

Logo

License CI GitHub release

Ignore Alerts

Set Ignore status for alert based on whaiver Yaml



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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

mend_ignore_alerts-0.2.1-py3-none-any.whl (11.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page