Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

whitesource-ft/xModuleAnalyzer-NET

Repository files navigation

[DEPRECATED]
This repository will be inaccessible starting January 9th, 2023.

The new repository is now active at https://github.com/mend-toolkit/mend-examples, which we encourage you to visit today.


Logo

License GitHub release

WhiteSource xModuleAnalyzer-NET

xModuleAnalyzer-NET is a tool that executes WhiteSource's Prioritize (EUA) scans for multi-project C# solutions.
It imitates the execution method of WhiteSource's xModuleAnalyzer, except it performs the analyzeMultiModule setup step automatically, so both the setup and the scan are combined into a single execution.

The tool identifies the applicable appPath values for each of the solution's projects, creates a dedicated xModuleAnalyzer setup file and executes consecutive EUA scans for all identified projects.

Important Notes

  • By default, the WhiteSource Product name would be the name of the solution's (*.sln) root directory, unless you override it using the productName parameter.
  • Project names cannot be specified; the tool will automatically create one WhiteSource Project for each of the solution's projects (*.csproj) based on their assembly names.
  • xModuleAnalyzer-NET does not support multi-threading currently, so as opposed to xModuleAnalyzer, which can scan up to 8 modules in parallel, xModuleAnalyzer-NET executes the scans consecutively, which increases overall scan times.

Supported Operating Systems

  • Windows (PowerShell): 10, 2012, 2016

Supported Project Types

C# solutions with one or more projects that include open-source NuGet packages.
NuGet packages may be referenced either in a packages.config file or within each project's manifest file (*.csproj).

Prerequisites

See WhiteSource Prioritize (EUA) Prerequisites

Installation

  1. Download the latest xModuleAnalyzer-NET package to your computer and extract it.
  2. Modify the provided wss-unified-agent-EUA-net.config file as needed, or alternatively, use your own EUA (WhiteSource Prioritize) configuration file.
    The configuration file must be placed in the same directory as xModuleAnalyzer-NET.ps1.

Execution

  • PowerShell:
    Navigate to the directory where xModuleAnalyzer-NET.ps1 is located and enter the execution command:
    PS C:\WhiteSource> xModuleAnalyzer-NET.ps1 [-key "value"[]]]

Command-Line Parameters

All parameters are consistent with the WhiteSource Unified Agent and xModuleAnalyzer command-line parameters.

Parameter Type Required Description
‑xModulePath string No Specifies the xModuleAnalyzer setup file name. If not provided, "./multi-module-setup_net.txt" will be used.
‑fsaJarPath string No Specifies the full/relative path to the Unified Agent jar file. If not provided, "./wss-unified-agent.jar" will be used. If the agent doesn't exist in that location, it will be automatically downloaded.
‑c string No Specifies the full/relative path to the Unified Agent's EUA config file (the file must exist prior to the execution). If not provided, "./wss-unified-agent-EUA-net.config" will be used.
‑d string Yes Specifies the path to the solution's root directory (the directory to be scanned).
‑productName string No Specifies the WhiteSource Product name to be used. If not provided, the name of the solution's root directory will be used.
‑viaDebug switch No If specified, the Unified Agent will execute an EUA scan with debug logging enabled. Note that this is a PowerShell switch, not a boolean. To use it, just add -viaDebug (and not -vaDebug true).

Execution Examples

Scanning the multi-project solution HelloWorld:
PS C:\WhiteSource> xModuleAnalyzer-NET.ps1 -d "C:\Source\HelloWorld"

Scanning the multi-project solution HelloWorld, specifying a product name:
PS C:\WhiteSource> xModuleAnalyzer-NET.ps1 -d "C:\Source\HelloWorld" -productName "Hello World 1.0"

Sample command using all parameters:
PS C:\WhiteSource> xModuleAnalyzer-NET.ps1 -xModulePath "multi-module-setup.txt" -fsaJarPath "C:\ws\wss-unified-agent.jar" -c "C:\ws\wss-unified-agent-EUA.config" -d "C:\Source\HelloWorld" -productName "Hello World 1.0" -viaDebug

About

WhiteSource Prioritize Multi-Module Analyzer for .NET Projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •