Skip to content

[FSSDK-13478] Update demo app log4net to 3.3.0 - #426

Open
Esra Kartal (esrakartalOpt) wants to merge 1 commit into
esra/fssdk-13477-fix-arnica-findingsfrom
esra/fssdk-13478-fix-dependabot-alert
Open

Esra Kartal (esrakartalOpt) wants to merge 1 commit into
esra/fssdk-13477-fix-arnica-findingsfrom
esra/fssdk-13478-fix-dependabot-alert

Conversation

@esrakartalOpt

Copy link
Copy Markdown
Contributor

Summary

Fixes the only open Dependabot alert (#24, log4net before 3.3.0, in the demo app) from FSSDK-13478. It also clears the same log4net finding in Arnica (FSSDK-13477).

Stacked on #425. Both PRs edit packages.config, so this one is based on #425's branch. Merge #425 first. GitHub then retargets this PR to master.

Test plan

  • The demo app builds from a clean state with Mono msbuild and references log4net 3.3.0.0. Without the package the same build fails (CS0246), so the check does test the reference.
  • Ran the app's Log4NetLogger.cs with its real Log4Net.config and config section handler against 3.3.0 and 2.0.13: both write the same INFO and ERROR lines, and DEBUG is filtered out.
  • Not tested: running the app under IIS or Visual Studio, and it is not part of CI (OptimizelySDK.NETFramework.sln does not include it).

Issues

  • FSSDK-13478

🤖 Generated with Claude Code

@alexjoeyyong Alex Yong (alexjoeyyong) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: approve. I checked the log4net 3.3.0 package itself and ran the demo app's real log4net config on 2.0.13 and 3.3.0 side by side; they behave identically. Nothing here is covered by CI (the demo app isn't in it, and the base branch is #425's), so the evidence below is what stands behind it.

TL;DR

  • The reference is right. The net462 build inside log4net 3.3.0 is assembly version 3.3.0.0 with public key token 669e0ddf0bb1aa2a, which is exactly what the new <Reference> in the csproj says, and the lib\net462\log4net.dll hint path matches the package layout (net462, netstandard2.0). Its target framework is v4.6.2, so the project bump to 4.6.2 is the lowest that works. On net462 the package has no NuGet dependencies, so nothing else needs adding.
  • Everything the demo's config names still exists in 3.x: Log4NetConfigurationSectionHandler, XmlConfigurator, FileAppender+MinimalLock, LevelRangeFilter, PatternLayout, LogManager.
  • Same behaviour as before. I ran the demo's real Log4Net.config (file appender, MinimalLock, INFO to FATAL range filter, same pattern) through the configurator the way the Web.config section handler does, and made the same ILog.Logger.Log(Type, Level, message, null) calls that Log4NetLogger.cs makes, on both versions under Mono. Both wrote the INFO and ERROR lines in the same format and filtered the DEBUG line.
  • Config edits are consistent: Web.config compilation and httpRuntime move from 4.5 to 4.6.2 to match the project, and the README now states the 4.6.2 floor.

CI: only the Jira reference check ran (pass). Workflows here target PRs into master, and this PR's base is #425's branch, so none of the build jobs ran, and OptimizelySDK.NETFramework.sln doesn't include the demo app anyway.

Proof

Results
log4net 3.3.0 nupkg: lib/net462, lib/netstandard2.0; nuspec dependencies: net462 none; netstandard2.0 System.Configuration.ConfigurationManager 4.5.0
Assembly log4net (net462): 3.3.0.0, public key token 669e0ddf0bb1aa2a, TargetFramework .NETFramework,Version=v4.6.2
  log4net.Config.Log4NetConfigurationSectionHandler   present
  log4net.Config.XmlConfigurator                      present
  log4net.Appender.FileAppender+MinimalLock           present
  log4net.Filter.LevelRangeFilter                     present
  log4net.Layout.PatternLayout                        present
  log4net.LogManager                                  present

demo Log4Net.config, same code path, Mono:
  log4net 2.0.13:  [1] INFO System.String - [Optimizely Sample Log4NetLogger] info line
                   [1] ERROR System.String - [Optimizely Sample Log4NetLogger] error line      (DEBUG filtered)
  log4net 3.3.0:   [1] INFO System.String - [Optimizely Sample Log4NetLogger] info line
                   [1] ERROR System.String - [Optimizely Sample Log4NetLogger] error line      (DEBUG filtered)

Not tested: building or running the ASP.NET demo app under IIS or Visual Studio (not possible here; not part of CI).

Findings

Blockers: none. Should-fix: none.

Notes (no change asked)

  • Merge order: this is stacked on #425. Merge #425 first, then retarget this to master. GitHub retargets it automatically, but it doesn't run the build jobs again on its own; that's fine here because the demo app isn't built in CI.
  • packages.config now lists log4net as targetFramework="net462" while the rest of the file says net45. NuGet accepts the mix and VS rewrites it when it next restores; no action needed.

Ponytail

Lean already: 7 lines changed across four files, each required by the version bump. Nothing to cut.
net: 0 lines possible.

Principles (installed principles plugin v0.5.0, org layer; no repo-level checks)

Applied by hand, not the full recorded run. SEC-6.S1 pass (clears the log4net advisory). CODE-1.S1 pass (added README text states the current floor, not history). FUN-2.S1 not evaluable by CI (no job covers the demo app); I covered it with the side-by-side run above.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants