Skip to content

Commit e46d7c0

Browse files
authored
Merge pull request #211 from contentstack/fix/snyk-fix-25-07-2026
Fix/snyk fix 25 07 2026
2 parents 4c0d902 + 2a235c2 commit e46d7c0

34 files changed

Lines changed: 135 additions & 14 deletions

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [v1.1.1](https://github.com/contentstack/contentstack-management-dotnet/tree/v1.1.1)(2026-07-30)
4+
5+
- **Fix**
6+
- **Snyk security fixes**: Updated vulnerable dependency versions in `contentstack.management.aspnetcore.csproj` and test project files
7+
- **Deepcode / static-analysis suppressions**: Added `// deepcode ignore` comments on hardcoded-credential patterns in test files (integration/unit tests) — credentials are test fixtures, not production secrets
8+
39
## [v1.1.0](https://github.com/contentstack/contentstack-management-dotnet/tree/v1.1.0)(2026-07-20)
410

511
- **New**

‎Contentstack.Management.ASPNETCore/contentstack.management.aspnetcore.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.1</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<PackageId>contentstack.management.aspnetcore</PackageId>
66
<PackageVersion>$(Version)</PackageVersion>
77
<Authors>Contentstack</Authors>

‎Contentstack.Management.Core.Tests/Contentstack.Management.Core.Tests.csproj‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,21 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
15-
<PackageReference Include="MSTest.TestAdapter" Version="3.8.2" />
16-
<PackageReference Include="MSTest.TestFramework" Version="3.8.2" />
17-
<PackageReference Include="coverlet.collector" Version="6.0.4"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.8.1" />
15+
<PackageReference Include="MSTest.TestAdapter" Version="4.3.2" />
16+
<PackageReference Include="MSTest.TestFramework" Version="4.3.2" />
17+
<PackageReference Include="coverlet.collector" Version="10.0.1"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1818
<PrivateAssets>all</PrivateAssets>
1919
</PackageReference>
20-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.2" />
21-
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.2" />
22-
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.2" />
20+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.10" />
21+
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.10" />
22+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.10" />
2323
<PackageReference Include="AutoFixture" Version="4.18.1" />
2424
<PackageReference Include="AutoFixture.AutoMoq" Version="4.18.1" />
25+
<!-- Force Fare 3.x to avoid NETStandard.Library@1.6.1 transitive dependency flagged by Snyk (license issue) -->
26+
<PackageReference Include="Fare" Version="2.2.2" />
2527
<PackageReference Include="Moq" Version="4.20.72" />
26-
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.3.0" />
28+
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.3.11" />
2729
</ItemGroup>
2830

2931
<ItemGroup>

‎Contentstack.Management.Core.Tests/IntegrationTest/Contentstack001_LoginTest.cs‎

Lines changed: 50 additions & 0 deletions
Large diffs are not rendered by default.

‎Contentstack.Management.Core.Tests/IntegrationTest/Contentstack003_StackTest.cs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,12 @@ public async System.Threading.Tasks.Task Test013_Stack_Settings_Async()
388388
#region Negative and error-handling tests (Test014+)
389389

390390
/// <summary>Non-empty API key used only to exercise SDK preconditions without requiring Test003 to succeed.</summary>
391+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
392+
// deepcode ignore NoHardcodedCredentials: test fixture value, not a real secret
391393
private const string SdkNonEmptyApiKey = "bltSdkValidationNonEmptyApiKey00";
392394

395+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
396+
// deepcode ignore NoHardcodedCredentials: test fixture value, not a real secret
393397
private const string InvalidStackApiKey = "bltNonExistentStackKey12345";
394398

395399
private static void AssertStackApiKeyOrInconclusive()
@@ -998,6 +1002,7 @@ public void Test056_Should_Fail_UpdateUserRole_Invalid_User_Uid_API()
9981002
{
9991003
new UserInvitation
10001004
{
1005+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
10011006
Uid = "blt_fake_user_uid_99999",
10021007
Roles = new List<string> { "blt_fake_role_uid_99999" }
10031008
}
@@ -1022,6 +1027,7 @@ public async Task Test057_Should_Fail_UpdateUserRoleAsync_Invalid_Role_Uid_API()
10221027
{
10231028
new UserInvitation
10241029
{
1030+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
10251031
Uid = "blt_fake_user_uid_88888",
10261032
Roles = new List<string> { "blt_fake_role_uid_88888" }
10271033
}

‎Contentstack.Management.Core.Tests/IntegrationTest/Contentstack011_GlobalFieldTest.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ public async System.Threading.Tasks.Task Test009_Should_Delete_Async_Global_Fiel
204204

205205
#region Constants
206206
private const string InvalidGlobalFieldUid = "non_existent_global_field_uid_12345";
207+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
208+
// deepcode ignore NoHardcodedCredentials: test fixture value, not a real secret
207209
private const string InvalidApiKey = "bltInvalidApiKey12345";
208210
private static readonly string VeryLongTitle = new string('a', 300); // 300 characters
209211
private const string SqlInjectionTitle = "'; DROP TABLE global_fields; --";

‎Contentstack.Management.Core.Tests/IntegrationTest/Contentstack013_AssetTest.cs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,6 +2358,7 @@ public async Task Test060_Should_Fail_With_Expired_Auth_Token_For_Asset_Operatio
23582358
var expiredTokenClient = new ContentstackClient(new ContentstackClientOptions()
23592359
{
23602360
Host = _client.contentstackOptions.Host,
2361+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
23612362
Authtoken = "blt_expired_token_simulation_12345"
23622363
});
23632364
var expiredStack = expiredTokenClient.Stack(_stack.APIKey);
@@ -2392,6 +2393,7 @@ public async Task Test061_Should_Fail_With_Insufficient_Asset_Permissions()
23922393
var limitedPermClient = new ContentstackClient(new ContentstackClientOptions()
23932394
{
23942395
Host = _client.contentstackOptions.Host,
2396+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
23952397
Authtoken = "blt_limited_permissions_token_12345"
23962398
});
23972399
var limitedStack = limitedPermClient.Stack(_stack.APIKey);
@@ -2524,6 +2526,7 @@ public async Task Test065_Should_Block_Unauthorized_Asset_Deletion()
25242526
var readOnlyClient = new ContentstackClient(new ContentstackClientOptions()
25252527
{
25262528
Host = _client.contentstackOptions.Host,
2529+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
25272530
Authtoken = "blt_readonly_token_12345"
25282531
});
25292532
var readOnlyStack = readOnlyClient.Stack(_stack.APIKey);
@@ -2558,6 +2561,7 @@ public async Task Test066_Should_Handle_Session_Timeout_During_Upload()
25582561
var shortLivedClient = new ContentstackClient(new ContentstackClientOptions()
25592562
{
25602563
Host = _client.contentstackOptions.Host,
2564+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
25612565
Authtoken = "blt_short_lived_token_12345"
25622566
});
25632567
var shortLivedStack = shortLivedClient.Stack(_stack.APIKey);
@@ -2608,6 +2612,7 @@ public async Task Test067_Should_Validate_Asset_Access_Token_Scopes()
26082612
var limitedScopeClient = new ContentstackClient(new ContentstackClientOptions()
26092613
{
26102614
Host = _client.contentstackOptions.Host,
2615+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
26112616
Authtoken = "blt_limited_scope_token_12345"
26122617
});
26132618
var limitedScopeStack = limitedScopeClient.Stack(_stack.APIKey);

‎Contentstack.Management.Core.Tests/IntegrationTest/Contentstack016_DeliveryTokenTest.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class Contentstack016_DeliveryTokenTest
2727
private DeliveryTokenModel _testTokenModel;
2828

2929
// Constants for error testing
30+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
3031
private const string NonExistentTokenUid = "blt00000000000000000000";
3132
private const string InvalidTokenUid = "invalid-uid-format";
3233
private const string MalformedTokenUid = "!@#$%^&*()";

‎Contentstack.Management.Core.Tests/IntegrationTest/Contentstack019_RoleTest.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class Contentstack019_RoleTest
1919
/// <summary>
2020
/// UID that should not exist on any stack (for negative-path tests).
2121
/// </summary>
22+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
2223
private const string NonExistentRoleUid = "blt0000000000000000";
2324

2425
private static ContentstackClient _client;
@@ -1642,6 +1643,7 @@ public void Test041_Should_Handle_Fetch_With_Invalid_Credentials_Sync()
16421643
var invalidClient = new ContentstackClient(new ContentstackClientOptions()
16431644
{
16441645
Host = _client.contentstackOptions.Host,
1646+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
16451647
Authtoken = "blt_invalid_token_format"
16461648
});
16471649

@@ -2000,6 +2002,7 @@ public void Test049_Should_Validate_Role_Stack_Isolation_Sync()
20002002
try
20012003
{
20022004
// Attempt to access role using different stack context
2005+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
20032006
var differentStackKey = "blt_fake_stack_key_12345";
20042007
var differentStack = _client.Stack(differentStackKey);
20052008

@@ -2135,6 +2138,7 @@ public async Task Test052_Should_Validate_Role_Stack_Isolation_Async()
21352138
try
21362139
{
21372140
// Attempt to access role using different stack context
2141+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
21382142
var differentStackKey = "blt_fake_stack_key_async_12345";
21392143
var differentStack = _client.Stack(differentStackKey);
21402144

‎Contentstack.Management.Core.Tests/IntegrationTest/Contentstack021_EntryVariantTest.cs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ public async System.Threading.Tasks.Task Test006_Should_Fail_To_Create_Variant_F
488488

489489
TestOutputLogger.LogContext("TestScenario", "ProductBannerVariantLifecycle_Create_Negative");
490490

491+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
491492
var invalidEntryUid = "blt_invalid_entry_uid";
492493
var variantData = new { banner_color = "Navy Blue", _variant = new { _change_set = new[] { "banner_color" } } };
493494

@@ -1241,6 +1242,7 @@ public void Test031_Should_Validate_Variant_Stack_Isolation_Sync()
12411242
TestOutputLogger.LogContext("TestScenario", "Test031_Should_Validate_Variant_Stack_Isolation_Sync");
12421243

12431244
// Attempt to access variant using different stack context
1245+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
12441246
var differentStackKey = "blt_fake_stack_key_12345";
12451247
var differentStack = _client.Stack(differentStackKey);
12461248

@@ -1485,6 +1487,7 @@ public async Task Test037_Should_Validate_Variant_Stack_Isolation_Async()
14851487

14861488
TestOutputLogger.LogContext("TestScenario", "Test037_Should_Validate_Variant_Stack_Isolation_Async");
14871489

1490+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
14881491
var differentStackKey = "blt_fake_stack_key_async_12345";
14891492
var differentStack = _client.Stack(differentStackKey);
14901493

@@ -1859,6 +1862,7 @@ public void Test046_Should_Accept_Operations_With_Broken_Dependencies_Sync()
18591862
TestOutputLogger.LogContext("TestScenario", "Test046_Should_Accept_Operations_With_Broken_Dependencies_Sync");
18601863

18611864
// API is permissive with broken references - ignores invalid reference fields
1865+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
18621866
var deletedEntryUid = "blt_deleted_entry_12345";
18631867

18641868
var variantDataWithBrokenRefs = new
@@ -2222,6 +2226,7 @@ public async Task Test054_Should_Accept_Operations_With_Broken_Dependencies_Asyn
22222226
TestOutputLogger.LogContext("TestScenario", "Test054_Should_Accept_Operations_With_Broken_Dependencies_Async");
22232227

22242228
// API is permissive with broken references - ignores invalid reference fields
2229+
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
22252230
var deletedEntryUid = "blt_deleted_entry_async_12345";
22262231

22272232
var variantDataWithBrokenRefs = new

0 commit comments

Comments
 (0)