Mend Ignore Alerts
Project description
Ignore Future Alerts
ws_ignore_alerts.py is a utility for automated ignoring alerts in the newly created WS project, which is a version of the same customer's product, according to the previously ignored alerts in the baseline WS project. Once a new UA scan has finished, and a new project has been created, the utility can be launched as part of the pipeline for automated ignoring alerts. There are three options for use:
- using a baseline project token and destination project name defined by the user - baselineProjectToken and destProjectName (optional: destProjectVersion). Might work with different products.
- using a baseline project token and destination project token defined by the user - baselineProjectToken and destProjectToken. Might work with different products.
- using the default behavior, without providing baseline and destination projects' data. In this case, the destination project is a latest project of the certain product and baseline project is one before the latest project of the same product. Only works within a certain product. The ignored alerts will be pulled from the baseline project, and the same alerts will be ignored in the destination project.
Supported Operating Systems
- Linux (Bash): CentOS, Debian, Ubuntu, RedHat
- Windows (PowerShell): 10, 2012, 2016
Prerequisites
- Python 3.5 or above
Execution
From the command line:
python ws_ignore_alerts.py -u $wsUrl -k $userKey -o $orgToken -p $productToken -b $baselineProjectToken -n $destProjectName -v $destProjectVersion -t $destProjectToken -d $destProductToken
Using a config file:
python ws_ignore_alerts.py
Note: If more than one version of Python installed on the target machine, use the appropriate executables
for the installation and the execution (pip3
and python3
respectively)
Configuration Parameters
===============================================================================================================
| Group | Parameter | Description |
===============================================================================================================
| DEFAULT | wsUrl | WhiteSource server URL. Can be found under the 'Integrate' tab in |
| | | your WhiteSource organization. |
---------------------------------------------------------------------------------------------------------------
| DEFAULT | userKey | WhiteSource User Key. Can be found under the 'Profile' section in |
| | | your WhiteSource organization. |
---------------------------------------------------------------------------------------------------------------
| DEFAULT | orgToken | WhiteSource API Key. Can be found under the 'Integrate' tab in your |
| | | your WhiteSource organization. |
---------------------------------------------------------------------------------------------------------------
| DEFAULT | productToken | WhiteSource Product Token. Can be found under the 'Integrate' tab |
| | | in your WhiteSource organization. |
---------------------------------------------------------------------------------------------------------------
| DEFAULT | baselineProjectToken | Token of the WhiteSource project the ignored alerts are pulled from. |
| | | Can be found under the settings icon within a particular project. |
---------------------------------------------------------------------------------------------------------------
| DEFAULT | destProjectName | Name of the WhiteSource project where the alerts will be ignored. |
---------------------------------------------------------------------------------------------------------------
| DEFAULT | destProjectVersion | Version of the WhiteSource project where the alerts will be ignored. |
---------------------------------------------------------------------------------------------------------------
| DEFAULT | destProjectToken | Token of the WhiteSource project where the alerts will be ignored. |
---------------------------------------------------------------------------------------------------------------
| DEFAULT | destProductToken | Token of the WhiteSource product where the alerts will be ignored. |
===============================================================================================================
Author
WhiteSource Software ©
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
Built Distribution
File details
Details for the file ws_ignore_alerts-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: ws_ignore_alerts-0.2.2-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 499f6ab24ffe503bbfde89ec85857951e49445df3b6775ab5de4566a6389e430 |
|
MD5 | 6480af8d48677c027c9e7940aaa2b0bb |
|
BLAKE2b-256 | ce84ec1d4464ef0eea33afd7eb1ec21ec39956866f94280988c8aceb6f7265cf |