Comments (3)
?. In this case, context.FailureLevels should be set properly and used in the Initialize method, correct? I thought you'd found a bug in our context override logic and wrote the beginning of a test for this scenario, but it doesn't fail.
from binskim.
See comment with "Shaopeng" below:
// First, we initialize data values that impact loggers, so that we can
// pass accurate values to the console logger.
context.Quiet = options.Quiet != null ? options.Quiet.Value : context.Quiet;
context.ResultKinds = options.Kind != null ? options.ResultKinds : context.ResultKinds;
context.FailureLevels = options.Level != null ? options.FailureLevels : context.FailureLevels;
// Shaopeng: here we override with command line, we now will have Note, but it is too early.
// We initialize a temporary console logger that's used strictly to emit
// diagnostics output while we load/initialize various configurations settings.
IAnalysisLogger savedLogger = context.Logger;
context.Logger = new ConsoleLogger(quietConsole: true,
levels: BaseLogger.ErrorWarningNote,
kinds: BaseLogger.Fail,
toolName: Tool.Driver.Name);
// Next, we initialize ourselves from disk-based configuration,
// if specified. This allows users to operate against configuration
// XML but to override specific settings within it via options.
context = InitializeConfiguration(options.ConfigurationFilePath, context);
// Shaopeng: This re-creates context, from disk setting which is not including Note.
// Now that our context if fully initialized, we can create
// the actual loggers used to complete analysis.
context.Logger = savedLogger;
context.Logger ??= InitializeLogger(context);
// Shaopeng: the savedLogger is NULL, so we re-create, and the context is not including Note, from previous comment. Then it leads to the screenshot.
The full config file is
<?xml version="1.0" encoding="utf-8"?>
<Properties Type="PropertiesDictionary">
<Properties Key="CoreSettings.Options" Type="PropertiesDictionary">
<!--One or more failure levels to persist to loggers. Valid values include Error, Warning, and Informational. Defaults to 'Error' and 'Warning'.-->
<Property Key="FailureLevels" Type="FailureLevelSet">
<Item>Warning</Item>
<Item>Error</Item>
</Property>
</Properties>
</Properties>
from binskim.
Oh, I see. Will take a look.
from binskim.
Related Issues (20)
- BinSkim crashes (AccessViolationException) loading Xamarin.Mac.pdb HOT 4
- Binskim reporting /Qspectre switch not enabled for libxml2-2.11.1 static library even after switch is added HOT 3
- [RULE REQUEST] Enforce presence of /INTEGRITYCHECK HOT 1
- Out of memory exception occurs while inspecting certain binaries during BA2004.EnableSecureSourceCodeHashing rule HOT 3
- ERR997.ExceptionLoadingAnalysisTarget for .exe file HOT 5
- BA2024 - Defect : EnableSpectreMitigations HOT 2
- Is it true that I can pass an input file list? HOT 3
- SpectreMitigationsEnabled
- Guardian: PostAnalysis error [ EnableCriticalCompilerWarning] HOT 1
- Combability with .NET ReadyToRun and Self-Contained HOT 3
- BA2026 is reported as NotApplicable for native PE binaries compiled with /sdl switch
- BA2025, /CETCOMPAT and .NET Framework
- Users not able to know which file causes issue when exception loading pdb
- BA2004 - Should exclude "AssemblyAttributes.obj" HOT 1
- BinSkim download from symbol server not working
- Unclear Error message when the path of the file too long
- Enabling disabled rules
- BinSkim BA2014 compatibility with the new Arm64EC files
- BinSkim BA2021 compatibility with R2R Linux binaries
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binskim.