Skip to content

feat: add Volo.Abp.LuckyPenny.AutoMapper package for commercial AutoMapper integration#25153

Merged
EngincanV merged 1 commit into
devfrom
feat/luckypenny-automapper-module
Mar 25, 2026
Merged

feat: add Volo.Abp.LuckyPenny.AutoMapper package for commercial AutoMapper integration#25153
EngincanV merged 1 commit into
devfrom
feat/luckypenny-automapper-module

Conversation

@maliming

Copy link
Copy Markdown
Member

Closes #25137

AutoMapper 14.x has a known DoS vulnerability (GHSA-rvv3-g6hj-g44x) with no patch planned for 14.x. The fix is only in the commercial 15.x+ releases by LuckyPenny Software.

This PR adds a new Volo.Abp.LuckyPenny.AutoMapper package as an optional drop-in replacement for users who hold a commercial AutoMapper license:

  • New module AbpLuckyPennyAutoMapperModule — swap it for AbpAutoMapperModule in [DependsOn], no other code changes needed
  • All public types stay in the same namespaces (AbpAutoMapperOptions, IMapperAccessor, AutoMapperExpressionExtensions, etc.)
  • Supports license key configuration and log suppression for the honor-system license warning
  • Full test coverage in a new Volo.Abp.LuckyPenny.AutoMapper.Tests project (31 tests, same parity as the original)
  • New documentation page with installation, usage, license setup, and migration guide
  • The existing Volo.Abp.AutoMapper package is unchanged

Copilot AI review requested due to automatic review settings March 25, 2026 04:07
@maliming maliming added this to the 10.3-preview milestone Mar 25, 2026

Copilot AI 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.

Pull request overview

Adds a new ABP framework integration package (Volo.Abp.LuckyPenny.AutoMapper) that targets the commercially patched AutoMapper line, intended as an optional drop-in replacement for Volo.Abp.AutoMapper without changing ABP-facing namespaces/APIs.

Changes:

  • Introduces AbpLuckyPennyAutoMapperModule and re-implements ABP’s AutoMapper integration on top of the newer AutoMapper package version (via VersionOverride).
  • Adds a dedicated test project (Volo.Abp.LuckyPenny.AutoMapper.Tests) mirroring existing AutoMapper integration behavior (including MultiLingualObjects scenarios).
  • Updates docs to point commercial-license holders to the new package, and wires the new projects into the solution + packaging scripts.

