Skip to content

Commit

Permalink
RDMPDEV-186: fixed security code scan warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ltramma committed May 31, 2019
1 parent a04d96e commit 0a0bb01
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Rdmp.Core/Curation/Data/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public string GetShortName()
}

/// <summary>
/// The master version of the <see cref="Plugin"/> (not the dlls inside - See <see cref="LoadModuleAssembly.DllFileVersion"/>).
/// The master version of the <see cref="Plugin"/>
/// <para>Not currently used</para>
/// </summary>
public Version PluginVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static string SerializeObject(object value, IRDMPPlatformRepositoryServic

var settings = new JsonSerializerSettings
{
TypeNameHandling = TypeNameHandling.Objects,
TypeNameHandling = TypeNameHandling.None,
TypeNameAssemblyFormatHandling = TypeNameAssemblyFormatHandling.Simple,
Converters = new JsonConverter[] {databaseEntityJsonConverter}
};
Expand Down Expand Up @@ -56,7 +56,7 @@ public static object DeserializeObject(string value, Type type,IRDMPPlatformRepo

var settings = new JsonSerializerSettings
{
TypeNameHandling = TypeNameHandling.Objects,
TypeNameHandling = TypeNameHandling.None,
TypeNameAssemblyFormatHandling = TypeNameAssemblyFormatHandling.Simple,
Converters = new JsonConverter[] {databaseEntityJsonConverter, lazyJsonConverter}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ private void miAddParameter_Click(object sender, EventArgs e)
{
Random r = new Random();

#pragma warning disable SCS0005 // Weak random generator: This is only used to create an initial value for a parameter.
var dialog = new TypeTextOrCancelDialog("Parameter Name", "Name", 100, "@MyParam" + r.Next());
#pragma warning restore SCS0005 // Weak random generator
if (dialog.ShowDialog() == DialogResult.OK)
{
var newParameter = Options.CreateNewParameter(dialog.ResultText.Trim());
Expand Down
6 changes: 3 additions & 3 deletions rakefile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
load 'rakeconfig.rb'
$MSBUILD15CMD = MSBUILD15CMD.gsub(/\\/,"/")

task :ci_low_warnings, [:config,:level] => [:assemblyinfo, :build_low_warning]
task :ci_low_warnings, [:config,:level,:aserrors] => [:assemblyinfo, :build_low_warning]

task :ci_continuous, [:config] => [:setup_connection, :assemblyinfo, :build, :tests]

Expand Down Expand Up @@ -43,9 +43,9 @@
sh "\"#{$MSBUILD15CMD}\" #{SOLUTION} \/t:Clean;Build \/p:Configuration=Release"
end

task :build_low_warning, [:config,:level] => :restorepackages do |msb, args|
task :build_low_warning, [:config,:level,:aserrors] => :restorepackages do |msb, args|
args.with_defaults(:level => 1)
sh "\"#{$MSBUILD15CMD}\" #{SOLUTION} \/t:Clean;Build \/p:Configuration=#{args.config} \/p:WarningLevel=#{args.level} \/p:TreatWarningsAsErrors=false"
sh "\"#{$MSBUILD15CMD}\" #{SOLUTION} \/t:Clean;Build \/p:Configuration=#{args.config} \/v:detailed \/p:WarningLevel=#{args.level} \/p:TreatWarningsAsErrors=#{args.aserrors}"
end

task :createtestdb, [:config] do |t, args|
Expand Down

0 comments on commit 0a0bb01

Please sign in to comment.