rosolko / WebDriverManager.Net

Automatic Selenium Webdriver binaries management for .Net
MIT License
269 stars 83 forks source link

Need "Control Flow Guard" Enabled On Assemblies #252

Open JohnMarzulli opened 1 year ago

JohnMarzulli commented 1 year ago

Problem

The internal security checks of my company enforces that all Nuget packages have "Control Flow Guard" enabled.

This is to prevent any security issues.

Proposed Solution

Enable "Control Flow Guard" in the build so Web Driver Manager may be used by more organizations.

##[error]1. BinSkim Error BA2008 - File: AcceleratorCore/bin/Release/net6.0/selenium-manager/windows/selenium-manager.exe.  
  Tool: BinSkim: Rule: BA2008 (EnableControlFlowGuard). https://github.com/microsoft/binskim/blob/main/docs/BinSkimRules.md#rule-BA2008EnableControlFlowGuard
  'selenium-manager.exe' does not enable the control flow guard (CFG) mitigation. To resolve this issue, pass /guard:cf on both the compiler and linker command lines. Binaries also require the /DYNAMICBASE linker option in order to enable CFG.

Build Environment

DotNet 6.x LTS