Reviewed changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
nupkg/common.ps1 Includes the new LuckyPenny AutoMapper project in packaging/build project enumeration.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/MultiLingualObjects/TestObjects/MultiLingualBookTranslation.cs Adds translation test object for MultiLingualObjects mapping tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/MultiLingualObjects/TestObjects/MultiLingualBookDto.cs Adds DTO test object for MultiLingualObjects mapping tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/MultiLingualObjects/TestObjects/MultiLingualBook.cs Adds entity test object for MultiLingualObjects mapping tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/MultiLingualObjects/MultiLingualObjectTestProfile.cs Adds AutoMapper profile used by MultiLingualObjects mapping tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/MultiLingualObjects/MultiLingualObjectManager_Tests.cs Adds MultiLingualObjectManager behavior + mapping tests targeting the LuckyPenny module.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/MultiLingualObjects/AbpLuckyPennyMultiLingualObjectsTestModule.cs Test module wiring for MultiLingualObjects tests using AbpLuckyPennyAutoMapperModule.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyNotMappedDto.cs Adds sample DTO used by AutoMapper integration tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyMapProfile.cs Adds mapping profile used by AutoMapper integration tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEnumDto.cs Adds sample enum DTO for mapping tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEnum.cs Adds sample enum source for mapping tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEntityToMyEntityDto2Mapper.cs Adds custom IObjectMapper<> implementation for “specific mapper” test coverage.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEntityDtoWithMappingMethods.cs Adds DTO implementing IMapFrom/IMapTo used by mapping-method tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEntityDto2.cs Adds sample DTO for “specific mapper” tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEntityDto.cs Adds sample DTO for basic mapping tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEntity.cs Adds sample entity for mapping tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/ObjectMapperExtensions_Tests.cs Tests IObjectMapper extension behavior when using LuckyPenny AutoMapper integration.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_Dependency_Injection_Tests.cs Tests DI registration for mapping actions and disposal behavior.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_CustomServiceConstruction_Tests.cs Tests ConstructServicesUsing-style customization with a replaced IMapper.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_ConfigurationValidation_Tests.cs Tests profile validation configuration parity with the existing module behavior.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapperTestModule.cs Test module wiring for LuckyPenny AutoMapper integration tests.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapperExpressionExtensions_Tests.cs Tests ABP’s AutoMapper expression extension helpers against the LuckyPenny package.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_Specific_ObjectMapper_Tests.cs Validates that registered specific IObjectMapper<,> implementations take precedence.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_MaxDepth_Tests.cs Confirms default/custom/disabled MaxDepth behavior (mitigation parity).
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_Basic_Tests.cs Basic integration tests: provider replacement, internal mapper access, enum mapping.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo.Abp.LuckyPenny.AutoMapper.Tests.csproj Adds new test project and references the LuckyPenny AutoMapper package + dependencies.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo.Abp.LuckyPenny.AutoMapper.Tests.abppkg Declares ABP package role metadata for the new test project.
framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/AutoMapper/AbpAutoMapperExtensibleDtoExtensions_Tests.cs Tests extensible-object extra property mapping extensions with the LuckyPenny integration.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/ObjectMapping/AbpAutoMapperObjectMapperExtensions.cs Adds GetMapper() extension helpers for IObjectMapper/IAutoObjectMappingProvider.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/MapperAccessor.cs Implements internal IMapperAccessor backing type.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/IMapperAccessor.cs Exposes public IMapperAccessor interface used by ABP integration.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/IAbpAutoMapperConfigurationContext.cs Exposes configuration context interface for ABP AutoMapper configurators.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/AutoMapperExpressionExtensions.cs Adds ABP AutoMapper mapping expression extensions (auditing-related ignores, etc.).
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/AutoMapperAutoObjectMappingProvider.cs Implements ABP IAutoObjectMappingProvider backed by AutoMapper IMapper.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/AbpLuckyPennyAutoMapperModule.cs New module that wires ABP object mapping to commercial AutoMapper (LuckyPenny) implementation.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperOptions.cs Reintroduces ABP AutoMapper options surface (maps/profiles/validation/default MaxDepth).
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperConventionalRegistrar.cs Registers AutoMapper open-generic services (resolvers/converters/actions) conventionally.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperConfigurationContext.cs Implements configuration context passed to configurators.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo.Abp.LuckyPenny.AutoMapper.csproj New framework package project; references ABP deps and overrides AutoMapper version.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo.Abp.LuckyPenny.AutoMapper.abppkg.analyze.json ABP package analyzer metadata for the new module/package.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo.Abp.LuckyPenny.AutoMapper.abppkg Declares ABP package role metadata for the new framework library.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Properties/AssemblyInfo.cs Adds InternalsVisibleTo for the new LuckyPenny AutoMapper test assembly.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/Microsoft/Extensions/DependencyInjection/AbpAutoMapperServiceCollectionExtensions.cs Adds DI extensions to replace ABP auto-mapping provider with AutoMapper-backed provider.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/FodyWeavers.xsd Adds ConfigureAwait weaver schema file consistent with other ABP projects.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/FodyWeavers.xml Enables ConfigureAwait weaving settings for the new project.
framework/src/Volo.Abp.LuckyPenny.AutoMapper/AutoMapper/AbpAutoMapperExtensibleObjectExtensions.cs Adds AutoMapper extensions for mapping ABP extra properties (extensible objects).
framework/Volo.Abp.slnx Adds the new framework project and new test project to the solution.
docs/en/release-info/migration-guides/AutoMapper-To-Mapperly.md Links commercial-license holders to the new LuckyPenny integration as an alternative to migrating to Mapperly.
docs/en/framework/infrastructure/object-to-object-mapping.md Documents the vulnerability context and points to LuckyPenny/Mapperly alternatives.
docs/en/framework/infrastructure/luckypenny-automapper.md New documentation page: install/use/configure license key/log filtering + migration steps.

@EngincanV EngincanV merged commit 7ba64de into dev Mar 25, 2026
7 checks passed
@EngincanV EngincanV deleted the feat/luckypenny-automapper-module branch March 25, 2026 07:24
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.

The command was terminated when executing Add-Migration. AutoMapper needs to be upgraded.

3 participants